Skip to content

Commit a15deab

Browse files
committed
Reformat the eslint config file
1 parent 6d23f58 commit a15deab

File tree

1 file changed

+33
-30
lines changed

1 file changed

+33
-30
lines changed

eslint.config.js

+33-30
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
1-
const globals = require('globals');
2-
const js = require('@eslint/js');
1+
const globals = require("globals");
2+
const js = require("@eslint/js");
33

44
module.exports = [
5-
js.configs.recommended,
6-
{
7-
languageOptions: {
8-
ecmaVersion: 2020,
9-
sourceType: "script",
10-
globals: {
11-
// https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables
12-
...globals.browser,
13-
...globals.node,
14-
},
5+
js.configs.recommended,
6+
{
7+
languageOptions: {
8+
ecmaVersion: 2020,
9+
sourceType: "script",
10+
globals: {
11+
// https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables
12+
...globals.browser,
13+
...globals.node,
14+
},
15+
},
16+
rules: {
17+
semi: "error",
18+
"prefer-const": "error",
19+
"no-async-promise-executor": "off",
20+
"no-empty": ["error", { allowEmptyCatch: true }],
21+
"no-prototype-builtins": "off",
22+
"node/no-extraneous-require": "off",
23+
"node/shebang": "off",
24+
// https://eslint.org/docs/latest/rules/no-unused-vars
25+
"no-unused-vars": [
26+
"error",
27+
{
28+
vars: "all",
29+
args: "after-used",
30+
caughtErrors: "none", // ignore catch block variables
31+
ignoreRestSiblings: false,
32+
reportUsedIgnorePattern: false,
1533
},
16-
rules: {
17-
semi: "error",
18-
"prefer-const": "error",
19-
"no-async-promise-executor": 'off',
20-
"no-empty": ["error", { "allowEmptyCatch": true }],
21-
"no-prototype-builtins": 'off',
22-
"node/no-extraneous-require": 'off',
23-
"node/shebang": 'off',
24-
// https://eslint.org/docs/latest/rules/no-unused-vars
25-
"no-unused-vars": ["error", {
26-
"vars": "all",
27-
"args": "after-used",
28-
"caughtErrors": "none", // ignore catch block variables
29-
"ignoreRestSiblings": false,
30-
"reportUsedIgnorePattern": false,
31-
}]
32-
}
33-
}
34+
],
35+
},
36+
},
3437
];

0 commit comments

Comments
 (0)