-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
67 lines (67 loc) · 1.77 KB
/
Copy path.eslintrc.js
File metadata and controls
67 lines (67 loc) · 1.77 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
export default {
env: {
node: true,
es2022: true,
jest: true,
},
extends: [
"eslint:recommended",
"airbnb-base",
"plugin:security/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:prettier/recommended",
],
plugins: ["security", "import", "node", "prettier"],
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
},
rules: {
"prettier/prettier": "error",
indent: "off",
quotes: "off",
semi: "off",
"comma-dangle": "off",
"object-curly-spacing": "off",
"array-bracket-spacing": "off",
"max-len": "off",
"no-console": process.env.NODE_ENV === "production" ? "error" : "warn",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "warn",
"no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"security/detect-object-injection": "error",
"security/detect-unsafe-regex": "error",
"security/detect-eval-with-expression": "error",
"security/detect-child-process": "warn",
"security/detect-non-literal-fs-filename": "warn",
"node/no-deprecated-api": "error",
"node/prefer-global/process": ["error", "always"],
"node/prefer-promises/fs": "error",
"no-underscore-dangle": [
"error",
{
allow: ["_id", "__dirname", "__filename", "_"],
},
],
"consistent-return": "off",
"class-methods-use-this": "off",
"func-names": "off",
complexity: ["warn", 10],
"max-depth": ["warn", 4],
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".json", ".mjs"],
},
},
},
ignorePatterns: ["node_modules/", "dist/", "build/", "logs/", "coverage/"],
};