@siemens/eslint-config-typescript 2.0.0-next.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/index.mjs +10 -17
- package/package.json +1 -2
package/index.mjs
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import eslintJs from '@eslint/js';
|
|
6
6
|
import typescriptEslint from 'typescript-eslint';
|
|
7
|
-
import jsdocPlugin from 'eslint-plugin-jsdoc';
|
|
8
7
|
import perfectionist from 'eslint-plugin-perfectionist';
|
|
9
8
|
import preferArrowPlugin from 'eslint-plugin-prefer-arrow';
|
|
10
9
|
|
|
@@ -13,8 +12,6 @@ import preferArrowPlugin from 'eslint-plugin-prefer-arrow';
|
|
|
13
12
|
export const configBase = typescriptEslint.config({
|
|
14
13
|
extends: [eslintJs.configs.recommended, ...typescriptEslint.configs.recommended],
|
|
15
14
|
plugins: {
|
|
16
|
-
'jsdoc': jsdocPlugin,
|
|
17
|
-
'prefer-arrow': preferArrowPlugin,
|
|
18
15
|
perfectionist
|
|
19
16
|
},
|
|
20
17
|
languageOptions: {
|
|
@@ -38,6 +35,9 @@ export const configBase = typescriptEslint.config({
|
|
|
38
35
|
'space-infix-ops': ['off'],
|
|
39
36
|
'space-before-blocks': ['off'],
|
|
40
37
|
|
|
38
|
+
// Disable the recommended formatting rules.
|
|
39
|
+
'no-unexpected-multiline': ['off'],
|
|
40
|
+
|
|
41
41
|
'@typescript-eslint/array-type': ['error'],
|
|
42
42
|
'@typescript-eslint/member-ordering': ['off'],
|
|
43
43
|
'@typescript-eslint/naming-convention': ['off'],
|
|
@@ -60,34 +60,26 @@ export const configBase = typescriptEslint.config({
|
|
|
60
60
|
'@typescript-eslint/prefer-function-type': ['error'],
|
|
61
61
|
'@typescript-eslint/unified-signatures': ['error'],
|
|
62
62
|
|
|
63
|
-
'array-bracket-spacing': ['error'],
|
|
64
|
-
'arrow-parens': ['error', 'as-needed'],
|
|
65
|
-
'arrow-spacing': ['error'],
|
|
66
|
-
'block-spacing': ['error'],
|
|
67
|
-
'curly': ['error'],
|
|
68
|
-
'jsdoc/newline-after-description': ['off'],
|
|
69
|
-
'key-spacing': ['error'],
|
|
70
63
|
'no-duplicate-imports': ['error'],
|
|
71
64
|
'no-empty': ['error'],
|
|
72
65
|
'no-irregular-whitespace': ['error'],
|
|
73
|
-
'no-multi-spaces': ['error'],
|
|
74
|
-
'no-multiple-empty-lines': ['error'],
|
|
75
|
-
'prefer-arrow/prefer-arrow-functions': ['off'],
|
|
76
|
-
'semi-spacing': ['error'],
|
|
77
|
-
'space-in-parens': ['error'],
|
|
78
|
-
'space-unary-ops': ['error'],
|
|
79
66
|
'sort-imports': ['error', { ignoreCase: true, ignoreDeclarationSort: true }]
|
|
80
67
|
}
|
|
81
68
|
});
|
|
82
69
|
|
|
83
70
|
export const configRecommended = typescriptEslint.config({
|
|
84
71
|
extends: [...configBase],
|
|
72
|
+
plugins: {
|
|
73
|
+
'prefer-arrow': preferArrowPlugin
|
|
74
|
+
},
|
|
85
75
|
languageOptions: {
|
|
86
76
|
parserOptions: {
|
|
87
77
|
allowAutomaticSingleRunInference: true
|
|
88
78
|
}
|
|
89
79
|
},
|
|
90
80
|
rules: {
|
|
81
|
+
'sort-imports': ['off'],
|
|
82
|
+
|
|
91
83
|
'perfectionist/sort-imports': [
|
|
92
84
|
'error',
|
|
93
85
|
{
|
|
@@ -100,6 +92,7 @@ export const configRecommended = typescriptEslint.config({
|
|
|
100
92
|
]
|
|
101
93
|
}
|
|
102
94
|
],
|
|
95
|
+
|
|
103
96
|
'@typescript-eslint/naming-convention': [
|
|
104
97
|
'error',
|
|
105
98
|
{
|
|
@@ -144,7 +137,6 @@ export const configRecommended = typescriptEslint.config({
|
|
|
144
137
|
format: null
|
|
145
138
|
}
|
|
146
139
|
],
|
|
147
|
-
|
|
148
140
|
'@typescript-eslint/no-for-in-array': ['error'],
|
|
149
141
|
'@typescript-eslint/no-implied-eval': ['error'],
|
|
150
142
|
'@typescript-eslint/no-loop-func': ['error'],
|
|
@@ -160,6 +152,7 @@ export const configRecommended = typescriptEslint.config({
|
|
|
160
152
|
}
|
|
161
153
|
],
|
|
162
154
|
'@typescript-eslint/prefer-optional-chain': ['error'],
|
|
155
|
+
|
|
163
156
|
'prefer-arrow/prefer-arrow-functions': ['error']
|
|
164
157
|
}
|
|
165
158
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siemens/eslint-config-typescript",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Configuration for linting TypeScript using typescript-eslint.",
|
|
5
5
|
"files": [
|
|
6
6
|
"*.mjs",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@eslint/js": "^9.9.1",
|
|
30
30
|
"eslint": "^9.9.1",
|
|
31
|
-
"eslint-plugin-jsdoc": "^50.2.2",
|
|
32
31
|
"eslint-plugin-perfectionist": "^4.6.0",
|
|
33
32
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
34
33
|
"typescript-eslint": "^8.0.0"
|