-
Notifications
You must be signed in to change notification settings - Fork 36
/
.eslintrc.js
57 lines (53 loc) · 1.39 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
module.exports = {
env: {
es6: true, // ???
'react-native/react-native': true,
},
parserOptions: {
project: './tsconfig.json',
},
extends: [
// 'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:react-native/all',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/recommended',
'plugin:prettier/recommended',
],
rules: {
// ESLint recommended
'no-unused-vars': 'warn',
'no-useless-escape': 'off',
// Import
'import/no-named-as-default-member': 'off',
'import/no-named-as-default': 'off',
// React
'react/prop-types': 'off',
//'react/display-name': 'warn', // TODO: make it an "error"
'react/display-name': 'off',
'react/no-children-prop': 'off',
// React-Native
'react-native/no-raw-text': 'off',
'react-native/no-inline-styles': 'off',
'react-native/sort-styles': 'off',
'react-native/no-color-literals': 'warn',
// Typescript
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/require-await': 'warn',
},
reportUnusedDisableDirectives: true,
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
react: {
version: 'detect',
},
},
}