-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
51 lines (51 loc) · 1.24 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
module.exports = {
extends: [
'eslint:recommended',
'airbnb',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'@electron-toolkit/eslint-config-ts/recommended',
'@electron-toolkit/eslint-config-prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
settings: {
'import/core-modules': ['electron'],
},
rules: {
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'react/require-default-props': 'off',
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [
'error',
{
extensions: ['.jsx', '.tsx'],
},
],
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
},
overrides: [
{
files: ['*.test.ts', '*.test.tsx'],
env: {
jest: true,
},
}
],
};