@typescript-eslint/eslint-plugin 6.2.1-alpha.10 → 6.2.1-alpha.11

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 (39) hide show
  1. package/docs/rules/block-spacing.md +0 -2
  2. package/docs/rules/brace-style.md +0 -2
  3. package/docs/rules/class-methods-use-this.md +0 -2
  4. package/docs/rules/comma-dangle.md +0 -2
  5. package/docs/rules/comma-spacing.md +0 -2
  6. package/docs/rules/default-param-last.md +0 -2
  7. package/docs/rules/dot-notation.md +0 -2
  8. package/docs/rules/func-call-spacing.md +0 -2
  9. package/docs/rules/indent.md +0 -2
  10. package/docs/rules/init-declarations.md +0 -2
  11. package/docs/rules/key-spacing.md +1 -3
  12. package/docs/rules/keyword-spacing.md +1 -3
  13. package/docs/rules/lines-around-comment.md +0 -2
  14. package/docs/rules/lines-between-class-members.md +0 -4
  15. package/docs/rules/no-array-constructor.md +0 -2
  16. package/docs/rules/no-dupe-class-members.md +0 -2
  17. package/docs/rules/no-duplicate-type-constituents.md +0 -2
  18. package/docs/rules/no-empty-function.md +0 -2
  19. package/docs/rules/no-extra-parens.md +0 -2
  20. package/docs/rules/no-extra-semi.md +0 -2
  21. package/docs/rules/no-invalid-this.md +0 -2
  22. package/docs/rules/no-loop-func.md +0 -2
  23. package/docs/rules/no-loss-of-precision.md +0 -2
  24. package/docs/rules/no-magic-numbers.md +0 -2
  25. package/docs/rules/no-redeclare.md +0 -2
  26. package/docs/rules/no-restricted-imports.md +0 -2
  27. package/docs/rules/no-shadow.md +0 -2
  28. package/docs/rules/no-unused-expressions.md +0 -2
  29. package/docs/rules/no-unused-vars.md +0 -2
  30. package/docs/rules/no-use-before-define.md +0 -2
  31. package/docs/rules/no-useless-constructor.md +0 -2
  32. package/docs/rules/object-curly-spacing.md +0 -2
  33. package/docs/rules/padding-line-between-statements.md +0 -2
  34. package/docs/rules/quotes.md +0 -2
  35. package/docs/rules/require-await.md +2 -2
  36. package/docs/rules/semi.md +0 -4
  37. package/docs/rules/space-before-blocks.md +0 -2
  38. package/docs/rules/space-before-function-paren.md +0 -2
  39. package/package.json +7 -7
@@ -6,7 +6,5 @@ description: 'Disallow or enforce spaces inside of blocks after opening block an
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/block-spacing** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/block-spacing`](https://eslint.org/docs/rules/block-spacing) rule.
12
10
  This version adds support for TypeScript related blocks (interfaces, object type literals and enums).
@@ -6,7 +6,5 @@ description: 'Enforce consistent brace style for blocks.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/brace-style** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/brace-style`](https://eslint.org/docs/rules/brace-style) rule.
12
10
  It adds support for `enum`, `interface`, `namespace` and `module` declarations.
@@ -6,8 +6,6 @@ description: 'Enforce that class methods utilize `this`.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/class-methods-use-this** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/class-methods-use-this`](https://eslint.org/docs/rules/class-methods-use-this) rule.
12
10
  It adds support for ignoring `override` methods or methods on classes that implement an interface.
13
11
 
@@ -6,8 +6,6 @@ description: 'Require or disallow trailing commas.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/comma-dangle** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/comma-dangle`](https://eslint.org/docs/rules/comma-dangle) rule.
12
10
  It adds support for TypeScript syntax.
13
11
 
@@ -6,7 +6,5 @@ description: 'Enforce consistent spacing before and after commas.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/comma-spacing** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/comma-spacing`](https://eslint.org/docs/rules/comma-spacing) rule.
12
10
  It adds support for trailing comma in a types parameters list.
@@ -6,8 +6,6 @@ description: 'Enforce default parameters to be last.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/default-param-last** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/default-param-last`](https://eslint.org/docs/rules/default-param-last) rule.
12
10
  It adds support for optional parameters.
13
11
 
@@ -6,8 +6,6 @@ description: 'Enforce dot notation whenever possible.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/dot-notation** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/dot-notation`](https://eslint.org/docs/rules/dot-notation) rule.
12
10
  It adds:
13
11
 
@@ -6,7 +6,5 @@ description: 'Require or disallow spacing between function identifiers and their
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/func-call-spacing** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) rule.
12
10
  It adds support for generic type parameters on function calls.
