-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
120 lines (119 loc) · 5 KB
/
eslint.config.js
File metadata and controls
120 lines (119 loc) · 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/* eslint-disable */
import globals from 'globals';
import prettier from 'eslint-config-prettier';
import sortImports from '@j4cobi/eslint-plugin-sort-imports';
import ts from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';
import { globalIgnores } from 'eslint/config';
export default [
...ts.configs.recommended,
prettier,
globalIgnores(['./dist/', './coverage/', './documentation/']),
{
files: ['**/*.ts', '**/*.js'],
languageOptions: { ecmaVersion: 2022, sourceType: 'module', globals: { ...globals.es2022, ...globals.node } },
plugins: { '@stylistic': stylistic, 'sort-imports': sortImports },
rules: {
'sort-imports/sort-imports': [
'error',
{ ignoreCase: false, ignoreMemberSort: false, memberSyntaxSortOrder: ['all', 'single', 'multiple', 'none'] }
],
'@stylistic/max-len': [
'error',
{ code: 120, tabWidth: 2, ignoreComments: true, ignoreUrls: true, ignoreRegExpLiterals: true }
],
'@stylistic/space-before-function-paren': ['error', { anonymous: 'never', named: 'never', catch: 'always' }],
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
'@stylistic/array-bracket-newline': ['error', 'consistent'],
'no-constant-condition': ['error', { checkLoops: false }],
'no-extend-native': ['warn', { exceptions: ['Object'] }],
'@stylistic/nonblock-statement-body-position': 'error',
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/no-whitespace-before-property': 'error',
'@stylistic/one-var-declaration-per-line': 'error',
'prefer-const': ['warn', { destructuring: 'all' }],
'@stylistic/dot-location': ['error', 'property'],
'@stylistic/computed-property-spacing': 'error',
'@stylistic/no-mixed-spaces-and-tabs': 'error',
'@stylistic/type-named-tuple-spacing': 'error',
curly: ['warn', 'multi-line', 'consistent'],
'@stylistic/no-multiple-empty-lines': 'error',
'@stylistic/max-statements-per-line': 'error',
'@stylistic/type-annotation-spacing': 'error',
'@stylistic/member-delimiter-style': 'error',
'@stylistic/template-curly-spacing': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@stylistic/line-comment-position': 'error',
'@stylistic/object-curly-newline': 'error',
'@stylistic/array-bracket-spacing': 'warn',
'@stylistic/switch-colon-spacing': 'error',
'@stylistic/type-generic-spacing': 'error',
'@stylistic/rest-spread-spacing': 'error',
'@stylistic/no-floating-decimal': 'error',
'@stylistic/space-before-blocks': 'error',
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/no-confusing-arrow': 'error',
'logical-assignment-operators': 'warn',
'no-template-curly-in-string': 'error',
'@stylistic/space-in-parens': 'error',
'@stylistic/space-infix-ops': 'error',
'@stylistic/no-multi-spaces': 'error',
'@stylistic/keyword-spacing': 'error',
'@stylistic/linebreak-style': 'error',
'quote-props': ['error', 'as-needed'],
'@stylistic/spaced-comment': 'error',
'@stylistic/no-extra-semi': 'error',
'@stylistic/arrow-spacing': 'error',
'@stylistic/block-spacing': 'error',
'@stylistic/comma-spacing': 'error',
'@stylistic/curly-newline': 'error',
'@stylistic/semi-spacing': 'error',
'@stylistic/arrow-parens': 'error',
'@stylistic/comma-dangle': 'error',
'@stylistic/brace-style': 'error',
'@stylistic/key-spacing': 'error',
'@stylistic/comma-style': 'error',
'no-useless-constructor': 'error',
'@stylistic/semi-style': 'error',
'@stylistic/wrap-regex': 'error',
'@stylistic/new-parens': 'error',
'no-useless-assignment': 'error',
'no-inner-declarations': 'error',
'no-implicit-coercion': 'error',
'@stylistic/eol-last': 'error',
'no-use-before-define': 'warn',
'no-underscore-dangle': 'warn',
'no-unneeded-ternary': 'error',
'@stylistic/no-tabs': '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',
'default-case-last': 'warn',
'@stylistic/semi': 'error',
'no-self-compare': 'error',
'no-new-wrappers': 'error',
yoda: ['error', 'never'],
'@stylistic/semi': 'error',
'no-lone-blocks': 'error',
'no-undef-init': 'error',
'no-else-return': 'warn',
'require-await': 'warn',
'default-case': 'error',
'dot-notation': 'error',
'no-sequences': 'warn',
'no-multi-str': 'warn',
'no-lonely-if': 'warn',
'no-new-func': 'error',
camelcase: 'warn',
'no-var': 'warn',
eqeqeq: 'warn'
}
}
];