-
Notifications
You must be signed in to change notification settings - Fork 26
/
eslint.config.js
73 lines (72 loc) · 2.41 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
67
68
69
70
71
72
73
import globals from 'globals';
import prettier from 'eslint-config-prettier';
import sortImports from '@j4cobi/eslint-plugin-sort-imports';
import ts from 'typescript-eslint';
export default [
...ts.configs.recommended,
prettier,
{
ignores: ['**/node_modules/', '**/build/', '**/pnpm-lock.yaml'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.es2022,
...globals.node
}
},
plugins: { 'sort-imports': sortImports },
rules: {
'sort-imports/sort-imports': [
'error',
{ ignoreCase: false, ignoreMemberSort: false, memberSyntaxSortOrder: ['all', 'single', 'multiple', 'none'] }
],
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }],
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
'no-constant-condition': ['error', { checkLoops: false }],
'prefer-const': ['warn', { destructuring: 'all' }],
curly: ['warn', 'multi-line', 'consistent'],
'@typescript-eslint/no-explicit-any': 'off',
'logical-assignment-operators': 'warn',
'no-template-curly-in-string': 'error',
'quote-props': ['error', 'as-needed'],
'comma-dangle': ['error', 'never'],
'no-useless-constructor': 'error',
'no-useless-assignment': 'error',
'no-inner-declarations': 'error',
'no-implicit-coercion': 'error',
'no-use-before-define': 'warn',
'no-underscore-dangle': 'warn',
'no-unneeded-ternary': 'error',
'default-param-last': 'error',
'one-var': ['warn', 'never'],
'no-inline-comments': 'warn',
'no-empty-function': 'error',
'no-useless-return': 'error',
'no-useless-rename': 'warn',
'no-useless-concat': 'warn',
'no-throw-literal': 'error',
'no-extend-native': 'error',
'default-case-last': 'warn',
'no-self-compare': 'error',
'no-new-wrappers': 'error',
'no-lone-blocks': 'error',
'no-undef-init': 'error',
'no-else-return': 'warn',
'no-extra-semi': 'error',
'require-await': 'warn',
yoda: ['error', 'always'],
'default-case': 'error',
'dot-notation': 'error',
'no-sequences': 'warn',
'no-multi-str': 'warn',
'no-lonely-if': 'warn',
'no-new-func': 'error',
'no-console': 'error',
camelcase: 'warn',
'no-var': 'warn',
eqeqeq: 'warn',
semi: 'error'
}
}
];