-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
52 lines (51 loc) · 1.14 KB
/
Copy path.eslintrc.js
File metadata and controls
52 lines (51 loc) · 1.14 KB
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
module.exports = {
root: true,
extends: ['@react-native-community'],
parser: '@typescript-eslint/parser',
plugins: ['eslint-plugin-import-helpers'],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'styled-components',
importNames: ['default'],
message: 'Please import from styled-components/native.',
},
],
patterns: ['!styled-components/native'],
},
],
'import-helpers/order-imports': [
'error',
{
newlinesBetween: 'always',
groups: [
'/^react/',
'/^react-native/',
'/^@react/',
'module',
'/^components/',
['parent', 'sibling', 'index'],
],
alphabetize: { order: 'asc', ignoreCase: true },
},
],
},
ignorePatterns: [
'.eslintrc.js',
'*.config.js',
'storyLoader.js',
'platform/scripts/*.js',
'*.d.ts',
'*.test.ts',
'*.test.js',
'__tests__',
],
};