-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy patheslint.config.mjs
80 lines (78 loc) · 2.73 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import tsStylistic from '@stylistic/eslint-plugin-ts';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
import tsEslint from 'typescript-eslint';
import apify from '@apify/eslint-config';
export default [
{
ignores: ['**/dist', 'node_modules', 'coverage', 'website', '**/*.d.ts'],
},
...apify,
prettier,
{
languageOptions: {
parser: tsEslint.parser,
parserOptions: {
project: 'tsconfig.eslint.json',
},
globals: {
...globals.browser,
...globals.node,
...globals.jest,
},
},
},
{
plugins: {
'@typescript-eslint': tsEslint.plugin,
'@stylistic': tsStylistic,
},
rules: {
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'max-classes-per-file': 'off',
'no-empty-function': 'off',
'consistent-return': 'off',
'no-use-before-define': 'off',
'no-param-reassign': 'off',
'no-void': 'off',
'no-underscore-dangle': 'off',
'no-console': 'off',
'import/no-extraneous-dependencies': 'off',
'import/extensions': 'off',
'import/no-default-export': 'off',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/consistent-type-imports': [
'error',
{
'disallowTypeAnnotations': false,
},
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@stylistic/member-delimiter-style': [
'error',
{
'multiline': { 'delimiter': 'semi', 'requireLast': true },
'singleline': { 'delimiter': 'semi', 'requireLast': false },
},
],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/promise-function-async': 'off',
'no-promise-executor-return': 'off',
'@typescript-eslint/prefer-destructuring': 'off',
'prefer-destructuring': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'@stylistic/comma-dangle': ['error', 'always-multiline'],
},
},
{
files: ['packages/templates/**/*'],
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
];