-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
81 lines (80 loc) · 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
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
/* eslint-env node */
module.exports = {
root: true,
plugins: ['unused-imports', '@typescript-eslint', 'react-refresh'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: __dirname,
allowImportExportEverywhere: true,
project: ['tsconfig.json', 'tsconfig.node.json'],
},
env: { browser: true, es2020: true },
settings: {
react: {
version: 'detect',
},
},
overrides: [
{
files: ['*.js', '*.json', '*.cjs'],
extends: ['plugin:@typescript-eslint/disable-type-checked'],
},
],
extends: [
'eslint:recommended',
'plugin:json/recommended',
'plugin:markdown/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:yml/prettier',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
'prettier',
],
ignorePatterns: [
'**/dist',
'**/package-lock.json',
'**/node_modules',
'**/lib',
],
rules: {
'react/display-name': 'off',
'react/prop-types': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'no-console': [
process.env.CI ? 'error' : 'warn',
{ allow: ['warn', 'error', 'info'] },
],
'react/react-in-jsx-scope': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'warn',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'json/*': ['off', { allowComments: true, trailingComma: true }],
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: false,
},
],
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
},
}