forked from borogove-if/borogove-ide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
76 lines (75 loc) · 2.5 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
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
module.exports = {
parser: "@typescript-eslint/parser",
// Specifies the ESLint parser
plugins: [ "@typescript-eslint" ],
env: {
browser: true,
es6: true,
node: true
},
extends: [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react/recommended", "plugin:storybook/recommended" ],
settings: {
react: {
"version": "detect" // Autodetect React version
}
},
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-function-return-type": 1,
"@typescript-eslint/indent": [ 1, 4, {
"ignoredNodes": [ "JSXElement *", "JSXElement" ],
// ignoredNodes prevents clashing with react/jsx-indent-props
"SwitchCase": 1
} ],
"@typescript-eslint/interface-name-prefix": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-unused-vars": [ 1, {
"argsIgnorePattern": "^_"
} ],
// allows unused parameters if they're prefixed with underscore
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-var-requires": 0,
"react/jsx-indent": 1,
"react/jsx-indent-props": [ 1, "first" ],
"react/prop-types": 0,
"react/no-unescaped-entities": 0,
"array-bracket-spacing": [ 1, "always" ],
"comma-dangle": [ 1, "never" ],
"eol-last": 1,
"key-spacing": [ 1, {
"afterColon": true,
"beforeColon": false
} ],
"keyword-spacing": [ 1, {
"before": true,
"after": true,
"overrides": {
"catch": {
"after": false
},
"for": {
"after": false
},
"if": {
"after": false
},
"switch": {
"after": false
},
"while": {
"after": false
}
}
} ],
"no-debugger": 0,
"no-trailing-spaces": 1,
"object-curly-spacing": [ 1, "always" ],
"quotes": 1,
"semi": [ 1, "always" ],
"space-before-function-paren": [ 1, "never" ],
"space-in-parens": [ 1, "always", {
"exceptions": [ "{}" ]
} ]
}
};