-
-
Notifications
You must be signed in to change notification settings - Fork 72
/
.eslintrc.js
64 lines (64 loc) · 1.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
module.exports = {
root: true,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
},
plugins: ['react', 'react-native', '@react-native-community', 'prettier'],
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:prettier/recommended', '@react-native-community'],
rules: {
// eslint
semi: 'off',
curly: ['warn', 'multi-or-nest', 'consistent'],
'no-bitwise': 'off', // required for blurhash
'no-mixed-spaces-and-tabs': ['warn', 'smart-tabs'],
'no-async-promise-executor': 'warn',
'require-await': 'warn',
'no-return-await': 'warn',
'no-await-in-loop': 'warn',
'comma-dangle': 'off', // prettier already detects this
// prettier
'prettier/prettier': ['warn'],
// react plugin
'react/no-unescaped-entities': 'off',
// react native plugin
'react-native/no-unused-styles': 'warn',
'react-native/split-platform-components': 'warn',
'react-native/no-inline-styles': 'warn', // TODO: 'off'?
'react-native/no-color-literals': 'warn',
'react-native/no-raw-text': 'off',
'react-native/no-single-element-style-arrays': 'warn',
},
env: {
node: true,
'react-native/react-native': true,
},
settings: {
react: {
version: 'latest',
},
'import/resolver': {
extensions: [
'.js',
'.jsx',
'.ts',
'.tsx',
'.d.ts',
'.android.js',
'.android.jsx',
'.android.ts',
'.android.tsx',
'.ios.js',
'.ios.jsx',
'.ios.ts',
'.ios.tsx',
'.web.js',
'.web.jsx',
'.web.ts',
'.web.tsx',
],
},
},
};