-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
45 lines (44 loc) · 1.2 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
const { init } = require('@fullstacksjs/eslint-config/init');
module.exports = init({
modules: {
auto: true,
cspell: false,
},
root: true,
env: { browser: true, es2020: true },
plugins: ['prettier', 'react-refresh', '@tanstack/query', '@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'prettier'],
ignorePatterns: ['dist', '.eslintrc.cjs', 'node_modules', 'postcss.config.js'],
parser: '@typescript-eslint/parser',
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './tsconfig.json',
},
},
},
rules: {
'prettier/prettier': ['error'],
'react-refresh/only-export-components': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'simple-import-sort/imports': 'off',
'simple-import-sort/exports': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'no-return-await': 'off',
'react/no-array-index-key': 'off',
'import/no-extraneous-dependencies': 'off',
'react-hooks/exhaustive-deps': 'off',
},
});