-
Notifications
You must be signed in to change notification settings - Fork 26
/
eslint.config.js
37 lines (36 loc) · 1001 Bytes
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const globals = require("globals");
const js = require("@eslint/js");
module.exports = [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2020,
sourceType: "script",
globals: {
// https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables
...globals.browser,
...globals.node,
},
},
rules: {
semi: "error",
"prefer-const": "error",
"no-async-promise-executor": "off",
"no-empty": ["error", { allowEmptyCatch: true }],
"no-prototype-builtins": "off",
"node/no-extraneous-require": "off",
"node/shebang": "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,
},
],
},
},
];