This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
72 lines (71 loc) · 1.84 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
65
66
67
68
69
70
71
72
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['airbnb', 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
plugins: ['@typescript-eslint', 'prettier'],
settings: {
'import/resolver': {
'babel-module': {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.ios.js', '.android.js'],
},
},
},
rules: {
'import/order': [
'error',
{
'newlines-between': 'always',
pathGroups: [
{
pattern: '@/**',
group: 'parent',
},
],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'import/no-unresolved': 'off',
'no-shadow': 'off',
'no-use-before-define': 'off',
'import/prefer-default-export': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'prettier/prettier': 'error',
'react/require-default-props': 'off',
'jsx-a11y/accessible-emoji': 'off',
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'react/jsx-closing-bracket-location': 'off',
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
},
overrides: [
{
files: ['**/*.{tsx,ts}'],
rules: {
'react/prop-types': 'off',
},
},
],
globals: {
__DEV__: true,
window: true,
},
};