@@ -14,7 +14,5 @@ Please read [Issue #1824: Problems with the indent rule](https://github.com/type
14
14
 
15
15
  :::
16
16
 
17
- ## Examples
18
-
19
17
  This rule extends the base [`eslint/indent`](https://eslint.org/docs/rules/indent) rule.
20
18
  It adds support for TypeScript nodes.
@@ -6,7 +6,5 @@ description: 'Require or disallow initialization in variable declarations.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/init-declarations** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/init-declarations`](https://eslint.org/docs/rules/init-declarations) rule.
12
10
  It adds support for TypeScript's `declare` variables.
@@ -6,7 +6,5 @@ description: 'Enforce consistent spacing between property names and type annotat
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/key-spacing** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/key-spacing`](https://eslint.org/docs/rules/key-spacing) rule.
12
- This version adds support for type annotations on interfaces, classes and type literals properties.
10
+ It adds support for type annotations on interfaces, classes and type literals properties.
@@ -6,7 +6,5 @@ description: 'Enforce consistent spacing before and after keywords.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/keyword-spacing** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/keyword-spacing`](https://eslint.org/docs/rules/keyword-spacing) rule.
12
- This version adds support for generic type parameters on function calls.
10
+ It adds support for generic type parameters on function calls.
@@ -6,8 +6,6 @@ description: 'Require empty lines around comments.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/lines-around-comment** for documentation.
8
8
 
9
- ## Rule Details
10
-
11
9
  This rule extends the base [`eslint/lines-around-comment`](https://eslint.org/docs/rules/lines-around-comment) rule.
12
10
  It adds support for TypeScript syntax.
13
11
 
@@ -6,10 +6,6 @@ description: 'Require or disallow an empty line between class members.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/lines-between-class-members** for documentation.
8
8
 
9
- This rule improves readability by enforcing lines between class members. It will not check empty lines before the first member and after the last member. This rule will require or disallow an empty line between class members.
10
-
11
- ## Examples
12
-
13
9
  This rule extends the base [`eslint/lines-between-class-members`](https://eslint.org/docs/rules/lines-between-class-members) rule.
14
10
  It adds support for ignoring overload methods in a class.
15
11
 
@@ -6,8 +6,6 @@ description: 'Disallow generic `Array` constructors.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-array-constructor** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-array-constructor`](https://eslint.org/docs/rules/no-array-constructor) rule.
12
10
  It adds support for the generically typed `Array` constructor (`new Array<Foo>()`).
13
11
 
@@ -6,7 +6,5 @@ description: 'Disallow duplicate class members.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-dupe-class-members** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-dupe-class-members`](https://eslint.org/docs/rules/no-dupe-class-members) rule.
12
10
  It adds support for TypeScript's method overload definitions.
@@ -10,8 +10,6 @@ TypeScript supports types ("constituents") within union and intersection types b
10
10
  However, developers typically expect each constituent to be unique within its intersection or union.
11
11
  Duplicate values make the code overly verbose and generally reduce readability.
12
12
 
13
- ## Rule Details
14
-
15
13
  This rule disallows duplicate union or intersection constituents.
16
14
  We consider types to be duplicate if they evaluate to the same result in the type system.
17
15
  For example, given `type A = string` and `type T = string | A`, this rule would flag that `A` is the same type as `string`.
@@ -6,8 +6,6 @@ description: 'Disallow empty functions.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-empty-function** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-empty-function`](https://eslint.org/docs/rules/no-empty-function) rule.
12
10
  It adds support for handling TypeScript specific code that would otherwise trigger the rule.
13
11
 
@@ -6,7 +6,5 @@ description: 'Disallow unnecessary parentheses.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-extra-parens** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-extra-parens`](https://eslint.org/docs/rules/no-extra-parens) rule.
12
10
  It adds support for TypeScript type assertions.
@@ -6,7 +6,5 @@ description: 'Disallow unnecessary semicolons.'
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-extra-semi** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-extra-semi`](https://eslint.org/docs/rules/no-extra-semi) rule.
12
10
  It adds support for class properties.
@@ -6,7 +6,5 @@ description: 'Disallow `this` keywords outside of classes or class-like objects.
6
6
  >
7
7
  > See **https://typescript-eslint.io/rules/no-invalid-this** for documentation.
8
8
 
9
- ## Examples
10
-
11
9
  This rule extends the base [`eslint/no-invalid-this`](https://eslint.org/docs/rules/no-invalid-this) rule.
12
10
  It adds support for TypeScript's `this` parameters.
@@ -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.10+1b8e0bc60",
3
+ "version": "6.2.1-alpha.11+6addee9b4",
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.10+1b8e0bc60",
61
- "@typescript-eslint/type-utils": "6.2.1-alpha.10+1b8e0bc60",
62
- "@typescript-eslint/utils": "6.2.1-alpha.10+1b8e0bc60",
63
- "@typescript-eslint/visitor-keys": "6.2.1-alpha.10+1b8e0bc60",
60
+ "@typescript-eslint/scope-manager": "6.2.1-alpha.11+6addee9b4",
61
+ "@typescript-eslint/type-utils": "6.2.1-alpha.11+6addee9b4",
62
+ "@typescript-eslint/utils": "6.2.1-alpha.11+6addee9b4",
63
+ "@typescript-eslint/visitor-keys": "6.2.1-alpha.11+6addee9b4",
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.10+1b8e0bc60",
78
+ "@typescript-eslint/rule-tester": "6.2.1-alpha.11+6addee9b4",
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": "1b8e0bc6024525ec4c3c70cdd24f8eeceab37647"
103
+ "gitHead": "6addee9b4ef668cd2e026130083a3a783b327e9e"
104
104
  }