-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update own config to new flat ESLint (#11)
* Upgrade dependencies * Upgrade to ESLint v9 (alpha) * Upgrade own ESLint config to new flat config Also added package "globals" * Update folders that ESLint should ignore * Fix ESLint code violations * Add global ignore pattern to docs * Only test with newer versions of node * Only test on latest node version Otherwise, v9 of ESLint can't be installed * Run npm with `--legacy-peer-deps` flag This is because we are using an alpha version of ESLint.
- Loading branch information
Showing
10 changed files
with
165 additions
and
148 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
"spec": "tests/**/*.js", | ||
"ignore": [ | ||
"tests/fixtures/**" | ||
], | ||
} | ||
spec: "tests/**/*.js", | ||
ignore: [ | ||
"tests/fixtures/**", | ||
], | ||
}; |
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
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
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,40 @@ | ||
const js = require("@eslint/js"); | ||
const stylistic = require("@stylistic/eslint-plugin"); | ||
const globals = require("globals"); | ||
|
||
const customizedStylistic = stylistic.configs.customize({ | ||
"indent": 2, | ||
"jsx": false, | ||
"quote-props": "always", | ||
"semi": "always", | ||
"brace-style": "1tbs", | ||
}); | ||
|
||
module.exports = [ | ||
js.configs.recommended, | ||
{ | ||
ignores: [ | ||
"node_modules/", | ||
"tests/fixtures/", | ||
"tmp/", | ||
], | ||
}, | ||
{ | ||
plugins: { | ||
"@stylistic": stylistic, | ||
}, | ||
rules: { | ||
...customizedStylistic.rules, | ||
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], | ||
"@stylistic/quotes": ["error", "double", { avoidEscape: true }], | ||
}, | ||
languageOptions: { | ||
ecmaVersion: 2024, | ||
sourceType: "module", | ||
globals: { | ||
...globals.node, | ||
...globals.mocha, | ||
}, | ||
}, | ||
}, | ||
]; |
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
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
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
Oops, something went wrong.