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 6
/
.eslintrc.js
84 lines (84 loc) · 2.25 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
73
74
75
76
77
78
79
80
81
82
83
84
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['airbnb', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'prettier/react'],
plugins: ['@typescript-eslint', 'prettier', '@emotion', 'react', 'react-hooks'],
settings: {
'import/resolver': {
'babel-module': {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.ios.js', '.android.js'],
},
},
},
rules: {
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'error', // Checks effect dependencies
'@typescript-eslint/no-unused-vars': 'error',
'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': 'off',
'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-restricted-syntax': ['off', 'iterators/generators'],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'react/jsx-props-no-spreading': 'off',
'react/no-unknown-property': ['error', { ignore: ['css'] }],
'@typescript-eslint/no-empty-function': 'off',
},
overrides: [
{
files: ['**/*.{tsx,ts}'],
rules: {
'react/prop-types': 'off',
},
},
{
files: ['**/*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
globals: {
__DEV__: true,
window: true,
},
};