-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
49 lines (48 loc) · 1.97 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
41
42
43
44
45
46
47
48
49
module.exports = {
// parser: "@babel/eslint-parser",
globals: {
session: true,
post: true,
SuperClass: true,
plugins: true,
},
env: {
node: true,
es2021: true,
},
parserOptions: {
// sourceType: 'module',
// ecmaVersion: 'latest',
ecmaVersion: 2017,
ecmaFeatures: {
globalReturn: true
}
},
extends: [
'eslint:recommended',
],
rules: {
"spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }],
"indent": ["error", 4],
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-redeclare": "off",
"no-inner-declarations": "off",
"no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": true, "varsIgnorePattern": "React" }],
"brace-style": ["error", "1tbs", { }],
"object-curly-spacing": ["error", "always"],
"nonblock-statement-body-position": ["error", "below"],
"array-bracket-spacing": ["error", "never"],
"space-before-blocks": ["error", "always"],
"arrow-spacing": ["error", { "before": true, "after": true }],
"no-multi-spaces": ["error", { ignoreEOLComments: true }],
"key-spacing": ["error", { "beforeColon": false, "align": "value" }],
"semi": ["error", "never"],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "if", "next": "*" },
{ "blankLine": "always", "prev": "switch", "next": "*" },
{ "blankLine": "always", "prev": "*", "next": "switch" },
{ "blankLine": "never", "prev": "*", "next": "block" },
],
},
}