-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Install eslint 9.3.0 npm i --save-dev eslint@latest eslint-config-prettier@latest * npm remove eslint-plugin-node * npm i --save-dev globals @eslint/js * Initial version of eslint.config.js (migrated away from the legacy YAML file) * Fix / ignore browser globals being redeclared * examples/screenshot.js: use process.exit() * Ignore no-empty for try / catch blocks * requestsMonitor: fix "Unexpected constant truthiness on the left-hand side" * bin/phantomas.js: use process.exit() * Prettify the code
- Loading branch information
Showing
12 changed files
with
525 additions
and
450 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
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,39 @@ | ||
const globals = require("globals"); | ||
const js = require("@eslint/js"); | ||
|
||
const eslintConfigPrettier = require("eslint-config-prettier"); | ||
|
||
module.exports = [ | ||
js.configs.recommended, | ||
eslintConfigPrettier, | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: "script", | ||
globals: { | ||
// https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables | ||
...globals.node, | ||
...globals.browser, | ||
}, | ||
}, | ||
rules: { | ||
"prefer-const": "off", | ||
"no-console": "off", | ||
"no-async-promise-executor": "off", | ||
// https://eslint.org/docs/latest/rules/no-unused-vars | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
vars: "all", | ||
args: "after-used", | ||
caughtErrors: "none", // ignore catch block variables | ||
ignoreRestSiblings: false, | ||
reportUsedIgnorePattern: false, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
ignores: ["coverage/**", "test/webroot/**"], | ||
}, | ||
]; |
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.