-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreact-native.js
45 lines (45 loc) · 1.24 KB
/
react-native.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
module.exports = {
extends: [
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'plugin:react-native/all',
'@react-native-community',
require.resolve('./shared.js'),
],
plugins: ['unicorn', 'react', 'react-hooks', 'react-native'],
rules: {
'unicorn/filename-case': [
'error',
{
case: 'kebabCase',
ignore: [/^\[([A-Za-z]+)]\.(js|ts|tsx|jsx)$/],
},
],
'react/react-in-jsx-scope': 'off',
'react/jsx-props-no-spreading': 'off',
'react/require-default-props': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-key': 'error',
'react/function-component-definition': [
'error',
{
namedComponents: 'function-declaration',
unnamedComponents: 'arrow-function',
},
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react-native/no-unused-styles': 'error',
'react-native/split-platform-components': 'error',
'react-native/no-inline-styles': 'off',
'react-native/no-color-literals': 'error',
'react-native/no-single-element-style-arrays': 'error',
'react-native/no-raw-text': [
'warn',
{
skip: ['Animated.Text', 'Text', 'MotiText', 'Button'],
},
],
},
};