@crycode/eslint-config 1.2.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -24
- package/configs/base.js +13 -0
- package/configs/js.js +66 -0
- package/configs/stylistic.js +130 -0
- package/configs/ts.js +218 -0
- package/index.js +11 -0
- package/package.json +19 -12
- package/eslint-config.js +0 -402
package/README.md
CHANGED
|
@@ -11,43 +11,60 @@ Add `eslint` and `@crycode/eslint-config` to your devDependencies:
|
|
|
11
11
|
npm install --save-dev eslint @crycode/eslint-config
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
For TypeScript also add `typescript-eslint`:
|
|
15
15
|
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
extends: [
|
|
19
|
-
'@crycode/eslint-config'
|
|
20
|
-
],
|
|
21
|
-
parserOptions: {
|
|
22
|
-
project: [
|
|
23
|
-
'./tsconfig.json',
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
};
|
|
16
|
+
```shell
|
|
17
|
+
npm install --save-dev typescript-eslint
|
|
27
18
|
```
|
|
28
19
|
|
|
29
|
-
|
|
20
|
+
Add a file named `eslint.config.js` to your project root directory:
|
|
30
21
|
|
|
31
22
|
```js
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
import crycode from '@crycode/eslint-config';
|
|
24
|
+
|
|
25
|
+
export default [
|
|
26
|
+
...crycode.configs.js,
|
|
27
|
+
...crycode.configs.stylistic,
|
|
28
|
+
];
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or for TypeScript:
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import tseslint from 'typescript-eslint';
|
|
35
|
+
import crycode from '@crycode/eslint-config';
|
|
36
|
+
|
|
37
|
+
export default tseslint.config(
|
|
38
|
+
...crycode.configs.ts,
|
|
39
|
+
...crycode.configs.stylistic,
|
|
40
|
+
{
|
|
41
|
+
languageOptions: {
|
|
42
|
+
parserOptions: {
|
|
43
|
+
ecmaVersion: 2022,
|
|
44
|
+
sourceType: 'module',
|
|
45
|
+
project: [
|
|
46
|
+
'./tsconfig.json',
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
41
50
|
},
|
|
42
|
-
|
|
51
|
+
);
|
|
43
52
|
```
|
|
44
53
|
|
|
54
|
+
If you habe multiple tsconfig files, add them all to `project` array:
|
|
55
|
+
|
|
45
56
|
## Changelog
|
|
46
57
|
|
|
47
58
|
<!--
|
|
48
59
|
Placeholder for the next version (at the beginning of the line):
|
|
49
60
|
### **WORK IN PROGRESS**
|
|
50
61
|
-->
|
|
62
|
+
### 2.0.0 (2024-08-19)
|
|
63
|
+
|
|
64
|
+
* Migrate to eslint 9
|
|
65
|
+
* Provide configs for TS and JS from a single package
|
|
66
|
+
* Removed `eslint-plugin-import` for now since it's not ready for eslint 9 for now
|
|
67
|
+
|
|
51
68
|
### 1.2.2 (2023-09-07)
|
|
52
69
|
|
|
53
70
|
* Fixed usage of `eslint-plugin-import`
|
|
@@ -83,7 +100,7 @@ module.exports = {
|
|
|
83
100
|
|
|
84
101
|
MIT License
|
|
85
102
|
|
|
86
|
-
Copyright (c) 2021-
|
|
103
|
+
Copyright (c) 2021-2024 Peter Müller <peter@crycode.de>
|
|
87
104
|
|
|
88
105
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
89
106
|
of this software and associated documentation files (the "Software"), to deal
|
package/configs/base.js
ADDED
package/configs/js.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import base from './base.js';
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
eslint.configs.recommended,
|
|
6
|
+
...base,
|
|
7
|
+
{
|
|
8
|
+
rules: {
|
|
9
|
+
/* eslint-disable @stylistic/quote-props */
|
|
10
|
+
|
|
11
|
+
'array-callback-return': 'warn',
|
|
12
|
+
|
|
13
|
+
'default-param-last': 'error',
|
|
14
|
+
|
|
15
|
+
'eqeqeq': 'warn',
|
|
16
|
+
|
|
17
|
+
'no-caller': 'error',
|
|
18
|
+
|
|
19
|
+
'no-console': 'error',
|
|
20
|
+
|
|
21
|
+
'no-duplicate-imports': 'warn',
|
|
22
|
+
|
|
23
|
+
'no-eval': 'error',
|
|
24
|
+
|
|
25
|
+
'no-implied-eval': 'error',
|
|
26
|
+
|
|
27
|
+
'no-invalid-this': 'error',
|
|
28
|
+
|
|
29
|
+
'no-label-var': 'warn',
|
|
30
|
+
|
|
31
|
+
'no-loop-func': 'error',
|
|
32
|
+
|
|
33
|
+
'no-loss-of-precision': 'error',
|
|
34
|
+
|
|
35
|
+
'no-redeclare': 'error',
|
|
36
|
+
|
|
37
|
+
'no-shadow': 'error',
|
|
38
|
+
|
|
39
|
+
'no-throw-literal': 'error',
|
|
40
|
+
|
|
41
|
+
'no-undef-init': 'warn',
|
|
42
|
+
|
|
43
|
+
'no-unused-expressions': 'warn',
|
|
44
|
+
|
|
45
|
+
'no-useless-escape': 'warn',
|
|
46
|
+
|
|
47
|
+
'no-var': 'error',
|
|
48
|
+
|
|
49
|
+
'prefer-const': 'error',
|
|
50
|
+
|
|
51
|
+
'radix': 'warn',
|
|
52
|
+
|
|
53
|
+
'sort-imports': [
|
|
54
|
+
'warn',
|
|
55
|
+
{
|
|
56
|
+
ignoreCase: true,
|
|
57
|
+
ignoreDeclarationSort: true,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
|
|
61
|
+
'yoda': 'warn',
|
|
62
|
+
|
|
63
|
+
/* eslint-enable @stylistic/quote-props */
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
];
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import stylistic from '@stylistic/eslint-plugin';
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
stylistic.configs['recommended-flat'],
|
|
5
|
+
{
|
|
6
|
+
|
|
7
|
+
plugins: {
|
|
8
|
+
'@stylistic': stylistic,
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
rules: {
|
|
12
|
+
|
|
13
|
+
'@stylistic/array-bracket-spacing': [ 'warn', 'always' ],
|
|
14
|
+
|
|
15
|
+
'@stylistic/arrow-parens': [ 'warn', 'always' ],
|
|
16
|
+
|
|
17
|
+
'@stylistic/arrow-spacing': [
|
|
18
|
+
'warn',
|
|
19
|
+
{
|
|
20
|
+
after: true,
|
|
21
|
+
before: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
|
|
25
|
+
'@stylistic/brace-style': [
|
|
26
|
+
'error',
|
|
27
|
+
'1tbs',
|
|
28
|
+
{
|
|
29
|
+
allowSingleLine: true,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
'@stylistic/comma-dangle': [ 'warn', 'always-multiline' ],
|
|
34
|
+
|
|
35
|
+
'@stylistic/eol-last': 'warn',
|
|
36
|
+
|
|
37
|
+
'@stylistic/function-call-spacing': 'error',
|
|
38
|
+
|
|
39
|
+
'@stylistic/indent': [
|
|
40
|
+
'error',
|
|
41
|
+
2,
|
|
42
|
+
{
|
|
43
|
+
SwitchCase: 1,
|
|
44
|
+
MemberExpression: 1,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
|
|
48
|
+
'@stylistic/jsx-quotes': [ 'error', 'prefer-single' ],
|
|
49
|
+
|
|
50
|
+
'@stylistic/linebreak-style': [ 'warn', 'unix' ],
|
|
51
|
+
|
|
52
|
+
'@stylistic/lines-between-class-members': 'warn',
|
|
53
|
+
|
|
54
|
+
'@stylistic/member-delimiter-style': [
|
|
55
|
+
'error',
|
|
56
|
+
{
|
|
57
|
+
multiline: {
|
|
58
|
+
delimiter: 'semi',
|
|
59
|
+
requireLast: true,
|
|
60
|
+
},
|
|
61
|
+
singleline: {
|
|
62
|
+
delimiter: 'comma',
|
|
63
|
+
requireLast: false,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
|
|
68
|
+
'@stylistic/no-mixed-operators': 'warn',
|
|
69
|
+
|
|
70
|
+
'@stylistic/no-trailing-spaces': 'warn',
|
|
71
|
+
|
|
72
|
+
'@stylistic/object-curly-spacing': [ 'warn', 'always' ],
|
|
73
|
+
|
|
74
|
+
'@stylistic/padded-blocks': 'off',
|
|
75
|
+
|
|
76
|
+
'@stylistic/quote-props': [ 'warn', 'as-needed' ],
|
|
77
|
+
|
|
78
|
+
'@stylistic/quotes': [
|
|
79
|
+
'error',
|
|
80
|
+
'single',
|
|
81
|
+
{
|
|
82
|
+
avoidEscape: true,
|
|
83
|
+
allowTemplateLiterals: true,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
|
|
87
|
+
'@stylistic/rest-spread-spacing': [
|
|
88
|
+
'error',
|
|
89
|
+
'never',
|
|
90
|
+
],
|
|
91
|
+
|
|
92
|
+
'@stylistic/semi': [
|
|
93
|
+
'warn',
|
|
94
|
+
'always',
|
|
95
|
+
{
|
|
96
|
+
omitLastInOneLineBlock: false,
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
|
|
100
|
+
'@stylistic/semi-style': 'warn',
|
|
101
|
+
|
|
102
|
+
'@stylistic/space-before-blocks': 'warn',
|
|
103
|
+
|
|
104
|
+
'@stylistic/space-before-function-paren': [ 'warn', 'always' ],
|
|
105
|
+
|
|
106
|
+
'@stylistic/space-infix-ops': [
|
|
107
|
+
'error',
|
|
108
|
+
{
|
|
109
|
+
int32Hint: false,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
|
|
113
|
+
'@stylistic/spaced-comment': [
|
|
114
|
+
'warn',
|
|
115
|
+
'always',
|
|
116
|
+
{
|
|
117
|
+
exceptions: [ '-', '+', '*' ],
|
|
118
|
+
line: {
|
|
119
|
+
markers: [ '/' ],
|
|
120
|
+
},
|
|
121
|
+
block: {
|
|
122
|
+
balanced: true,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
|
|
127
|
+
'@stylistic/type-annotation-spacing': 'warn',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
];
|
package/configs/ts.js
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import tseslint from 'typescript-eslint';
|
|
2
|
+
import js from './js.js';
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
...js,
|
|
6
|
+
...tseslint.configs.recommended,
|
|
7
|
+
...tseslint.configs.stylistic,
|
|
8
|
+
{
|
|
9
|
+
languageOptions: {
|
|
10
|
+
parserOptions: {
|
|
11
|
+
ecmaVersion: 2022,
|
|
12
|
+
sourceType: 'module',
|
|
13
|
+
project: [
|
|
14
|
+
'./tsconfig.json',
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
rules: {
|
|
20
|
+
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
|
21
|
+
|
|
22
|
+
'@typescript-eslint/consistent-type-assertions': [
|
|
23
|
+
'error',
|
|
24
|
+
{
|
|
25
|
+
assertionStyle: 'as',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
|
|
29
|
+
'default-param-last': 'off',
|
|
30
|
+
'@typescript-eslint/default-param-last': 'error',
|
|
31
|
+
|
|
32
|
+
'@typescript-eslint/explicit-function-return-type': [
|
|
33
|
+
'error',
|
|
34
|
+
{
|
|
35
|
+
allowExpressions: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
|
|
39
|
+
'@typescript-eslint/explicit-member-accessibility': [
|
|
40
|
+
'error',
|
|
41
|
+
{
|
|
42
|
+
overrides: {
|
|
43
|
+
constructors: 'off',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
|
|
48
|
+
'@typescript-eslint/member-ordering': [
|
|
49
|
+
'warn',
|
|
50
|
+
{
|
|
51
|
+
default: {
|
|
52
|
+
memberTypes: [
|
|
53
|
+
// Index signature
|
|
54
|
+
'signature',
|
|
55
|
+
'call-signature',
|
|
56
|
+
|
|
57
|
+
// Fields
|
|
58
|
+
'public-abstract-field',
|
|
59
|
+
'protected-abstract-field',
|
|
60
|
+
|
|
61
|
+
'public-static-field',
|
|
62
|
+
'protected-static-field',
|
|
63
|
+
'private-static-field',
|
|
64
|
+
|
|
65
|
+
'public-instance-field',
|
|
66
|
+
'protected-instance-field',
|
|
67
|
+
'private-instance-field',
|
|
68
|
+
|
|
69
|
+
'public-field',
|
|
70
|
+
'protected-field',
|
|
71
|
+
'private-field',
|
|
72
|
+
|
|
73
|
+
'static-field',
|
|
74
|
+
'instance-field',
|
|
75
|
+
'abstract-field',
|
|
76
|
+
|
|
77
|
+
'field',
|
|
78
|
+
|
|
79
|
+
// Constructors
|
|
80
|
+
'public-constructor',
|
|
81
|
+
'protected-constructor',
|
|
82
|
+
'private-constructor',
|
|
83
|
+
|
|
84
|
+
'constructor',
|
|
85
|
+
|
|
86
|
+
// Methods
|
|
87
|
+
'public-abstract-method',
|
|
88
|
+
'public-static-method',
|
|
89
|
+
'public-instance-method',
|
|
90
|
+
'public-method',
|
|
91
|
+
|
|
92
|
+
'protected-abstract-method',
|
|
93
|
+
'protected-static-method',
|
|
94
|
+
'protected-instance-method',
|
|
95
|
+
'protected-method',
|
|
96
|
+
|
|
97
|
+
'private-static-method',
|
|
98
|
+
'private-instance-method',
|
|
99
|
+
'private-method',
|
|
100
|
+
|
|
101
|
+
'abstract-method',
|
|
102
|
+
'static-method',
|
|
103
|
+
'instance-method',
|
|
104
|
+
|
|
105
|
+
'method',
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
|
|
111
|
+
'@typescript-eslint/method-signature-style': 'warn',
|
|
112
|
+
|
|
113
|
+
'@typescript-eslint/naming-convention': [
|
|
114
|
+
'error',
|
|
115
|
+
{
|
|
116
|
+
selector: [ 'enum', 'interface', 'class' ],
|
|
117
|
+
format: [ 'PascalCase' ],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
selector: 'enumMember',
|
|
121
|
+
format: [ 'PascalCase', 'UPPER_CASE' ],
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
|
|
125
|
+
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
|
|
126
|
+
|
|
127
|
+
'no-implied-eval': 'off',
|
|
128
|
+
'@typescript-eslint/no-implied-eval': 'error',
|
|
129
|
+
|
|
130
|
+
'@typescript-eslint/no-inferrable-types': 'off',
|
|
131
|
+
|
|
132
|
+
'no-invalid-this': 'off',
|
|
133
|
+
'@typescript-eslint/no-invalid-this': 'error',
|
|
134
|
+
|
|
135
|
+
'no-loop-func': 'off',
|
|
136
|
+
'@typescript-eslint/no-loop-func': 'error',
|
|
137
|
+
|
|
138
|
+
'no-loss-of-precision': 'off',
|
|
139
|
+
'@typescript-eslint/no-loss-of-precision': 'error',
|
|
140
|
+
|
|
141
|
+
'@typescript-eslint/no-namespace': 'error',
|
|
142
|
+
|
|
143
|
+
'@typescript-eslint/parameter-properties': 'error',
|
|
144
|
+
|
|
145
|
+
'no-redeclare': 'off',
|
|
146
|
+
'@typescript-eslint/no-redeclare': 'error',
|
|
147
|
+
|
|
148
|
+
'@typescript-eslint/no-require-imports': 'error',
|
|
149
|
+
|
|
150
|
+
'no-shadow': 'off',
|
|
151
|
+
'@typescript-eslint/no-shadow': 'error',
|
|
152
|
+
|
|
153
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
|
154
|
+
|
|
155
|
+
'@typescript-eslint/no-unnecessary-type-constraint': 'warn',
|
|
156
|
+
|
|
157
|
+
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
|
158
|
+
|
|
159
|
+
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
160
|
+
|
|
161
|
+
'no-unused-expressions': 'off',
|
|
162
|
+
'@typescript-eslint/no-unused-expressions': 'warn',
|
|
163
|
+
|
|
164
|
+
'@typescript-eslint/no-unused-vars': [
|
|
165
|
+
'warn',
|
|
166
|
+
{
|
|
167
|
+
args: 'all',
|
|
168
|
+
argsIgnorePattern: '^_',
|
|
169
|
+
caughtErrors: 'all',
|
|
170
|
+
caughtErrorsIgnorePattern: '^_',
|
|
171
|
+
destructuredArrayIgnorePattern: '^_',
|
|
172
|
+
ignoreRestSiblings: true,
|
|
173
|
+
varsIgnorePattern: '^_',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
|
|
177
|
+
'@typescript-eslint/no-use-before-define': 'error',
|
|
178
|
+
|
|
179
|
+
'@typescript-eslint/non-nullable-type-assertion-style': 'warn',
|
|
180
|
+
|
|
181
|
+
'@typescript-eslint/prefer-includes': 'warn',
|
|
182
|
+
|
|
183
|
+
'@typescript-eslint/prefer-nullish-coalescing': [
|
|
184
|
+
'warn',
|
|
185
|
+
{
|
|
186
|
+
ignoreConditionalTests: true,
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
|
|
190
|
+
'@typescript-eslint/prefer-optional-chain': 'warn',
|
|
191
|
+
|
|
192
|
+
'@typescript-eslint/prefer-string-starts-ends-with': 'warn',
|
|
193
|
+
|
|
194
|
+
'@typescript-eslint/prefer-ts-expect-error': 'warn',
|
|
195
|
+
|
|
196
|
+
'@typescript-eslint/promise-function-async': [
|
|
197
|
+
'error',
|
|
198
|
+
{
|
|
199
|
+
checkArrowFunctions: false,
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
|
|
203
|
+
'@typescript-eslint/restrict-plus-operands': [
|
|
204
|
+
'error',
|
|
205
|
+
{
|
|
206
|
+
allowAny: true,
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
|
|
210
|
+
'no-return-await': 'off',
|
|
211
|
+
'@typescript-eslint/return-await': 'warn',
|
|
212
|
+
|
|
213
|
+
'@typescript-eslint/switch-exhaustiveness-check': 'warn',
|
|
214
|
+
|
|
215
|
+
'@typescript-eslint/unified-signatures': 'warn',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
];
|
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crycode/eslint-config",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "ESLint configuration to be used with TypeScript according to my personal preferences",
|
|
5
|
-
"main": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "ESLint configuration to be used with JavaScript or TypeScript according to my personal preferences",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"type": "module",
|
|
6
8
|
"scripts": {
|
|
9
|
+
"lint": "eslint .",
|
|
7
10
|
"release": "release-script"
|
|
8
11
|
},
|
|
9
12
|
"author": {
|
|
@@ -14,11 +17,13 @@
|
|
|
14
17
|
"keywords": [
|
|
15
18
|
"eslint",
|
|
16
19
|
"eslintconfig",
|
|
20
|
+
"javascript",
|
|
17
21
|
"typescript"
|
|
18
22
|
],
|
|
19
23
|
"license": "MIT",
|
|
20
24
|
"files": [
|
|
21
|
-
"
|
|
25
|
+
"index.js",
|
|
26
|
+
"configs/*.js",
|
|
22
27
|
"*.md"
|
|
23
28
|
],
|
|
24
29
|
"repository": {
|
|
@@ -26,17 +31,19 @@
|
|
|
26
31
|
"url": "https://github.com/crycode-de/eslint-config.git"
|
|
27
32
|
},
|
|
28
33
|
"dependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"eslint-
|
|
32
|
-
"
|
|
34
|
+
"@eslint/js": "^9.9.0",
|
|
35
|
+
"@stylistic/eslint-plugin": "^2.6.4",
|
|
36
|
+
"@stylistic/eslint-plugin-js": "^2.6.4",
|
|
37
|
+
"@types/eslint__js": "^8.42.3"
|
|
33
38
|
},
|
|
34
39
|
"peerDependencies": {
|
|
35
|
-
"eslint": "^
|
|
40
|
+
"eslint": "^9.9.0",
|
|
41
|
+
"typescript-eslint": "^8.1.0"
|
|
36
42
|
},
|
|
37
43
|
"devDependencies": {
|
|
38
|
-
"@alcalzone/release-script": "^3.
|
|
39
|
-
"@alcalzone/release-script-plugin-license": "^3.
|
|
40
|
-
"@alcalzone/release-script-plugin-manual-review": "^3.
|
|
44
|
+
"@alcalzone/release-script": "^3.8.0",
|
|
45
|
+
"@alcalzone/release-script-plugin-license": "^3.7.0",
|
|
46
|
+
"@alcalzone/release-script-plugin-manual-review": "^3.7.0",
|
|
47
|
+
"eslint": "^9.9.0"
|
|
41
48
|
}
|
|
42
49
|
}
|
package/eslint-config.js
DELETED
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ESLint configuration to be used with TypeScript according to my
|
|
3
|
-
* personal preferences.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
parser: '@typescript-eslint/parser',
|
|
8
|
-
|
|
9
|
-
parserOptions: {
|
|
10
|
-
ecmaVersion: 2021,
|
|
11
|
-
sourceType: 'module',
|
|
12
|
-
project: [
|
|
13
|
-
'./tsconfig.json'
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
extends: [
|
|
18
|
-
'plugin:@typescript-eslint/recommended',
|
|
19
|
-
'plugin:import/recommended',
|
|
20
|
-
'plugin:import/typescript',
|
|
21
|
-
],
|
|
22
|
-
|
|
23
|
-
settings: {
|
|
24
|
-
'import/resolver': {
|
|
25
|
-
typescript: true,
|
|
26
|
-
node: true,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
ignorePatterns: [
|
|
31
|
-
'/build/*',
|
|
32
|
-
'/dist/*',
|
|
33
|
-
],
|
|
34
|
-
|
|
35
|
-
rules: {
|
|
36
|
-
|
|
37
|
-
'array-bracket-spacing': ['warn', 'always'],
|
|
38
|
-
|
|
39
|
-
'array-callback-return': 'warn',
|
|
40
|
-
|
|
41
|
-
'arrow-parens': ['warn', 'always'],
|
|
42
|
-
|
|
43
|
-
'arrow-spacing': 'warn',
|
|
44
|
-
|
|
45
|
-
'brace-style': 'off',
|
|
46
|
-
'@typescript-eslint/brace-style': [
|
|
47
|
-
'error',
|
|
48
|
-
'1tbs',
|
|
49
|
-
{
|
|
50
|
-
allowSingleLine: true,
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
|
|
54
|
-
'comma-dangle': 'off',
|
|
55
|
-
'@typescript-eslint/comma-dangle': [
|
|
56
|
-
'warn',
|
|
57
|
-
{
|
|
58
|
-
arrays: 'always-multiline',
|
|
59
|
-
objects: 'always-multiline',
|
|
60
|
-
imports: 'always-multiline',
|
|
61
|
-
exports: 'always-multiline',
|
|
62
|
-
functions: 'always-multiline',
|
|
63
|
-
enums: 'always-multiline',
|
|
64
|
-
generics: 'always-multiline',
|
|
65
|
-
tuples: 'always-multiline',
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
|
|
69
|
-
'comma-spacing': 'off',
|
|
70
|
-
'@typescript-eslint/comma-spacing': 'error',
|
|
71
|
-
|
|
72
|
-
'@typescript-eslint/consistent-type-assertions': [
|
|
73
|
-
'error',
|
|
74
|
-
{
|
|
75
|
-
assertionStyle: 'as',
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
|
|
79
|
-
'default-param-last': 'off',
|
|
80
|
-
'@typescript-eslint/default-param-last': 'error',
|
|
81
|
-
|
|
82
|
-
'dot-location': ['warn', 'property'],
|
|
83
|
-
|
|
84
|
-
'eol-last': 'warn',
|
|
85
|
-
|
|
86
|
-
'eqeqeq': 'warn',
|
|
87
|
-
|
|
88
|
-
'@typescript-eslint/explicit-function-return-type': [
|
|
89
|
-
'error',
|
|
90
|
-
{
|
|
91
|
-
allowExpressions: true,
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
|
|
95
|
-
'@typescript-eslint/explicit-member-accessibility': [
|
|
96
|
-
'error',
|
|
97
|
-
{
|
|
98
|
-
overrides: {
|
|
99
|
-
constructors: 'off',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
|
|
104
|
-
'@typescript-eslint/func-call-spacing': 'error',
|
|
105
|
-
|
|
106
|
-
'indent': 'off',
|
|
107
|
-
'@typescript-eslint/indent': [
|
|
108
|
-
'error',
|
|
109
|
-
2,
|
|
110
|
-
{
|
|
111
|
-
SwitchCase: 1,
|
|
112
|
-
MemberExpression: 'off',
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
|
|
116
|
-
'jsx-quotes': ['error', 'prefer-single'],
|
|
117
|
-
|
|
118
|
-
'keyword-spacing': 'off',
|
|
119
|
-
'@typescript-eslint/keyword-spacing': 'error',
|
|
120
|
-
|
|
121
|
-
'linebreak-style': ['warn', 'unix'],
|
|
122
|
-
|
|
123
|
-
'lines-between-class-members': 'off',
|
|
124
|
-
'@typescript-eslint/lines-between-class-members': 'warn',
|
|
125
|
-
|
|
126
|
-
'@typescript-eslint/member-delimiter-style': [
|
|
127
|
-
'error',
|
|
128
|
-
{
|
|
129
|
-
multiline: {
|
|
130
|
-
delimiter: 'semi',
|
|
131
|
-
requireLast: true,
|
|
132
|
-
},
|
|
133
|
-
singleline: {
|
|
134
|
-
delimiter: 'comma',
|
|
135
|
-
requireLast: false,
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
|
|
140
|
-
'@typescript-eslint/member-ordering': [
|
|
141
|
-
'warn',
|
|
142
|
-
{
|
|
143
|
-
default: [
|
|
144
|
-
// Index signature
|
|
145
|
-
//'signature',
|
|
146
|
-
|
|
147
|
-
// Fields
|
|
148
|
-
'public-abstract-field',
|
|
149
|
-
'protected-abstract-field',
|
|
150
|
-
|
|
151
|
-
'public-static-field',
|
|
152
|
-
'protected-static-field',
|
|
153
|
-
'private-static-field',
|
|
154
|
-
|
|
155
|
-
//'public-decorated-field',
|
|
156
|
-
//'protected-decorated-field',
|
|
157
|
-
//'private-decorated-field',
|
|
158
|
-
|
|
159
|
-
'public-instance-field',
|
|
160
|
-
'protected-instance-field',
|
|
161
|
-
'private-instance-field',
|
|
162
|
-
|
|
163
|
-
'public-field',
|
|
164
|
-
'protected-field',
|
|
165
|
-
'private-field',
|
|
166
|
-
|
|
167
|
-
'static-field',
|
|
168
|
-
'instance-field',
|
|
169
|
-
'abstract-field',
|
|
170
|
-
|
|
171
|
-
//'decorated-field',
|
|
172
|
-
|
|
173
|
-
'field',
|
|
174
|
-
|
|
175
|
-
// Constructors
|
|
176
|
-
'public-constructor',
|
|
177
|
-
'protected-constructor',
|
|
178
|
-
'private-constructor',
|
|
179
|
-
|
|
180
|
-
'constructor',
|
|
181
|
-
|
|
182
|
-
// Methods
|
|
183
|
-
'public-abstract-method',
|
|
184
|
-
'public-static-method',
|
|
185
|
-
//'public-decorated-method',
|
|
186
|
-
'public-instance-method',
|
|
187
|
-
'public-method',
|
|
188
|
-
|
|
189
|
-
'protected-abstract-method',
|
|
190
|
-
'protected-static-method',
|
|
191
|
-
//'protected-decorated-method',
|
|
192
|
-
'protected-instance-method',
|
|
193
|
-
'protected-method',
|
|
194
|
-
|
|
195
|
-
'private-static-method',
|
|
196
|
-
//'private-decorated-method',
|
|
197
|
-
'private-instance-method',
|
|
198
|
-
'private-method',
|
|
199
|
-
|
|
200
|
-
'abstract-method',
|
|
201
|
-
'static-method',
|
|
202
|
-
//'decorated-method',
|
|
203
|
-
'instance-method',
|
|
204
|
-
|
|
205
|
-
'method',
|
|
206
|
-
],
|
|
207
|
-
},
|
|
208
|
-
],
|
|
209
|
-
|
|
210
|
-
'@typescript-eslint/method-signature-style': 'warn',
|
|
211
|
-
|
|
212
|
-
'@typescript-eslint/naming-convention': [
|
|
213
|
-
'error',
|
|
214
|
-
{
|
|
215
|
-
selector: ['enum', 'interface', 'class'],
|
|
216
|
-
format: ['PascalCase'],
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
selector: 'enumMember',
|
|
220
|
-
format: ['PascalCase', 'UPPER_CASE'],
|
|
221
|
-
},
|
|
222
|
-
],
|
|
223
|
-
|
|
224
|
-
'no-caller': 'error',
|
|
225
|
-
|
|
226
|
-
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
|
|
227
|
-
|
|
228
|
-
'no-console': 'error',
|
|
229
|
-
|
|
230
|
-
'no-duplicate-imports': 'off',
|
|
231
|
-
'import/no-duplicates': [
|
|
232
|
-
'error',
|
|
233
|
-
{
|
|
234
|
-
considerQueryString: true,
|
|
235
|
-
},
|
|
236
|
-
],
|
|
237
|
-
|
|
238
|
-
'no-eval': 'error',
|
|
239
|
-
|
|
240
|
-
'no-implied-eval': 'off',
|
|
241
|
-
'@typescript-eslint/no-implied-eval': 'error',
|
|
242
|
-
|
|
243
|
-
'@typescript-eslint/no-inferrable-types': 'off',
|
|
244
|
-
|
|
245
|
-
'no-invalid-this': 'off',
|
|
246
|
-
'@typescript-eslint/no-invalid-this': 'error',
|
|
247
|
-
|
|
248
|
-
'no-label-var': 'warn',
|
|
249
|
-
|
|
250
|
-
'no-loop-func': 'off',
|
|
251
|
-
'@typescript-eslint/no-loop-func': 'error',
|
|
252
|
-
|
|
253
|
-
'no-loss-of-precision': 'off',
|
|
254
|
-
'@typescript-eslint/no-loss-of-precision': 'error',
|
|
255
|
-
|
|
256
|
-
'no-mixed-operators': 'warn',
|
|
257
|
-
|
|
258
|
-
'@typescript-eslint/no-namespace': 'error',
|
|
259
|
-
|
|
260
|
-
'@typescript-eslint/parameter-properties': 'error',
|
|
261
|
-
|
|
262
|
-
'no-redeclare': 'off',
|
|
263
|
-
'@typescript-eslint/no-redeclare': 'error',
|
|
264
|
-
|
|
265
|
-
'@typescript-eslint/no-require-imports': 'error',
|
|
266
|
-
|
|
267
|
-
'no-shadow': 'off',
|
|
268
|
-
'@typescript-eslint/no-shadow': 'error',
|
|
269
|
-
|
|
270
|
-
'@typescript-eslint/no-throw-literal': 'error',
|
|
271
|
-
|
|
272
|
-
'no-trailing-spaces': 'warn',
|
|
273
|
-
|
|
274
|
-
'no-undef-init': 'warn',
|
|
275
|
-
|
|
276
|
-
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
|
277
|
-
|
|
278
|
-
'@typescript-eslint/no-unnecessary-type-constraint': 'warn',
|
|
279
|
-
|
|
280
|
-
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
|
281
|
-
|
|
282
|
-
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
283
|
-
|
|
284
|
-
'no-unused-expressions': 'off',
|
|
285
|
-
'@typescript-eslint/no-unused-expressions': 'warn',
|
|
286
|
-
|
|
287
|
-
'@typescript-eslint/no-unused-vars': [
|
|
288
|
-
'warn',
|
|
289
|
-
{
|
|
290
|
-
ignoreRestSiblings: true,
|
|
291
|
-
argsIgnorePattern: '^_',
|
|
292
|
-
},
|
|
293
|
-
],
|
|
294
|
-
|
|
295
|
-
'@typescript-eslint/no-use-before-define': 'error',
|
|
296
|
-
|
|
297
|
-
'no-var': 'error',
|
|
298
|
-
|
|
299
|
-
'@typescript-eslint/non-nullable-type-assertion-style': 'warn',
|
|
300
|
-
|
|
301
|
-
'object-curly-spacing': 'off',
|
|
302
|
-
'@typescript-eslint/object-curly-spacing': ['warn', 'always'],
|
|
303
|
-
|
|
304
|
-
'@typescript-eslint/prefer-includes': 'warn',
|
|
305
|
-
|
|
306
|
-
'prefer-const': 'error',
|
|
307
|
-
|
|
308
|
-
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
|
|
309
|
-
|
|
310
|
-
'@typescript-eslint/prefer-optional-chain': 'warn',
|
|
311
|
-
|
|
312
|
-
'@typescript-eslint/prefer-string-starts-ends-with': 'warn',
|
|
313
|
-
|
|
314
|
-
'@typescript-eslint/prefer-ts-expect-error': 'warn',
|
|
315
|
-
|
|
316
|
-
'@typescript-eslint/promise-function-async': [
|
|
317
|
-
'error',
|
|
318
|
-
{
|
|
319
|
-
checkArrowFunctions: false,
|
|
320
|
-
},
|
|
321
|
-
],
|
|
322
|
-
|
|
323
|
-
'quote-props': ['warn', 'as-needed'],
|
|
324
|
-
|
|
325
|
-
'quotes': 'off',
|
|
326
|
-
'@typescript-eslint/quotes': [
|
|
327
|
-
'error',
|
|
328
|
-
'single',
|
|
329
|
-
{
|
|
330
|
-
avoidEscape: true,
|
|
331
|
-
allowTemplateLiterals: true,
|
|
332
|
-
},
|
|
333
|
-
],
|
|
334
|
-
|
|
335
|
-
'radix': 'warn',
|
|
336
|
-
|
|
337
|
-
'@typescript-eslint/restrict-plus-operands': [
|
|
338
|
-
'error',
|
|
339
|
-
{
|
|
340
|
-
allowAny: true,
|
|
341
|
-
},
|
|
342
|
-
],
|
|
343
|
-
|
|
344
|
-
'no-return-await': 'off',
|
|
345
|
-
'@typescript-eslint/return-await': 'warn',
|
|
346
|
-
|
|
347
|
-
'semi': 'off',
|
|
348
|
-
'@typescript-eslint/semi': [
|
|
349
|
-
'warn',
|
|
350
|
-
'always',
|
|
351
|
-
{
|
|
352
|
-
omitLastInOneLineBlock: false,
|
|
353
|
-
},
|
|
354
|
-
],
|
|
355
|
-
|
|
356
|
-
'semi-style': 'warn',
|
|
357
|
-
|
|
358
|
-
'sort-imports': [
|
|
359
|
-
'warn',
|
|
360
|
-
{
|
|
361
|
-
ignoreCase: true,
|
|
362
|
-
ignoreDeclarationSort: true,
|
|
363
|
-
},
|
|
364
|
-
],
|
|
365
|
-
|
|
366
|
-
'space-before-blocks': 'warn',
|
|
367
|
-
|
|
368
|
-
'space-before-function-paren': 'off',
|
|
369
|
-
'@typescript-eslint/space-before-function-paren': 'warn',
|
|
370
|
-
|
|
371
|
-
'space-infix-ops': 'off',
|
|
372
|
-
'@typescript-eslint/space-infix-ops': [
|
|
373
|
-
'error',
|
|
374
|
-
{
|
|
375
|
-
int32Hint: false,
|
|
376
|
-
},
|
|
377
|
-
],
|
|
378
|
-
|
|
379
|
-
'spaced-comment': [
|
|
380
|
-
'warn',
|
|
381
|
-
'always',
|
|
382
|
-
{
|
|
383
|
-
exceptions: ['-', '+', '*'],
|
|
384
|
-
line: {
|
|
385
|
-
markers: ['/'],
|
|
386
|
-
},
|
|
387
|
-
block: {
|
|
388
|
-
balanced: true,
|
|
389
|
-
},
|
|
390
|
-
},
|
|
391
|
-
],
|
|
392
|
-
|
|
393
|
-
'@typescript-eslint/switch-exhaustiveness-check': 'warn',
|
|
394
|
-
|
|
395
|
-
'@typescript-eslint/type-annotation-spacing': 'warn',
|
|
396
|
-
|
|
397
|
-
'@typescript-eslint/unified-signatures': 'warn',
|
|
398
|
-
|
|
399
|
-
'yoda': 'warn',
|
|
400
|
-
},
|
|
401
|
-
|
|
402
|
-
};
|