-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
78 lines (78 loc) · 2.06 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
module.exports = {
root: true,
extends: [
'@react-native',
'airbnb',
'airbnb-typescript',
'prettier',
'plugin:jest/recommended',
'plugin:prettier/recommended',
'plugin:storybook/recommended',
'eslint-config-prettier',
'plugin:@tanstack/eslint-plugin-query/recommended',
],
parserOptions: {
parser: '@typescript-eslint/parser',
project: './tsconfig.json',
},
rules: {
curly: 0,
'import/no-unresolved': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error', {variables: false}],
'react/jsx-filename-extension': [
1,
{
extensions: ['.ts', '.tsx'],
},
],
'import/no-extraneous-dependencies': 'off',
'global-require': 'off',
'import/prefer-default-export': 'off',
'@typescript-eslint/return-await': 'off',
'react/function-component-definition': [
2,
{namedComponents: 'arrow-function'},
],
'react/react-in-jsx-scope': 'off',
'react/require-default-props': 'off',
'import/no-named-as-default': 'off',
'react/jsx-props-no-spreading': [
'error',
{
custom: 'ignore',
},
],
'default-case': 'off',
'import/no-cycle': 'off',
'react-hooks/exhaustive-deps': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-shadow': 'warn',
'no-underscore-dangle': [
'error',
{
allowAfterThis: true,
},
],
'no-plusplus': ['error', {allowForLoopAfterthoughts: true}],
'@typescript-eslint/lines-between-class-members': ['error'],
// Resource: https://noogoonaa.tistory.com/62
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
'react-native/no-inline-styles': 'off',
radix: 'off',
'no-throw-literal': 'off',
'@typescript-eslint/no-throw-literal': 'error',
},
plugins: ['prettier', '@tanstack/query'],
overrides: [
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react'],
},
],
};