-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
1 parent
a70ea57
commit b893cb0
Showing
4 changed files
with
465 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ build/coverage | |
.nyc_output/ | ||
npm-debug.log | ||
.eslintcache | ||
|
||
# eslint-remote-tester | ||
/eslint-remote-tester-results/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} | ||
}; |
Oops, something went wrong.