-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.mjs
61 lines (60 loc) · 1.93 KB
/
eslint.config.mjs
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
import guardian from '@guardian/eslint-config';
export default [
...guardian.configs.recommended,
...guardian.configs.jest,
...guardian.configs.react,
...guardian.configs.storybook,
{
ignores: ['dist'],
rules: {
// Overrides for rules from `@guardian/eslint-config-typescript`.
// There are a number of these due to applying the config to an existing
// codebase. We should progressively fix these and remove the overrides.
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/prefer-reduce-type-parameter': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'import/no-cycle': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': 'allow-with-description',
'ts-nocheck': 'allow-with-description',
'ts-check': 'allow-with-description',
minimumDescriptionLength: 10,
},
],
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '_' },
],
'no-prototype-builtins': 'off',
'react/display-name': 'off',
'react/no-unescaped-entities': 'off',
},
},
{
files: ['client/__tests__/**'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
},
},
{
files: ['client/**/*.stories.tsx'],
rules: {
'import/no-default-export': 'off',
},
},
];