-
Notifications
You must be signed in to change notification settings - Fork 55
/
eslint.config.js
37 lines (35 loc) · 918 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");
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,
},
},
rules: {
"prefer-const": "off",
"no-console": "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: ["**/config-DIST.js", "coverage/**"],
},
];