1
+ /* eslint-disable */
1
2
import globals from 'globals' ;
2
3
import prettier from 'eslint-config-prettier' ;
3
4
import sortImports from '@j4cobi/eslint-plugin-sort-imports' ;
4
5
import ts from 'typescript-eslint' ;
6
+ import stylistic from '@stylistic/eslint-plugin' ;
7
+ import { globalIgnores } from 'eslint/config' ;
5
8
6
9
export default [
7
10
...ts . configs . recommended ,
8
11
prettier ,
12
+ globalIgnores ( [ './dist/' , './coverage/' , './documentation/' ] ) ,
9
13
{
10
- ignores : [ '**/node_modules/' , '**/build/ ', '**/pnpm-lock.yaml ' ] ,
14
+ files : [ '**/*.ts ' , '**/*.js ' ] ,
11
15
languageOptions : { ecmaVersion : 2022 , sourceType : 'module' , globals : { ...globals . es2022 , ...globals . node } } ,
12
- plugins : { 'sort-imports' : sortImports } ,
16
+ plugins : { '@stylistic' : stylistic , ' sort-imports' : sortImports } ,
13
17
rules : {
14
18
'sort-imports/sort-imports' : [
15
19
'error' ,
16
20
{ ignoreCase : false , ignoreMemberSort : false , memberSyntaxSortOrder : [ 'all' , 'single' , 'multiple' , 'none' ] }
17
21
] ,
18
- 'max-len' : [ 'error' , { code : 120 , ignoreUrls : true , ignoreComments : true } ] ,
22
+ '@stylistic/max-len' : [
23
+ 'error' ,
24
+ { code : 120 , tabWidth : 2 , ignoreComments : true , ignoreUrls : true , ignoreRegExpLiterals : true }
25
+ ] ,
26
+ '@stylistic/space-before-function-paren' : [ 'error' , { anonymous : 'never' , named : 'never' , catch : 'always' } ] ,
27
+ '@stylistic/function-call-argument-newline' : [ 'error' , 'consistent' ] ,
19
28
'@typescript-eslint/no-unused-vars' : [ 'error' , { args : 'none' } ] ,
29
+ '@stylistic/quotes' : [ 'error' , 'single' , { avoidEscape : true } ] ,
30
+ '@stylistic/array-bracket-newline' : [ 'error' , 'consistent' ] ,
31
+ '@stylistic/array-element-newline' : [ 'warn' , 'consistent' ] ,
20
32
'no-constant-condition' : [ 'error' , { checkLoops : false } ] ,
33
+ 'no-extend-native' : [ 'warn' , { exceptions : [ 'Object' ] } ] ,
34
+ '@stylistic/nonblock-statement-body-position' : 'error' ,
35
+ '@stylistic/object-curly-spacing' : [ 'error' , 'always' ] ,
36
+ '@stylistic/no-whitespace-before-property' : 'error' ,
37
+ '@stylistic/one-var-declaration-per-line' : 'error' ,
21
38
'prefer-const' : [ 'warn' , { destructuring : 'all' } ] ,
39
+ '@stylistic/dot-location' : [ 'error' , 'property' ] ,
40
+ '@stylistic/computed-property-spacing' : 'error' ,
41
+ '@stylistic/no-mixed-spaces-and-tabs' : 'error' ,
42
+ '@stylistic/type-named-tuple-spacing' : 'error' ,
22
43
curly : [ 'warn' , 'multi-line' , 'consistent' ] ,
44
+ '@stylistic/no-multiple-empty-lines' : 'error' ,
45
+ '@stylistic/max-statements-per-line' : 'error' ,
46
+ '@stylistic/type-annotation-spacing' : 'error' ,
47
+ '@stylistic/member-delimiter-style' : 'error' ,
48
+ '@stylistic/template-curly-spacing' : 'error' ,
23
49
'@typescript-eslint/no-explicit-any' : 'off' ,
50
+ '@stylistic/line-comment-position' : 'error' ,
51
+ '@stylistic/object-curly-newline' : 'error' ,
52
+ '@stylistic/array-bracket-spacing' : 'warn' ,
53
+ '@stylistic/switch-colon-spacing' : 'error' ,
54
+ '@stylistic/type-generic-spacing' : 'error' ,
55
+ '@stylistic/rest-spread-spacing' : 'error' ,
56
+ '@stylistic/no-floating-decimal' : 'error' ,
57
+ '@stylistic/space-before-blocks' : 'error' ,
58
+ '@stylistic/no-trailing-spaces' : 'error' ,
59
+ '@stylistic/no-confusing-arrow' : 'error' ,
24
60
'logical-assignment-operators' : 'warn' ,
25
61
'no-template-curly-in-string' : 'error' ,
62
+ '@stylistic/space-in-parens' : 'error' ,
63
+ '@stylistic/space-infix-ops' : 'error' ,
64
+ '@stylistic/no-multi-spaces' : 'error' ,
65
+ '@stylistic/keyword-spacing' : 'error' ,
66
+ '@stylistic/linebreak-style' : 'error' ,
26
67
'quote-props' : [ 'error' , 'as-needed' ] ,
27
- 'comma-dangle' : [ 'error' , 'never' ] ,
68
+ '@stylistic/spaced-comment' : 'error' ,
69
+ '@stylistic/no-extra-semi' : 'error' ,
70
+ '@stylistic/arrow-spacing' : 'error' ,
71
+ '@stylistic/block-spacing' : 'error' ,
72
+ '@stylistic/comma-spacing' : 'error' ,
73
+ '@stylistic/curly-newline' : 'error' ,
74
+ '@stylistic/semi-spacing' : 'error' ,
75
+ '@stylistic/arrow-parens' : 'error' ,
76
+ '@stylistic/comma-dangle' : 'error' ,
77
+ '@stylistic/brace-style' : 'error' ,
78
+ '@stylistic/indent' : [ 'error' , 2 ] ,
79
+ '@stylistic/key-spacing' : 'error' ,
80
+ '@stylistic/comma-style' : 'error' ,
28
81
'no-useless-constructor' : 'error' ,
82
+ '@stylistic/semi-style' : 'error' ,
83
+ '@stylistic/wrap-regex' : 'error' ,
84
+ '@stylistic/new-parens' : 'error' ,
29
85
'no-useless-assignment' : 'error' ,
30
86
'no-inner-declarations' : 'error' ,
31
87
'no-implicit-coercion' : 'error' ,
88
+ '@stylistic/eol-last' : 'error' ,
32
89
'no-use-before-define' : 'warn' ,
33
90
'no-underscore-dangle' : 'warn' ,
34
91
'no-unneeded-ternary' : 'error' ,
92
+ '@stylistic/no-tabs' : 'error' ,
35
93
'default-param-last' : 'error' ,
36
94
'one-var' : [ 'warn' , 'never' ] ,
37
95
'no-inline-comments' : 'warn' ,
@@ -40,27 +98,25 @@ export default [
40
98
'no-useless-rename' : 'warn' ,
41
99
'no-useless-concat' : 'warn' ,
42
100
'no-throw-literal' : 'error' ,
43
- 'no-extend-native' : 'error' ,
44
101
'default-case-last' : 'warn' ,
102
+ '@stylistic/semi' : 'error' ,
45
103
'no-self-compare' : 'error' ,
46
104
'no-new-wrappers' : 'error' ,
105
+ yoda : [ 'error' , 'never' ] ,
106
+ '@stylistic/semi' : 'error' ,
47
107
'no-lone-blocks' : 'error' ,
48
108
'no-undef-init' : 'error' ,
49
109
'no-else-return' : 'warn' ,
50
- 'no-extra-semi' : 'error' ,
51
110
'require-await' : 'warn' ,
52
- yoda : [ 'error' , 'always' ] ,
53
111
'default-case' : 'error' ,
54
112
'dot-notation' : 'error' ,
55
113
'no-sequences' : 'warn' ,
56
114
'no-multi-str' : 'warn' ,
57
115
'no-lonely-if' : 'warn' ,
58
116
'no-new-func' : 'error' ,
59
- 'no-console' : 'error' ,
60
117
camelcase : 'warn' ,
61
118
'no-var' : 'warn' ,
62
- eqeqeq : 'warn' ,
63
- semi : 'error'
119
+ eqeqeq : 'warn'
64
120
}
65
121
}
66
122
] ;
0 commit comments