-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.eslintrc
145 lines (145 loc) · 4.53 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
135
136
137
138
139
140
141
142
143
144
145
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
},
"globals": {
"JSX": true
},
"settings": {
"react": {
"version": "16.0.0"
}
},
"env": {
"react-native/react-native": true,
"es6": true,
"node": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jest/recommended"
],
"plugins": [
"@typescript-eslint",
"react",
"react-native",
"react-native-a11y",
"jest"
],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variableLike",
"format": ["camelCase", "PascalCase"],
"filter": {
"regex": "_",
"match": false
}
},
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": false
}
}
],
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/triple-slash-reference": [
"error",
{ "path": "never", "types": "never", "lib": "never" }
],
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-for-in-array": "error",
"eqeqeq": ["error", "smart"],
"for-direction": "error",
"no-prototype-builtins": "error",
"no-template-curly-in-string": "error",
"no-empty-function": "error",
"no-loop-func": "error",
"no-param-reassign": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-throw-literal": "error",
"no-sequences": "error",
"no-unused-expressions": "error",
"no-useless-return": "error",
"no-void": "error",
"no-with": "error",
"no-catch-shadow": "error",
"no-delete-var": "error",
"no-use-before-define": "off",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-duplicate-imports": "error",
"no-unused-vars": "off",
"strict": ["error", "never"],
"radix": ["error", "always"],
"wrap-iife": "error",
"lines-between-class-members": ["error", "always"],
"object-shorthand": ["error", "always"],
"react/prop-types": 0,
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-sort-props": ["error"],
"react/button-has-type": "error",
"react/destructuring-assignment": ["error", "always"],
"react/display-name": "error",
"react/no-deprecated": "error",
"react/no-danger": "error",
"react/no-direct-mutation-state": "error",
"react/no-render-return-value": "error",
"react/no-string-refs": "error",
"react/no-typos": "error",
"react/prefer-es6-class": ["error", "always"],
"react/require-render-return": "error",
"react/no-unescaped-entities": "error",
"react/react-in-jsx-scope": "error",
"react/jsx-boolean-value": ["error", "always"],
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-bind": "error",
"react/no-access-state-in-setstate": "error",
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "error",
"react/no-array-index-key": "error",
"react-native-a11y/has-accessibility-props": "error",
"react-native-a11y/has-valid-accessibility-component-type": "error",
"react-native-a11y/has-valid-accessibility-role": "error",
"react-native-a11y/has-valid-accessibility-state": "error",
"react-native-a11y/has-valid-accessibility-states": "error",
"react-native-a11y/has-valid-accessibility-traits": "error",
"react-native-a11y/has-valid-accessibility-value": "error",
"react-native-a11y/has-valid-important-for-accessibility": "error",
"react-native-a11y/no-nested-touchables": "error",
"jest/consistent-test-it": [
"error",
{
"fn": "it"
}
],
"jest/expect-expect": "error",
"jest/no-alias-methods": "error",
"jest/no-test-prefixes": "error",
"jest/no-test-return-statement": "error"
}
}