-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.cjs
52 lines (52 loc) · 1.55 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, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'@rushstack/eslint-config/profile/web-app',
'@rushstack/eslint-config/mixins/react',
'plugin:storybook/recommended',
'plugin:@tanstack/eslint-plugin-query/recommended'
],
parserOptions: { tsconfigRootDir: __dirname },
settings: {
react: {
version: '18.2.0'
}
},
ignorePatterns: ['dist', '.eslintrc.cjs', 'vite.config.ts'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh', '@tanstack/query', 'import'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true }
],
'@tanstack/query/exhaustive-deps': 'error',
'@tanstack/query/prefer-query-object-syntax': 'error',
'@typescript-eslint/typedef': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'react/jsx-no-bind': 'off',
'@rushstack/typedef-var': 'off',
'@typescript-eslint/naming-convention': 'off',
'import/order': [
'warn',
{
groups: [
['builtin', 'external'],
'internal',
['parent', 'sibling', 'index']
],
pathGroupsExcludedImportTypes: ['builtin'],
alphabetize: { order: 'asc', caseInsensitive: true }
}
],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' }
],
'no-unused-expressions': ['error', { allowTernary: true }]
}
};