-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy patheslint.config.js
More file actions
75 lines (74 loc) · 2.09 KB
/
eslint.config.js
File metadata and controls
75 lines (74 loc) · 2.09 KB
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
import react from 'eslint-config-cheminfo-react/base';
import ts from 'eslint-config-cheminfo-typescript/base';
import unicorn from 'eslint-config-cheminfo-typescript/unicorn';
export default [
{
ignores: [
'build',
'coverage',
'lib',
'lib-internal',
'node_modules',
'playwright-report',
'test-results',
'public',
'.yalc',
],
},
...ts,
...unicorn,
...react,
{
files: ['**/*.{ts,tsx,cts,mts}'],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
},
},
{
rules: {
'@typescript-eslint/switch-exhaustiveness-check': 'off',
'import/default': 'off',
'import/no-unresolved': 'off',
'react-refresh/only-export-components': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-useless-default-assignment': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'react/no-unstable-nested-components': 'off',
'react-hooks/refs': 'off',
'react-hooks/set-state-in-effect': 'off',
'no-restricted-imports': [
'error',
{
name: 'lodash',
message:
"Use a deep import instead, like for example 'lodash/merge.js'",
},
{
name: '@simbathesailor/use-what-changed',
message: 'Remove use-what-changed before committing the code',
},
{
name: 'file-saver',
message:
'Use our internal utility at `src/component/utility/save_as.ts`',
},
],
'react/no-unknown-property': ['error', { ignore: ['css'] }],
'react/forbid-dom-props': [
'error',
{
forbid: [
{
propName: 'data-test-id',
message: 'Use data-testid instead (testing framework standard)',
},
],
},
],
},
},
];