forked from n8n-io/n8n
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
45 lines (43 loc) · 1.5 KB
/
eslint.config.mjs
File metadata and controls
45 lines (43 loc) · 1.5 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
import { defineConfig } from 'eslint/config';
import { baseConfig } from '@n8n/eslint-config/base';
export default defineConfig(
baseConfig,
{
rules: {
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
complexity: ['error', 23],
// TODO: remove these
'no-empty': 'warn',
'id-denylist': 'warn',
'no-fallthrough': 'warn',
'no-useless-escape': 'warn',
'import-x/order': 'warn',
'no-extra-boolean-cast': 'warn',
'no-case-declarations': 'warn',
'no-prototype-builtins': 'warn',
'@typescript-eslint/naming-convention': 'warn',
'@typescript-eslint/no-base-to-string': 'warn',
'@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/return-await': ['error', 'always'],
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-unsafe-function-type': 'warn',
'@typescript-eslint/no-duplicate-type-constituents': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
},
},
{
files: ['**/*.test.ts'],
rules: {
// TODO: remove these
'prefer-const': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
},
},
);