Skip to content

Commit b893cb0

Browse files
bmishplatinumazure
andauthored
test: add eslint-remote-tester (#299)
* Test: add eslint-remote-tester * Update .gitignore Co-authored-by: Kevin Partington <[email protected]> * use basename --------- Co-authored-by: Kevin Partington <[email protected]>
1 parent a70ea57 commit b893cb0

File tree

4 files changed

+465
-0
lines changed

4 files changed

+465
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ build/coverage
33
.nyc_output/
44
npm-debug.log
55
.eslintcache
6+
7+
# eslint-remote-tester
8+
/eslint-remote-tester-results/

eslint-remote-tester.config.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
"use strict";
2+
3+
const fs = require("node:fs");
4+
const { basename, extname } = require("node:path");
5+
6+
/** @type {import('eslint-remote-tester').Config} */
7+
module.exports = {
8+
/** Repositories to scan */
9+
repositories: [
10+
// A few dozen top repositories using QUnit or this plugin.
11+
"DevExpress/DevExtreme",
12+
"adopted-ember-addons/ember-data-model-fragments",
13+
"balanced/balanced-dashboard",
14+
"ember-intl/ember-intl",
15+
"emberjs/ember.js",
16+
"getsentry/sentry-javascript",
17+
"glimmerjs/glimmer-vm",
18+
"hashicorp/boundary-ui",
19+
"hotwired/stimulus",
20+
"jashkenas/backbone",
21+
"jquery/jquery",
22+
"js-cookie/js-cookie",
23+
"l10n-tw/canvas-lms",
24+
"rust-lang/crates.io",
25+
"simonihmig/ember-responsive-image",
26+
"videojs/video.js"
27+
],
28+
29+
/** Extensions of files under scanning */
30+
extensions: ["js", "mjs", "cjs", "ts", "mts", "cts"],
31+
32+
/** Optional boolean flag used to enable caching of cloned repositories. For CIs it's ideal to disable caching. Defaults to true. */
33+
cache: false,
34+
35+
/** ESLint configuration */
36+
eslintrc: {
37+
plugins: ["qunit"],
38+
39+
// Enable all of our rules.
40+
rules: Object.fromEntries(
41+
fs
42+
.readdirSync(`${__dirname}/lib/rules`)
43+
.map((filename) => `qunit/${basename(filename, extname(filename))}`)
44+
.map((ruleName) => [ruleName, "error"])
45+
),
46+
47+
overrides: [
48+
{
49+
files: ["*.ts", "*.mts", "*.cts"],
50+
parser: "@typescript-eslint/parser"
51+
}
52+
]
53+
}
54+
};

0 commit comments

Comments
 (0)