-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
101 lines (101 loc) · 2.93 KB
/
.eslintrc.js
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
// Add your custom rules here
'react/react-in-jsx-scope': 'off',
// 'unused-imports/no-unused-imports': 'warn',
// 'unused-imports/no-unused-vars': [
// 'warn',
// {
// vars: 'all',
// varsIgnorePattern: '^_',
// args: 'after-used',
// argsIgnorePattern: '^_',
// },
// ],
// Warn instead of error for unused variables
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
},
settings: {
react: {
version: 'detect',
},
},
plugins: [
'@typescript-eslint',
'react',
'prettier',
],
}
// module.exports = {
// parser: '@typescript-eslint/parser', // Specifies the ESLint parser
// extends: [
// 'plugin:react/recommended',
// 'prettier',
// 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
// ],
// parserOptions: {
// ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
// sourceType: 'module', // Allows for the use of imports
// ecmaFeatures: {
// jsx: true, // Allows for the parsing of JSX
// },
// },
// rules: {
// semi: 'off',
// '@typescript-eslint/ban-ts-ignore': 0,
// 'eslint-disable-next-line': 0,
// 'linebreak-style': 0,
// '@typescript-eslint/explicit-member-accessibility': 0,
// eqeqeq: 'error',
// 'max-len': 'off',
// 'new-parens': 'error',
// 'no-bitwise': 'error',
// 'no-caller': 'error',
// 'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 0 }],
// 'quote-props': ['error', 'as-needed'],
// 'sort-imports-es6-autofix/sort-imports-es6': [
// 2,
// {
// ignoreCase: false,
// ignoreMemberSort: false,
// memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
// },
// ],
// '@typescript-eslint/ban-ts-comment': 0,
// 'no-irregular-whitespace': 'warn',
// 'react-hooks/exhaustive-deps': 0,
// 'react/display-name': 0,
// 'react/jsx-uses-react': 'off',
// 'react/react-in-jsx-scope': 'off',
// 'react/prop-types': 'off',
// 'no-restricted-imports': [
// 'error',
// {
// patterns: ['@mui/*/*/*', '!@mui/material/test-utils/*'],
// },
// ],
// },
// plugins: ['sort-imports-es6-autofix'],
// settings: {
// react: {
// version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
// },
// },
// }