forked from da-bao-jian/ftx-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.json
More file actions
executable file
·78 lines (73 loc) · 2.28 KB
/
.eslintrc.json
File metadata and controls
executable file
·78 lines (73 loc) · 2.28 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
68
69
70
71
72
73
74
75
76
77
78
{
"env": { "es2021": true, "node": true },
"extends": [
"airbnb-base",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:node/recommended",
"plugin:sonarjs/recommended",
"plugin:unicorn/recommended",
"prettier"
],
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
},
"plugins": ["import", "node", "sonarjs", "unicorn"],
"rules": {
"arrow-body-style": ["error", "as-needed"],
"curly": ["error", "all"],
"no-console": "off",
"no-mixed-operators": "error",
"no-nested-ternary": "error",
"no-param-reassign": ["error", { "props": false }],
"no-restricted-syntax": ["off", "ForOfStatement"],
"no-underscore-dangle": ["error", { "allow": ["_id"] }],
"quotes": [
"error",
"single",
{ "avoidEscape": true, "allowTemplateLiterals": false }
],
"import/exports-last": "error",
"import/extensions": ["error", "always", { "ignorePackages": true }],
"import/namespace": "error",
"import/no-default-export": "error",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["**/postcss.config.js", "**/webpack.config.js"],
"optionalDependencies": false
}
],
"import/prefer-default-export": "off",
"node/no-unsupported-features/es-syntax": "off",
"sonarjs/prefer-immediate-return": "error",
"unicorn/custom-error-definition": "error",
"unicorn/filename-case": ["error", { "case": "camelCase" }],
"unicorn/no-nested-ternary": "off",
"unicorn/no-null": "off",
"unicorn/no-unsafe-regex": "error",
"unicorn/no-unused-properties": "error",
"unicorn/number-literal-case": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-replace-all": "error",
"unicorn/prevent-abbreviations": [
"error",
{
"replacements": {
"arrs": { "arrays": true },
"char": { "character": true },
"chars": { "characters": true },
"cum": { "cumulative": true },
"fn": { "function": true },
"fns": { "functions": true },
"init": { "initialise": true },
"msgs": { "messages": true },
"objs": { "objects": true },
"params": { "parameters": true },
"props": false
}
}
]
}
}