-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
40 lines (40 loc) · 1.61 KB
/
.eslintrc.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
38
39
40
module.exports = {
env: {
node: true,
commonjs: true,
es6: true,
},
extends: ["eslint:recommended", "prettier"],
overrides: [],
parserOptions: {
ecmaVersion: "latest",
},
rules: {
"wrap-iife": ["error", "any", { functionPrototypeMethods: true }],
"brace-style": ["error", "1tbs", { allowSingleLine: false }],
"max-len": ["error", { code: 160, ignoreUrls: true, ignoreStrings: true }],
"no-mixed-operators": "error",
"no-unexpected-multiline": "error",
"quotes": ["error", "double", { avoidEscape: true, allowTemplateLiterals: false }],
"curly": ["error", "all"],
// "consistent-return": "error",
"indent": ["error", 4],
"semi": ["error", "always"],
"space-unary-ops": 2,
"eqeqeq": ["error", "always", {"null": "ignore"}],
"array-bracket-newline": ["error", { "multiline": true }],
"array-bracket-spacing": ["error", "never"],
"block-spacing": ["error", "always"],
"comma-dangle": ["error", "only-multiline"],
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-style": ["error", "last"],
"dot-location": ["error", "property"],
"computed-property-spacing": ["error", "never"],
"function-paren-newline": ["error", { "minItems": 8}],
"key-spacing": ["error", {"mode": "strict" }],
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 4 }],
"no-whitespace-before-property": "error"
},
};
// you can find details in below link
// https://eslint.org/docs/latest/rules/