@siemens/eslint-config-typescript 2.0.0-next.1 → 2.0.0-next.3

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.
Files changed (3) hide show
  1. package/README.md +6 -2
  2. package/index.mjs +10 -29
  3. package/package.json +1 -2
package/README.md CHANGED
@@ -40,6 +40,10 @@ will get changed in the patch releases._
40
40
 
41
41
  ### ESLint
42
42
 
43
+ Our ESLint configurations does not include any formatting rules.
44
+ Please use a formatter like [Prettier](https://prettier.io/)
45
+ or add a formatting ruleset for ESLint like [ESLint Stylistic](https://eslint.style/).
46
+
43
47
  #### TypeScript
44
48
 
45
49
  Include the ESLint preset in your root `eslint.config.mjs`:
@@ -87,7 +91,7 @@ const __filename = fileURLToPath(import.meta.url);
87
91
  const __dirname = path.dirname(__filename);
88
92
 
89
93
  export const tsConfig = typescriptEslint.config({
90
- extends: [...angularTypescriptConfig, prettier],
94
+ extends: [...angularTypescriptConfig],
91
95
  files: ['**/*.ts'],
92
96
  languageOptions: {
93
97
  parserOptions: {
@@ -116,7 +120,7 @@ export const tsConfig = typescriptEslint.config({
116
120
  });
117
121
 
118
122
  export const templateConfig = typescriptEslint.config({
119
- extends: [...angularTemplateConfig, prettier],
123
+ extends: [...angularTemplateConfig],
120
124
  files: ['**/*.html']
121
125
  });
122
126
 
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,13 +35,10 @@ 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
- '@typescript-eslint/brace-style': ['error', '1tbs', { allowSingleLine: true }],
43
- '@typescript-eslint/comma-dangle': ['error'],
44
- '@typescript-eslint/comma-spacing': ['error'],
45
- '@typescript-eslint/func-call-spacing': ['error'],
46
- '@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }],
47
- '@typescript-eslint/keyword-spacing': ['error'],
48
42
  '@typescript-eslint/member-ordering': ['off'],
49
43
  '@typescript-eslint/naming-convention': ['off'],
50
44
  '@typescript-eslint/no-non-null-asserted-optional-chain': ['error'],
@@ -56,10 +50,6 @@ export const configBase = typescriptEslint.config({
56
50
  { vars: 'all', args: 'none', ignoreRestSiblings: false }
57
51
  ],
58
52
  '@typescript-eslint/no-var-requires': ['error'],
59
- '@typescript-eslint/space-infix-ops': ['error'],
60
- '@typescript-eslint/space-before-blocks': ['error'],
61
- '@typescript-eslint/type-annotation-spacing': ['error'],
62
- '@typescript-eslint/object-curly-spacing': ['error', 'always'],
63
53
  '@typescript-eslint/no-explicit-any': ['off'],
64
54
  '@typescript-eslint/no-empty-function': ['off'],
65
55
  '@typescript-eslint/no-inferrable-types': ['error', { ignoreParameters: true }],
@@ -70,35 +60,26 @@ export const configBase = typescriptEslint.config({
70
60
  '@typescript-eslint/prefer-function-type': ['error'],
71
61
  '@typescript-eslint/unified-signatures': ['error'],
72
62
 
73
- 'array-bracket-spacing': ['error'],
74
- 'arrow-parens': ['error', 'as-needed'],
75
- 'arrow-spacing': ['error'],
76
- 'block-spacing': ['error'],
77
- 'curly': ['error'],
78
- 'jsdoc/newline-after-description': ['off'],
79
- 'key-spacing': ['error'],
80
63
  'no-duplicate-imports': ['error'],
81
64
  'no-empty': ['error'],
82
65
  'no-irregular-whitespace': ['error'],
83
- 'no-multi-spaces': ['error'],
84
- 'no-multiple-empty-lines': ['error'],
85
- 'prefer-arrow/prefer-arrow-functions': ['off'],
86
- 'quote-props': ['error', 'consistent'],
87
- 'semi-spacing': ['error'],
88
- 'space-in-parens': ['error'],
89
- 'space-unary-ops': ['error'],
90
66
  'sort-imports': ['error', { ignoreCase: true, ignoreDeclarationSort: true }]
91
67
  }
92
68
  });
93
69
 
94
70
  export const configRecommended = typescriptEslint.config({
95
71
  extends: [...configBase],
72
+ plugins: {
73
+ 'prefer-arrow': preferArrowPlugin
74
+ },
96
75
  languageOptions: {
97
76
  parserOptions: {
98
77
  allowAutomaticSingleRunInference: true
99
78
  }
100
79
  },
101
80
  rules: {
81
+ 'sort-imports': ['off'],
82
+
102
83
  'perfectionist/sort-imports': [
103
84
  'error',
104
85
  {
@@ -111,6 +92,7 @@ export const configRecommended = typescriptEslint.config({
111
92
  ]
112
93
  }
113
94
  ],
95
+
114
96
  '@typescript-eslint/naming-convention': [
115
97
  'error',
116
98
  {
@@ -155,8 +137,6 @@ export const configRecommended = typescriptEslint.config({
155
137
  format: null
156
138
  }
157
139
  ],
158
-
159
- '@typescript-eslint/no-extra-semi': ['error'],
160
140
  '@typescript-eslint/no-for-in-array': ['error'],
161
141
  '@typescript-eslint/no-implied-eval': ['error'],
162
142
  '@typescript-eslint/no-loop-func': ['error'],
@@ -172,6 +152,7 @@ export const configRecommended = typescriptEslint.config({
172
152
  }
173
153
  ],
174
154
  '@typescript-eslint/prefer-optional-chain': ['error'],
155
+
175
156
  'prefer-arrow/prefer-arrow-functions': ['error']
176
157
  }
177
158
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siemens/eslint-config-typescript",
3
- "version": "2.0.0-next.1",
3
+ "version": "2.0.0-next.3",
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"