-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
145 lines (144 loc) · 5.3 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
"env": {
"browser": true,
"es6": true,
"greasemonkey": true
},
"extends": ["eslint:all", "plugin:unicorn/all"],
"globals": {
"BigInt": "readonly",
"ClipboardItem": "readonly"
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"sourceType": "script"
},
"plugins": ["unicorn"],
"rules": {
"array-element-newline": ["error", "consistent"],
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["error", "as-needed"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": "off",
"capitalized-comments": "off",
"class-methods-use-this": "off",
"comma-dangle": ["warn", "always-multiline"],
"complexity": "off",
"consistent-return": "off",
"consistent-this": ["error", "_self"],
"curly": ["error", "multi-line"],
"dot-location": ["error", "property"],
"eqeqeq": ["error", "always", { "null": "ignore" }],
"func-names": ["error", "never"],
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"function-call-argument-newline": ["error", "consistent"],
"generator-star-spacing": ["error", "after"],
"id-denylist": "off",
"id-length": "off",
"id-match": "off",
"indent": ["error", 2, { "SwitchCase": 1 }],
"line-comment-position": "off",
"linebreak-style": "off",
"lines-around-comment": "off",
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"max-classes-per-file": "off",
"max-depth": ["error", 10],
"max-len": "off",
"max-lines-per-function": "off",
"max-lines": "off",
"max-params": ["error", 5],
"max-statements-per-line": "off",
"max-statements": "off",
"multiline-comment-style": "off",
"multiline-ternary": "off",
"new-cap": "off",
"newline-per-chained-call": "off",
"no-alert": "off",
"no-await-in-loop": "off",
"no-bitwise": "off",
"no-console": "off",
"no-continue": "off",
"no-debugger": "warn",
"no-else-return": "off",
"no-empty-function": "off",
"no-empty": ["warn", { "allowEmptyCatch": true }],
"no-eq-null": "off",
"no-extra-parens": "off",
"no-inline-comments": "off",
"no-labels": "off",
"no-lonely-if": "off",
"no-loop-func": "off",
"no-magic-numbers": "off",
"no-mixed-operators": ["error", { "groups": [["&", "|", "^", "~", "<<", ">>", ">>>"], ["==", "!=", "===", "!==", ">", ">=", "<", "<="], ["&&", "||", "?:", "??"], ["in", "instanceof"]] }],
"no-multi-assign": "off",
"no-multiple-empty-lines": ["warn", { "max": 1 }],
"no-negated-condition": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-promise-executor-return": "off",
"no-restricted-exports": "off",
"no-restricted-imports": "off",
"no-restricted-properties": "off",
"no-restricted-syntax": "off",
"no-shadow": "off",
"no-template-curly-in-string": "off",
"no-ternary": "off",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-unmodified-loop-condition": "warn",
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true }],
"no-unused-vars": "warn",
"no-use-before-define": "off",
"no-void": "off",
"no-warning-comments": "off", // off for unicorn
"object-curly-spacing": ["error", "always"],
"object-property-newline": "off",
"one-var": ["error", { "initialized": "never" }],
"operator-linebreak": ["error", "before"],
"padded-blocks": "off",
"padding-line-between-statements": "off",
"prefer-arrow-callback": ["warn", { "allowNamedFunctions": true }],
"prefer-const": "warn",
"prefer-destructuring": ["error", { "VariableDeclarator": { "object": true } }],
"prefer-named-capture-group": "off",
"prefer-template": "off",
"quote-props": "off",
"quotes": ["error", "single"],
"radix": ["error", "as-needed"],
"require-atomic-updates": "off",
"require-unicode-regexp": "off",
"semi": ["error", "never"],
"sort-keys": "off",
"space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
"wrap-iife": ["error", "inside"],
"wrap-regex": "off",
"yield-star-spacing": ["error", "after"],
// unicorn
"unicorn/catch-error-name": "off",
"unicorn/consistent-destructuring": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/empty-brace-spaces": "warn",
"unicorn/expiring-todo-comments": ["warn", { "allowWarningComments": false }],
"unicorn/filename-case": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-await-expression-member": "off",
"unicorn/no-keyword-prefix": "off",
"unicorn/no-lonely-if": "off",
"unicorn/no-negated-condition": "off",
"unicorn/no-new-array": "off",
"unicorn/no-null": "off",
"unicorn/no-this-assignment": "off",
"unicorn/no-unsafe-regex": "off",
"unicorn/no-useless-switch-case": "off",
"unicorn/no-zero-fractions": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-add-event-listener": "off",
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-switch": "off",
"unicorn/prefer-ternary": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/string-content": "off"
}
}