-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
76 lines (75 loc) · 2.01 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
const vitest = require('eslint-plugin-vitest');
module.exports = {
root: true,
env: { browser: true, node: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'plugin:@tanstack/eslint-plugin-query/recommended',
'plugin:testing-library/react',
'plugin:vitest/recommended',
'prettier',
],
plugins: ['react-refresh', 'react', 'react-hooks', '@typescript-eslint', 'jest-dom', 'testing-library', 'vitest'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'arrow-body-style': 'off',
'consistent-return': 'off',
'object-curly-newline': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-shadow': 'warn',
'no-param-reassign': 'warn',
'no-return-assign': 'warn',
'no-unused-vars': 'warn',
'no-cond-assign': 'off',
'no-plusplus': 'warn',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/no-array-index-key': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'react/jsx-props-no-spreading': 'off',
'import/prefer-default-export': 'warn',
'import/no-extraneous-dependencies': 'off',
'import/extensions': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'warn',
'vitest/valid-title': 'off',
'jsx-a11y/label-has-associated-control': [
2,
{
labelAttributes: ['htmlFor'],
},
],
},
ignorePatterns: [
'dist',
'build',
'node_modules',
'public',
'.history',
'.eslintrc.cjs',
'yarn.lock',
'postcss.config.js',
'tailwind.config.js',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
project: './tsconfig.json',
},
globals: {
...vitest.environments.env.globals,
},
settings: {
react: {
version: 'detect',
},
},
};