-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
52 lines (52 loc) · 1.59 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
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
jest: true,
},
extends: [
'eslint:recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: ['react-refresh', '@typescript-eslint'],
rules: {
'no-alert': 'off',
'no-console': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
'react/jsx-props-no-spreading': 'off',
'react/require-default-props': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': ['warn', { extensions: ['.tsx', '.js', '.jsx'] }],
'react-refresh/only-export-components': ['off'],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error', { variables: false, functions: false, classes: false }],
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
'react-hooks/exhaustive-deps': 'off',
},
ignorePatterns: ['.eslintrc.cjs', 'vite.config.ts', 'jest.config.ts'],
};