@perfective/eslint-config 0.18.0 → 0.19.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perfective/eslint-config",
3
- "version": "0.18.0",
3
+ "version": "0.19.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>",
@@ -11,29 +11,29 @@
11
11
  },
12
12
  "license": "MIT",
13
13
  "peerDependencies": {
14
- "@babel/eslint-parser": "^7.18.9",
15
- "@typescript-eslint/eslint-plugin": "^5.31.0",
16
- "@typescript-eslint/eslint-plugin-tslint": "^5.31.0",
17
- "@typescript-eslint/parser": "^5.31.0",
18
- "eslint": "^8.20.0",
19
- "eslint-import-resolver-typescript": "~3.3.0",
14
+ "@babel/eslint-parser": "^7.19.1",
15
+ "@typescript-eslint/eslint-plugin": "^5.40.0",
16
+ "@typescript-eslint/eslint-plugin-tslint": "^5.40.0",
17
+ "@typescript-eslint/parser": "^5.40.0",
18
+ "eslint": "^8.25.0",
19
+ "eslint-import-resolver-typescript": "^3.5.1",
20
20
  "eslint-plugin-array-func": "^3.1.7",
21
21
  "eslint-plugin-cypress": "^2.12.1",
22
22
  "eslint-plugin-deprecation": "^1.3.2",
23
23
  "eslint-plugin-eslint-comments": "^3.2.0",
24
24
  "eslint-plugin-import": "^2.26.0",
25
- "eslint-plugin-jest": "^26.6.0",
25
+ "eslint-plugin-jest": "^27.1.1",
26
26
  "eslint-plugin-jest-dom": "^4.0.2",
27
27
  "eslint-plugin-jest-formatting": "^3.1.0",
28
- "eslint-plugin-jsdoc": "^39.3.3",
28
+ "eslint-plugin-jsdoc": "^39.3.6",
29
29
  "eslint-plugin-node": "^11.1.0",
30
30
  "eslint-plugin-prefer-arrow": "^1.2.3",
31
- "eslint-plugin-promise": "^6.0.0",
31
+ "eslint-plugin-promise": "^6.0.1",
32
32
  "eslint-plugin-rxjs": "^5.0.2",
33
- "eslint-plugin-simple-import-sort": "^7.0.0",
34
- "eslint-plugin-sonarjs": "^0.14.0",
35
- "eslint-plugin-testing-library": "^5.5.1",
36
- "eslint-plugin-unicorn": "^43.0.2",
33
+ "eslint-plugin-simple-import-sort": "^8.0.0",
34
+ "eslint-plugin-sonarjs": "^0.16.0",
35
+ "eslint-plugin-testing-library": "^5.7.2",
36
+ "eslint-plugin-unicorn": "^44.0.2",
37
37
  "tslint": "^6.1.3"
38
38
  },
39
39
  "main": "./index.js",
@@ -30,6 +30,9 @@ module.exports = {
30
30
  'id-length': 'off',
31
31
  'id-match': 'off',
32
32
  'init-declarations': ['error', 'always'],
33
+ 'logical-assignment-operators': ['warn', 'always', {
34
+ enforceForIfStatements: true,
35
+ }],
33
36
  'max-classes-per-file': ['error', 1],
34
37
  'max-depth': ['error', 4],
35
38
  'max-lines': 'off',
@@ -36,9 +36,9 @@ module.exports = {
36
36
  'jest/no-if': 'off',
37
37
  'jest/no-interpolation-in-snapshots': 'error',
38
38
  'jest/no-jasmine-globals': 'warn',
39
- 'jest/no-jest-import': 'error',
40
39
  'jest/no-large-snapshots': 'error',
41
40
  'jest/no-mocks-import': 'error',
41
+ 'jest/no-restricted-jest-methods': 'off',
42
42
  'jest/no-restricted-matchers': ['error', {
43
43
  resolves: 'Use `expect(await promise)` instead.',
44
44
  toBeFalsy: 'Avoid `toBeFalsy`',
@@ -51,6 +51,7 @@ module.exports = {
51
51
  'jest/no-test-return-statement': 'error',
52
52
  'jest/prefer-called-with': 'error',
53
53
  'jest/prefer-comparison-matcher': 'warn',
54
+ 'jest/prefer-each': 'error',
54
55
  'jest/prefer-equality-matcher': 'error',
55
56
  'jest/prefer-expect-assertions': 'off',
56
57
  'jest/prefer-expect-resolves': 'warn',
@@ -61,6 +62,7 @@ module.exports = {
61
62
  ignore: [],
62
63
  ignoreTopLevelDescribe: true,
63
64
  }],
65
+ 'jest/prefer-mock-promise-shorthand': 'warn',
64
66
  'jest/prefer-snapshot-hint': ['error', 'always'],
65
67
  'jest/prefer-spy-on': 'warn',
66
68
  'jest/prefer-strict-equal': 'warn',
@@ -5,6 +5,7 @@ function simpleImportSortImports(internal = []) {
5
5
  return {
6
6
  groups: [
7
7
  sideEffects(),
8
+ nodePrefixedModules(),
8
9
  unscopedPackages(),
9
10
  scopedPackages(internal),
10
11
  ...internalPackages(internal),
@@ -18,6 +19,9 @@ exports.simpleImportSortImports = simpleImportSortImports;
18
19
  function sideEffects() {
19
20
  return ['^\\u0000'];
20
21
  }
22
+ function nodePrefixedModules() {
23
+ return ['^node:'];
24
+ }
21
25
  function unscopedPackages() {
22
26
  return ['^[a-zA-Z]'];
23
27
  }
@@ -108,7 +108,11 @@ module.exports = {
108
108
  '@typescript-eslint/no-use-before-define': ['error', {
109
109
  functions: false,
110
110
  classes: false,
111
+ variables: false,
112
+ allowNamedExports: false,
113
+ enums: false,
111
114
  typedefs: false,
115
+ ignoreTypeReferences: false,
112
116
  }],
113
117
  'no-useless-constructor': 'off',
114
118
  '@typescript-eslint/no-useless-constructor': 'error',
@@ -54,6 +54,7 @@ module.exports = {
54
54
  'unicorn/no-static-only-class': 'error',
55
55
  'unicorn/no-thenable': 'error',
56
56
  'unicorn/no-this-assignment': 'error',
57
+ 'unicorn/no-unnecessary-await': 'warn',
57
58
  'unicorn/no-unreadable-array-destructuring': 'error',
58
59
  'unicorn/no-unreadable-iife': 'error',
59
60
  'unicorn/no-unsafe-regex': 'error',
@@ -142,6 +143,7 @@ module.exports = {
142
143
  'unicorn/require-number-to-fixed-digits-argument': 'warn',
143
144
  'unicorn/require-post-message-target-origin': 'error',
144
145
  'unicorn/string-content': 'off',
146
+ 'unicorn/switch-case-braces': 'off',
145
147
  'unicorn/template-indent': 'warn',
146
148
  'unicorn/text-encoding-identifier-case': 'error',
147
149
  'unicorn/throw-new-error': 'warn',