-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
71 lines (68 loc) · 1.63 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
import tseslint from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
export default [
...tseslint.config(tseslint.configs.recommended),
eslintPluginPrettierRecommended,
{
ignores: ['dist/*', 'jest.config.*', 'tsconfig.json'],
},
{
languageOptions: {
sourceType: 'module',
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './tsconfig.json',
},
},
},
rules: {
// Typescript
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
// Regular
'prettier/prettier': 'warn',
semi: 'error',
quotes: ['warn', 'single', { avoidEscape: true }],
indent: 'off',
'no-console': 'warn',
'no-multi-spaces': [
'error',
{
ignoreEOLComments: false,
},
],
'no-multiple-empty-lines': [
'error',
{
max: 1,
maxEOF: 1,
maxBOF: 0,
},
],
'no-trailing-spaces': 'error',
'arrow-body-style': ['error', 'as-needed'],
'arrow-parens': ['error', 'always'],
'max-len': [
'warn',
{
ignoreStrings: true,
ignoreTemplateLiterals: true,
code: 100,
comments: 100,
},
],
'no-restricted-syntax': 'off',
},
},
];