-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy path.eslintrc.json
104 lines (104 loc) · 3.77 KB
/
.eslintrc.json
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"plugins": ["prettier"],
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"parserOptions": {
"ecmaVersion": 2020
},
"rules": {
"prettier/prettier": [
"error",
{
"insertPragma": true,
"requirePragma": true,
"nestedBinaryExpressions": false,
"enforceForArrowConditionals": false
}
],
"comma-spacing": ["error", {"before": false, "after": true}],
"no-console": "warn",
"no-extra-parens": "off",
"no-loss-of-precision": "error",
"no-promise-executor-return": "off",
"no-template-curly-in-string": "error",
"no-unreachable-loop": "error",
"require-atomic-updates": "error",
"no-useless-backreference": "error",
// Best practices
"array-callback-return": ["error", {"checkForEach": true}],
"block-scoped-var": "error",
"consistent-return": "error",
"curly": "error",
"default-case": "error",
"default-case-last": "error",
"default-param-last": "error",
"dot-notation": "error",
"eqeqeq": "error",
"no-constructor-return": "error",
"no-else-return": "error",
"no-extra-bind": "error",
"no-multi-spaces": "error",
"no-underscore-dangle": "error",
"no-sequences": "error",
"no-unused-expressions": "warn",
"prefer-regex-literals": "warn",
"valid-jsdoc": ["error", {"requireReturn": false}],
// Strict mode
"strict": "error",
// Variables
"no-shadow": "error",
"no-undefined": "error",
"no-use-before-define": "error",
// Stylistic issues
"array-bracket-newline": ["error", "consistent"],
"array-bracket-spacing": ["error", "never"],
"array-element-newline": ["error", "consistent"],
"block-spacing": "error",
"brace-style": "error",
"camelcase": ["error", {"ignoreDestructuring": true, "ignoreGlobals": true}],
"comma-dangle": ["error", "only-multiline"],
"computed-property-spacing": ["error", "never", {"enforceForClassMembers": true}],
"consistent-this": ["error", "self"],
"eol-last": ["error", "always"],
"func-call-spacing": ["error", "never"],
"func-style": ["error", "declaration", {"allowArrowFunctions": true}],
"indent": ["error", 4, {"SwitchCase": 1}],
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"max-len": ["error", 120, {"ignoreComments": true}],
"multiline-comment-style": ["error", "starred-block"],
"new-cap": ["error", {"properties": false}],
"new-parens": "error",
"newline-per-chained-call": "off",
"no-multi-assign": "error",
"no-multiple-empty-lines": ["error", {"max": 1}],
"no-trailing-spaces": "error",
"object-curly-spacing": ["error", "never"],
"padded-blocks": ["error", "never"],
"quotes": ["error", "single", {"avoidEscape": true}],
"semi": ["error", "always"],
"semi-style": ["error", "last"],
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "never"
}
],
"space-in-parens": ["error", "never"],
"spaced-comment": ["error", "always"],
// ECMAScript 6
"arrow-parens": ["error", "always"],
"arrow-spacing": "error",
"no-confusing-arrow": "error",
"no-var": "error",
"prefer-const": "error",
"prefer-spread": "error"
}
}