forked from kakao-tech-campus-2nd-step2/react-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
78 lines (78 loc) · 1.88 KB
/
.eslintrc.cjs
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 = {
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'plugin:storybook/recommended',
'plugin:@tanstack/eslint-plugin-query/recommended',
'plugin:prettier/recommended',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
{
files: ['**/*.stories.*', '**/*.test.*'],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
],
ignorePatterns: ['vite.config.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint', 'react', 'import'],
rules: {
'react/react-in-jsx-scope': 'off',
'react/button-has-type': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/no-unknown-property': ['error', { ignore: ['css'] }],
'react/function-component-definition': [
2,
{ namedComponents: 'arrow-function' },
],
'import/no-default-export': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': [
'error',
{ optionalDependencies: false },
],
'prettier/prettier': 'error',
'jsx-a11y/label-has-associated-control': [
2,
{
some: ['nesting', 'id'],
},
],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{ variables: false, functions: false, classes: false },
],
},
settings: {
'import/resolver': {
node: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
},
},
};