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
38
39
40
|
import globals from "globals";
import js from "@eslint/js";
import importPlugin from "eslint-plugin-import";
import promisePlugin from "eslint-plugin-promise";
import nodePlugin from "eslint-plugin-node";
export default [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
...globals.node
}
},
plugins: {
import: importPlugin,
promise: promisePlugin,
node: nodePlugin,
},
rules: {
'no-unused-vars': ['warn', {
'varsIgnorePattern': '^_',
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^ignore|_",
}],
'import/no-unresolved': 'error',
'no-console': ["error", { allow: ["info", "warn", "error"] }],
'eqeqeq': ['error', 'always'],
// 'curly': ['warn', 'multi'],
'prefer-const': 'error',
'no-var': 'error',
'promise/catch-or-return': 'error',
'array-callback-return': 'error',
'no-unexpected-multiline': 'warn'
},
}
];
|