-
Notifications
You must be signed in to change notification settings - Fork 25
/
eslint.config.js
66 lines (65 loc) · 1.83 KB
/
eslint.config.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
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-cjs',
'node_modules',
'playwright-report',
'public',
],
},
...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: {
'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/restrict-plus-operands': 'off',
'react/no-unstable-nested-components': 'off',
'no-restricted-imports': [
'error',
{
name: 'lodash',
message:
"Use a deep import instead, like for example 'lodash/get.js'",
},
{
name: '@simbathesailor/use-what-changed',
message: 'Remove use-what-changed before committing the code',
},
{ name: 'openchemlib', message: "Use 'openchemlib/full'" },
{ name: 'react-ocl', message: "Use 'react-ocl/full" },
],
'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)',
},
],
},
],
},
},
];