-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
70 lines (67 loc) · 1.79 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
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
env: {
browser: true,
},
settings: {
version: 'detect',
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'],
},
alias: {
map: [
['@', './src'],
['', './public'],
],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'],
},
},
},
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:react/recommended',
'plugin:prettier/recommended',
'prettier',
'plugin:jsx-a11y/recommended',
'plugin:import/errors',
'plugin:import/typescript',
'./.eslintrc-auto-import.json',
'plugin:storybook/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
plugins: ['prettier', 'jsx-a11y', 'import', 'react-refresh'],
rules: {
'prettier/prettier': 'error',
'new-cap': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-new-object': 'error',
'no-duplicate-imports': 'error',
'no-return-await': 'off',
'no-restricted-syntax': [
'error',
{
selector:
':matches(PropertyDefinition, MethodDefinition)[accessibility="private"]',
message: 'Use #private instead',
},
],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{ variables: false, functions: false, classes: true },
],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react/react-in-jsx-scope': 'off',
'react-hooks/exhaustive-deps': 'off',
'react/prop-types': 'off',
},
};