-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
52 lines (51 loc) · 1.57 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
/** @type {import("eslint").Linter.Config} */
const config = {
root: true,
extends: '@callstack',
ignorePatterns: ['node_modules/', '**/node_modules/', 'lib/', '**/lib/', 'build/', '**/build/'],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
'@typescript-eslint/consistent-type-imports': ['error'],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/__tests__/**/*.[jt]s?(x)',
'**/?(*.)+(spec|test).[tj]s?(x)',
'**/babel.config.js',
'**/jest.config.js',
'**/metro.config.js',
],
},
],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
alphabetize: { order: 'asc' },
},
],
'no-empty-pattern': 'off',
'no-underscore-dangle': 'error',
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'const', next: '*' },
{ blankLine: 'any', prev: 'const', next: 'const' },
{ blankLine: 'always', prev: 'function', next: '*' },
{ blankLine: 'always', prev: 'block-like', next: '*' },
],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'sort-imports': [
'error',
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
},
};
module.exports = config;