@typescript-eslint/eslint-plugin 6.2.1-alpha.3 → 6.2.1-alpha.30

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 (66) hide show
  1. package/dist/rules/consistent-type-imports.js +13 -19
  2. package/dist/rules/consistent-type-imports.js.map +1 -1
  3. package/dist/rules/indent.js +13 -15
  4. package/dist/rules/indent.js.map +1 -1
  5. package/dist/rules/key-spacing.js +3 -9
  6. package/dist/rules/key-spacing.js.map +1 -1
  7. package/dist/rules/no-floating-promises.js +14 -30
  8. package/dist/rules/no-floating-promises.js.map +1 -1
  9. package/dist/rules/no-inferrable-types.js +9 -4
  10. package/dist/rules/no-inferrable-types.js.map +1 -1
  11. package/dist/rules/no-shadow.js +3 -5
  12. package/dist/rules/no-shadow.js.map +1 -1
  13. package/dist/rules/non-nullable-type-assertion-style.js +1 -3
  14. package/dist/rules/non-nullable-type-assertion-style.js.map +1 -1
  15. package/dist/rules/prefer-optional-chain-utils/analyzeChain.js +7 -9
  16. package/dist/rules/prefer-optional-chain-utils/analyzeChain.js.map +1 -1
  17. package/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js +5 -7
  18. package/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js.map +1 -1
  19. package/dist/rules/prefer-string-starts-ends-with.js +5 -3
  20. package/dist/rules/prefer-string-starts-ends-with.js.map +1 -1
  21. package/dist/rules/return-await.js +4 -6
  22. package/dist/rules/return-await.js.map +1 -1
  23. package/dist/rules/type-annotation-spacing.js +2 -6
  24. package/dist/rules/type-annotation-spacing.js.map +1 -1
  25. package/dist/util/misc.js +4 -6
  26. package/dist/util/misc.js.map +1 -1
  27. package/docs/rules/block-spacing.md +0 -2
  28. package/docs/rules/brace-style.md +0 -2
  29. package/docs/rules/class-methods-use-this.md +0 -2
  30. package/docs/rules/comma-dangle.md +0 -2
  31. package/docs/rules/comma-spacing.md +0 -2
  32. package/docs/rules/default-param-last.md +0 -2
  33. package/docs/rules/dot-notation.md +0 -2
  34. package/docs/rules/func-call-spacing.md +0 -2
  35. package/docs/rules/indent.md +0 -2
  36. package/docs/rules/init-declarations.md +0 -2
  37. package/docs/rules/key-spacing.md +1 -3
  38. package/docs/rules/keyword-spacing.md +1 -3
  39. package/docs/rules/lines-around-comment.md +0 -2
  40. package/docs/rules/lines-between-class-members.md +0 -4
  41. package/docs/rules/no-array-constructor.md +0 -2
  42. package/docs/rules/no-dupe-class-members.md +0 -2
  43. package/docs/rules/no-duplicate-type-constituents.md +0 -2
  44. package/docs/rules/no-empty-function.md +0 -2
  45. package/docs/rules/no-extra-parens.md +0 -2
  46. package/docs/rules/no-extra-semi.md +0 -2
  47. package/docs/rules/no-floating-promises.md +1 -1
  48. package/docs/rules/no-invalid-this.md +0 -2
  49. package/docs/rules/no-loop-func.md +0 -2
  50. package/docs/rules/no-loss-of-precision.md +0 -2
  51. package/docs/rules/no-magic-numbers.md +0 -2
  52. package/docs/rules/no-redeclare.md +0 -2
  53. package/docs/rules/no-restricted-imports.md +0 -2
  54. package/docs/rules/no-shadow.md +0 -2
  55. package/docs/rules/no-unused-expressions.md +0 -2
  56. package/docs/rules/no-unused-vars.md +0 -2
  57. package/docs/rules/no-use-before-define.md +0 -2
  58. package/docs/rules/no-useless-constructor.md +0 -2
  59. package/docs/rules/object-curly-spacing.md +0 -2
  60. package/docs/rules/padding-line-between-statements.md +0 -2
  61. package/docs/rules/quotes.md +0 -2
  62. package/docs/rules/require-await.md +2 -2
  63. package/docs/rules/semi.md +0 -4
  64. package/docs/rules/space-before-blocks.md +0 -2
  65. package/docs/rules/space-before-function-paren.md +0 -2
  66. package/package.json +7 -7
