-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc
134 lines (134 loc) · 3.92 KB
/
.eslintrc
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
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"env": {
"browser": true,
"jest/globals": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"prettier"
],
"plugins": [
"@typescript-eslint",
"import",
"jest",
"jsx-a11y",
"prettier",
"react",
"tree-shaking"
],
"ignorePatterns": ["**/*.config.*", "jest/*.js"],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": false
}
}
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-interface": [
"warn",
{
"allowSingleExtends": true
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": [
"warn",
{
"ignoreParameters": true
}
],
"@typescript-eslint/no-unused-vars": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/ban-types": ["off", { "types": ["{}", "object"] }],
"class-methods-use-this": ["warn", { "enforceForClassFields": false }],
"arrow-parens": ["error", "always"],
"curly": "error",
// "jsx-alignment": true,
"camelcase": "error",
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "only-multiline",
"functions": "only-multiline",
"imports": "only-multiline",
"exports": "only-multiline"
}
],
"consistent-return": "off",
"eol-last": "warn",
"explicit-member-accessibility": "off",
"import/first": "warn",
"import/extensions": "off",
"import/newline-after-import": "off",
"import/no-unresolved": "off",
"import/no-default-export": "error",
"import/no-extraneous-dependencies": "off",
"import/no-named-default": "off",
"import/no-useless-path-segments": "off",
"import/order": "off",
"import/prefer-default-export": "off",
"react/sort-comp": "off",
"jsx-a11y/label-has-associated-control": [
2,
{
"labelComponents": ["HtmlLabel"],
"labelAttributes": [],
"controlComponents": ["HtmlInput"],
"assert": "either"
}
],
"jsx-quotes": ["error", "prefer-double"],
"max-classes-per-file": ["error", 2],
"max-len": [
"error",
{ "code": 140, "ignorePattern": "^(import |export )\\{(.*)\\}" }
],
"no-console": "off",
"no-extra-boolean-cast": "off",
"no-multiple-empty-lines": "warn",
"no-nested-ternary": "off",
"no-shadow": "error",
"no-unused-expressions": "error",
"no-useless-escape": "off",
"no-useless-return": "off",
"prettier/prettier": "off",
"prefer-object-spread": "off",
"prefer-destructuring": ["warn", { "object": true }],
"quotes": ["warn", "single", { "allowTemplateLiterals": true }],
"react/function-component-definition": "off",
"react/no-did-update-set-state": "off",
"react/jsx-curly-brace-presence": "off",
"react/jsx-filename-extension": "off",
"react/jsx-props-no-spreading": "off",
"react/prop-types": "off",
"react/button-has-type": "off",
"react/prefer-stateless-function": "off",
"react/jsx-fragments": "off",
"react/jsx-pascal-case": "off",
"react/destructuring-assignment": "off",
"react/state-in-constructor": "off",
"react/no-children-prop": "off",
"react/jsx-wrap-multilines": "off",
"react/jsx-one-expression-per-line": "warn",
"react/jsx-boolean-value": "off",
"react/require-default-props": "off",
"semi": ["error", "always", { "omitLastInOneLineBlock": true }]
}
}