-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
47 lines (43 loc) · 1.26 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint', 'react', 'react-native', 'prettier'],
extends: [
'eslint:recommended',
'@react-native-community',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'comma-dangle': ['warn', 'only-multiline'],
radix: 0,
// Prettier
'prettier/prettier': [
'warn',
{
arrowParens: 'always',
bracketSpacing: true,
singleQuote: true,
trailingComma: 'es5',
tabWidth: 4,
printWidth: 120,
},
],
// Typescript
"@typescript-eslint/no-explicit-any": 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/ban-types': 1,
// React
"react-hooks/rules-of-hooks": 2, // Checks rules of Hooks
"react-hooks/exhaustive-deps": 1, // Checks effect dependencies
// react-native
'react-native/no-inline-styles': 0,
},
};