@@ -6,7 +6,5 @@ description: 'Disallow function declarations that contain unsafe references insi
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-loop-func** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-loop-func`](https://eslint.org/docs/rules/no-loop-func) rule.
12
10
  It adds support for TypeScript types.
@@ -6,7 +6,5 @@ description: 'Disallow literal numbers that lose precision.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-loss-of-precision** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-loss-of-precision`](https://eslint.org/docs/rules/no-loss-of-precision) rule.
12
10
  It adds support for [numeric separators](https://github.com/tc39/proposal-numeric-separator).
@@ -6,8 +6,6 @@ description: 'Disallow magic numbers.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-magic-numbers** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-magic-numbers`](https://eslint.org/docs/rules/no-magic-numbers) rule.
12
10
  It adds support for:
13
11
 
@@ -6,8 +6,6 @@ description: 'Disallow variable redeclaration.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-redeclare** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-redeclare`](https://eslint.org/docs/rules/no-redeclare) rule.
12
10
  It adds support for TypeScript function overloads, and declaration merging.
13
11
 
@@ -6,8 +6,6 @@ description: 'Disallow specified modules when loaded by `import`.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-restricted-imports** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-restricted-imports`](https://eslint.org/docs/rules/no-restricted-imports) rule.
12
10
 
13
11
  ## Options
@@ -6,8 +6,6 @@ description: 'Disallow variable declarations from shadowing variables declared i
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-shadow** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-shadow`](https://eslint.org/docs/rules/no-shadow) rule.
12
10
  It adds support for TypeScript's `this` parameters and global augmentation, and adds options for TypeScript features.
13
11
 
@@ -6,7 +6,5 @@ description: 'Disallow unused expressions.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-unused-expressions** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-unused-expressions`](https://eslint.org/docs/rules/no-unused-expressions) rule.
12
10
  It adds support for optional call expressions `x?.()`, and directive in module declarations.
@@ -6,7 +6,5 @@ description: 'Disallow unused variables.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-unused-vars** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-unused-vars`](https://eslint.org/docs/rules/no-unused-vars) rule.
12
10
  It adds support for TypeScript features, such as types.
@@ -6,8 +6,6 @@ description: 'Disallow the use of variables before they are defined.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-use-before-define** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-use-before-define`](https://eslint.org/docs/rules/no-use-before-define) rule.
12
10
  It adds support for `type`, `interface` and `enum` declarations.
13
11
 
@@ -6,8 +6,6 @@ description: 'Disallow unnecessary constructors.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-useless-constructor** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-useless-constructor`](https://eslint.org/docs/rules/no-useless-constructor) rule.
12
10
  It adds support for:
13
11
 
@@ -6,7 +6,5 @@ description: 'Enforce consistent spacing inside braces.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/object-curly-spacing** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/object-curly-spacing`](https://eslint.org/docs/rules/object-curly-spacing) rule.
12
10
  It adds support for TypeScript's object types.
@@ -6,8 +6,6 @@ description: 'Require or disallow padding lines between statements.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/padding-line-between-statements** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) rule.
12
10
  It adds support for TypeScript constructs such as `interface` and `type`.
13
11
 
@@ -6,7 +6,5 @@ description: 'Enforce the consistent use of either backticks, double, or single
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/quotes** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/quotes`](https://eslint.org/docs/rules/quotes) rule.
12
10
  It adds support for TypeScript features which allow quoted names, but not backtick quoted names.
@@ -6,11 +6,11 @@ description: 'Disallow async functions which have no `await` expression.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/require-await** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/require-await`](https://eslint.org/docs/rules/require-await) rule.
12
10
  It uses type information to add support for `async` functions that return a `Promise`.
13
11
 
12
+ ## Examples
13
+
14
14
  Examples of **correct** code for this rule:
15
15
 
16
16
  ```ts
@@ -6,10 +6,6 @@ description: 'Require or disallow semicolons instead of ASI.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/semi** for documentation.
8
8
 
9
- This rule enforces consistent use of semicolons after statements.
10
-
11
- ## Examples
12
-
13
9
  This rule extends the base [`eslint/semi`](https://eslint.org/docs/rules/semi) rule.
14
10
  It adds support for TypeScript features that require semicolons.
15
11
 
@@ -6,8 +6,6 @@ description: 'Enforce consistent spacing before blocks.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/space-before-blocks** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/space-before-blocks`](https://eslint.org/docs/rules/space-before-blocks) rule.
12
10
  It adds support for interfaces and enums.
13
11
 
@@ -6,7 +6,5 @@ description: 'Enforce consistent spacing before function parenthesis.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/space-before-function-paren** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/space-before-function-paren`](https://eslint.org/docs/rules/space-before-function-paren) rule.
12
10
  It adds support for generic type parameters on function calls.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "6.2.1-alpha.3+abc2b4726",
3
+ "version": "6.2.1-alpha.30+34bfb5c7b",
4
4
  "description": "TypeScript plugin for ESLint",
5
5
  "files": [
6
6
  "dist",
@@ -57,10 +57,10 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@eslint-community/regexpp": "^4.5.1",
60
- "@typescript-eslint/scope-manager": "6.2.1-alpha.3+abc2b4726",
61
- "@typescript-eslint/type-utils": "6.2.1-alpha.3+abc2b4726",
62
- "@typescript-eslint/utils": "6.2.1-alpha.3+abc2b4726",
63
- "@typescript-eslint/visitor-keys": "6.2.1-alpha.3+abc2b4726",
60
+ "@typescript-eslint/scope-manager": "6.2.1-alpha.30+34bfb5c7b",
61
+ "@typescript-eslint/type-utils": "6.2.1-alpha.30+34bfb5c7b",
62
+ "@typescript-eslint/utils": "6.2.1-alpha.30+34bfb5c7b",
63
+ "@typescript-eslint/visitor-keys": "6.2.1-alpha.30+34bfb5c7b",
64
64
  "debug": "^4.3.4",
65
65
  "graphemer": "^1.4.0",
66
66
  "ignore": "^5.2.4",
@@ -75,7 +75,7 @@
75
75
  "@types/natural-compare": "*",
76
76
  "@types/prettier": "*",
77
77
  "@typescript-eslint/rule-schema-to-typescript-types": "6.2.0",
78
- "@typescript-eslint/rule-tester": "6.2.1-alpha.3+abc2b4726",
78
+ "@typescript-eslint/rule-tester": "6.2.1-alpha.30+34bfb5c7b",
79
79
  "ajv": "^6.12.6",
80
80
  "chalk": "^5.3.0",
81
81
  "cross-fetch": "*",
@@ -100,5 +100,5 @@
100
100
  "type": "opencollective",
101
101
  "url": "https://opencollective.com/typescript-eslint"
102
102
  },
103
- "gitHead": "abc2b47269abb1408cd72a6adb9d486678e94170"
103
+ "gitHead": "34bfb5c7b599ec794dfd0042f94cb7ce1021a84b"
104
104
  }