@perfective/eslint-config 0.21.0-beta.3 → 0.22.0-alpha

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.adoc CHANGED
@@ -100,6 +100,7 @@ module.exports = {
100
100
  If more directories or file types need to be ignored, see the
101
101
  `link:https://eslint.org/docs/user-guide/configuring/ignoring-code#the-eslintignore-file[.eslintignore]` file docs.
102
102
 
103
+
103
104
  == Rules Configuration Extension Functions
104
105
 
105
106
  Some rules have complex configuration objects or arrays
@@ -129,6 +130,7 @@ module.exports = {
129
130
  <1> Framework-specific packages, based on `@perfective/eslint-config`, re-export all the rules.
130
131
  So rules should be required from those packages for correct `node_modules` resolution.
131
132
 
133
+
132
134
  === Supported Rules
133
135
 
134
136
  * `simpleImportSortImports(internal)`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perfective/eslint-config",
3
- "version": "0.21.0-beta.3",
3
+ "version": "0.22.0-alpha",
4
4
  "description": "ESLint shareable rules configuration",
5
5
  "keywords": ["code quality", "code standard", "code style", "eslint", "eslint config", "lint", "perfective", "tslint", "tslint config", "typescript"],
6
6
  "author": "Andrey Mikheychik <a.mikheychik@gmail.com>",
@@ -12,9 +12,9 @@
12
12
  "license": "MIT",
13
13
  "peerDependencies": {
14
14
  "@babel/eslint-parser": "^7.22.9",
15
- "@typescript-eslint/eslint-plugin": "^5.62.0",
16
- "@typescript-eslint/eslint-plugin-tslint": "^5.62.0",
17
- "@typescript-eslint/parser": "^5.62.0",
15
+ "@typescript-eslint/eslint-plugin": "^6.2.1",
16
+ "@typescript-eslint/eslint-plugin-tslint": "^6.2.1",
17
+ "@typescript-eslint/parser": "^6.2.1",
18
18
  "eslint": "^8.46.0",
19
19
  "eslint-import-resolver-typescript": "^3.5.5",
20
20
  "eslint-plugin-array-func": "^3.1.8",
@@ -23,15 +23,15 @@
23
23
  "eslint-plugin-eslint-comments": "^3.2.0",
24
24
  "eslint-plugin-import": "^2.28.0",
25
25
  "eslint-plugin-jest": "^27.2.3",
26
- "eslint-plugin-jest-dom": "^4.0.3",
26
+ "eslint-plugin-jest-dom": "^5.0.2",
27
27
  "eslint-plugin-jest-formatting": "^3.1.0",
28
- "eslint-plugin-jsdoc": "^46.4.5",
28
+ "eslint-plugin-jsdoc": "^46.4.6",
29
29
  "eslint-plugin-node": "^11.1.0",
30
30
  "eslint-plugin-prefer-arrow": "^1.2.3",
31
31
  "eslint-plugin-promise": "^6.1.1",
32
32
  "eslint-plugin-rxjs": "^5.0.3",
33
33
  "eslint-plugin-simple-import-sort": "^10.0.0",
34
- "eslint-plugin-sonarjs": "^0.19.0",
34
+ "eslint-plugin-sonarjs": "^0.20.0",
35
35
  "eslint-plugin-testing-library": "^5.11.0",
36
36
  "eslint-plugin-unicorn": "^48.0.1",
37
37
  "tslint": "^6.1.3"
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  module.exports = {
3
3
  rules: {
4
+ 'block-spacing': 'off',
5
+ '@typescript-eslint/block-spacing': ['warn', 'always'],
4
6
  'brace-style': 'off',
5
7
  '@typescript-eslint/brace-style': ['warn', 'stroustrup', {
6
8
  allowSingleLine: false,
7
9
  }],
10
+ 'class-methods-use-this': 'off',
11
+ '@typescript-eslint/class-methods-use-this': 'off',
8
12
  'comma-dangle': 'off',
9
13
  '@typescript-eslint/comma-dangle': ['warn', {
10
14
  arrays: 'always-multiline',
@@ -80,9 +84,6 @@ module.exports = {
80
84
  'no-dupe-class-members': 'off',
81
85
  '@typescript-eslint/no-dupe-class-members': 'error',
82
86
  'no-duplicate-imports': 'off',
83
- '@typescript-eslint/no-duplicate-imports': ['off', {
84
- includeExports: true,
85
- }],
86
87
  'no-empty-function': 'off',
87
88
  '@typescript-eslint/no-empty-function': ['error', {
88
89
  allow: ['protected-constructors', 'private-constructors'],
@@ -108,9 +109,7 @@ module.exports = {
108
109
  'no-redeclare': 'off',
109
110
  '@typescript-eslint/no-redeclare': 'error',
110
111
  'no-restricted-imports': 'off',
111
- '@typescript-eslint/no-restricted-imports': ['error', {
112
- allowTypeImports: false,
113
- }],
112
+ '@typescript-eslint/no-restricted-imports': ['error', {}],
114
113
  'no-shadow': 'off',
115
114
  '@typescript-eslint/no-shadow': 'off',
116
115
  'no-throw-literal': 'off',
@@ -13,7 +13,6 @@ const functionality = {
13
13
  'allow-object-equal-comparison': true,
14
14
  'allow-string-order-comparison': true,
15
15
  }],
16
- 'strict-type-predicates': true,
17
16
  };
18
17
  const maintainability = {
19
18
  'no-default-import': true,
@@ -146,9 +146,6 @@ module.exports = {
146
146
  }],
147
147
  '@typescript-eslint/no-floating-promises': 'error',
148
148
  '@typescript-eslint/no-for-in-array': 'error',
149
- '@typescript-eslint/no-implicit-any-catch': ['error', {
150
- allowExplicitAny: false,
151
- }],
152
149
  '@typescript-eslint/no-import-type-side-effects': 'warn',
153
150
  '@typescript-eslint/no-inferrable-types': 'off',
154
151
  '@typescript-eslint/no-invalid-void-type': ['error', {
@@ -167,7 +164,6 @@ module.exports = {
167
164
  '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
168
165
  '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
169
166
  '@typescript-eslint/no-non-null-assertion': 'error',
170
- '@typescript-eslint/no-parameter-properties': 'off',
171
167
  '@typescript-eslint/no-redundant-type-constituents': 'error',
172
168
  '@typescript-eslint/no-require-imports': 'error',
173
169
  '@typescript-eslint/no-this-alias': 'error',
@@ -188,6 +184,7 @@ module.exports = {
188
184
  '@typescript-eslint/no-unsafe-enum-comparison': 'error',
189
185
  '@typescript-eslint/no-unsafe-member-access': 'error',
190
186
  '@typescript-eslint/no-unsafe-return': 'error',
187
+ '@typescript-eslint/no-useless-empty-export': 'warn',
191
188
  '@typescript-eslint/no-var-requires': 'error',
192
189
  '@typescript-eslint/non-nullable-type-assertion-style': 'error',
193
190
  '@typescript-eslint/parameter-properties': ['error', {
@@ -213,7 +210,15 @@ module.exports = {
213
210
  string: false,
214
211
  },
215
212
  }],
216
- '@typescript-eslint/prefer-optional-chain': 'error',
213
+ '@typescript-eslint/prefer-optional-chain': ['error', {
214
+ checkAny: true,
215
+ checkUnknown: true,
216
+ checkString: true,
217
+ checkNumber: true,
218
+ checkBoolean: true,
219
+ checkBigInt: true,
220
+ requireNullish: false,
221
+ }],
217
222
  '@typescript-eslint/prefer-readonly': 'warn',
218
223
  '@typescript-eslint/prefer-readonly-parameter-types': 'off',
219
224
  '@typescript-eslint/prefer-reduce-type-parameter': 'warn',
@@ -233,7 +238,7 @@ module.exports = {
233
238
  allowNullish: false,
234
239
  allowNumberAndString: false,
235
240
  allowRegExp: false,
236
- checkCompoundAssignments: true,
241
+ skipCompoundAssignments: false,
237
242
  }],
238
243
  '@typescript-eslint/restrict-template-expressions': ['error', {
239
244
  allowAny: false,
@@ -243,24 +248,7 @@ module.exports = {
243
248
  allowRegExp: false,
244
249
  allowNever: false,
245
250
  }],
246
- '@typescript-eslint/sort-type-union-intersection-members': ['off', {
247
- checkIntersections: true,
248
- checkUnions: true,
249
- groupOrder: [
250
- 'named',
251
- 'keyword',
252
- 'operator',
253
- 'literal',
254
- 'function',
255
- 'import',
256
- 'conditional',
257
- 'object',
258
- 'tuple',
259
- 'intersection',
260
- 'union',
261
- 'nullish',
262
- ],
263
- }],
251
+ '@typescript-eslint/sort-type-constituents': 'off',
264
252
  '@typescript-eslint/strict-boolean-expressions': ['error', {
265
253
  allowString: false,
266
254
  allowNumber: false,
@@ -294,6 +282,5 @@ module.exports = {
294
282
  '@typescript-eslint/unified-signatures': ['error', {
295
283
  ignoreDifferentlyNamedParameters: true,
296
284
  }],
297
- '@typescript-eslint/no-useless-empty-export': 'warn',
298
285
  },
299
286
  };