Skip to content

Commit

Permalink
test: add eslint-remote-tester (#299)
Browse files Browse the repository at this point in the history
* Test: add eslint-remote-tester

* Update .gitignore

Co-authored-by: Kevin Partington <[email protected]>

* use basename

---------

Co-authored-by: Kevin Partington <[email protected]>
  • Loading branch information
bmish and platinumazure authored Jun 28, 2023
1 parent a70ea57 commit b893cb0
Show file tree
Hide file tree
Showing 4 changed files with 465 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ build/coverage
.nyc_output/
npm-debug.log
.eslintcache

# eslint-remote-tester
/eslint-remote-tester-results/
54 changes: 54 additions & 0 deletions eslint-remote-tester.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"use strict";

const fs = require("node:fs");
const { basename, extname } = require("node:path");

/** @type {import('eslint-remote-tester').Config} */
module.exports = {
/** Repositories to scan */
repositories: [
// A few dozen top repositories using QUnit or this plugin.
"DevExpress/DevExtreme",
"adopted-ember-addons/ember-data-model-fragments",
"balanced/balanced-dashboard",
"ember-intl/ember-intl",
"emberjs/ember.js",
"getsentry/sentry-javascript",
"glimmerjs/glimmer-vm",
"hashicorp/boundary-ui",
"hotwired/stimulus",
"jashkenas/backbone",
"jquery/jquery",
"js-cookie/js-cookie",
"l10n-tw/canvas-lms",
"rust-lang/crates.io",
"simonihmig/ember-responsive-image",
"videojs/video.js"
],

/** Extensions of files under scanning */
extensions: ["js", "mjs", "cjs", "ts", "mts", "cts"],

/** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defaults to true. */
cache: false,

/** ESLint configuration */
eslintrc: {
plugins: ["qunit"],

// Enable all of our rules.
rules: Object.fromEntries(
fs
.readdirSync(`${__dirname}/lib/rules`)
.map((filename) => `qunit/${basename(filename, extname(filename))}`)
.map((ruleName) => [ruleName, "error"])
),

overrides: [
{
files: ["*.ts", "*.mts", "*.cts"],
parser: "@typescript-eslint/parser"
}
]
}
};
Loading

0 comments on commit b893cb0

Please sign in to comment.