@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.
- package/dist/rules/consistent-type-imports.js +13 -19
- package/dist/rules/consistent-type-imports.js.map +1 -1
- package/dist/rules/indent.js +13 -15
- package/dist/rules/indent.js.map +1 -1
- package/dist/rules/key-spacing.js +3 -9
- package/dist/rules/key-spacing.js.map +1 -1
- package/dist/rules/no-floating-promises.js +14 -30
- package/dist/rules/no-floating-promises.js.map +1 -1
- package/dist/rules/no-inferrable-types.js +9 -4
- package/dist/rules/no-inferrable-types.js.map +1 -1
- package/dist/rules/no-shadow.js +3 -5
- package/dist/rules/no-shadow.js.map +1 -1
- package/dist/rules/non-nullable-type-assertion-style.js +1 -3
- package/dist/rules/non-nullable-type-assertion-style.js.map +1 -1
- package/dist/rules/prefer-optional-chain-utils/analyzeChain.js +7 -9
- package/dist/rules/prefer-optional-chain-utils/analyzeChain.js.map +1 -1
- package/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js +5 -7
- package/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js.map +1 -1
- package/dist/rules/prefer-string-starts-ends-with.js +5 -3
- package/dist/rules/prefer-string-starts-ends-with.js.map +1 -1
- package/dist/rules/return-await.js +4 -6
- package/dist/rules/return-await.js.map +1 -1
- package/dist/rules/type-annotation-spacing.js +2 -6
- package/dist/rules/type-annotation-spacing.js.map +1 -1
- package/dist/util/misc.js +4 -6
- package/dist/util/misc.js.map +1 -1
- package/docs/rules/block-spacing.md +0 -2
- package/docs/rules/brace-style.md +0 -2
- package/docs/rules/class-methods-use-this.md +0 -2
- package/docs/rules/comma-dangle.md +0 -2
- package/docs/rules/comma-spacing.md +0 -2
- package/docs/rules/default-param-last.md +0 -2
- package/docs/rules/dot-notation.md +0 -2
- package/docs/rules/func-call-spacing.md +0 -2
- package/docs/rules/indent.md +0 -2
- package/docs/rules/init-declarations.md +0 -2
- package/docs/rules/key-spacing.md +1 -3
- package/docs/rules/keyword-spacing.md +1 -3
- package/docs/rules/lines-around-comment.md +0 -2
- package/docs/rules/lines-between-class-members.md +0 -4
- package/docs/rules/no-array-constructor.md +0 -2
- package/docs/rules/no-dupe-class-members.md +0 -2
- package/docs/rules/no-duplicate-type-constituents.md +0 -2
- package/docs/rules/no-empty-function.md +0 -2
- package/docs/rules/no-extra-parens.md +0 -2
- package/docs/rules/no-extra-semi.md +0 -2
- package/docs/rules/no-floating-promises.md +1 -1
- package/docs/rules/no-invalid-this.md +0 -2
- package/docs/rules/no-loop-func.md +0 -2
- package/docs/rules/no-loss-of-precision.md +0 -2
- package/docs/rules/no-magic-numbers.md +0 -2
- package/docs/rules/no-redeclare.md +0 -2
- package/docs/rules/no-restricted-imports.md +0 -2
- package/docs/rules/no-shadow.md +0 -2
- package/docs/rules/no-unused-expressions.md +0 -2
- package/docs/rules/no-unused-vars.md +0 -2
- package/docs/rules/no-use-before-define.md +0 -2
- package/docs/rules/no-useless-constructor.md +0 -2
- package/docs/rules/object-curly-spacing.md +0 -2
- package/docs/rules/padding-line-between-statements.md +0 -2
- package/docs/rules/quotes.md +0 -2
- package/docs/rules/require-await.md +2 -2
- package/docs/rules/semi.md +0 -4
- package/docs/rules/space-before-blocks.md +0 -2
- package/docs/rules/space-before-function-paren.md +0 -2
- 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
|
package/docs/rules/no-shadow.md
CHANGED
|
@@ -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
|
|
package/docs/rules/quotes.md
CHANGED
|
@@ -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
|
package/docs/rules/semi.md
CHANGED
|
@@ -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
|
+
"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.
|
|
61
|
-
"@typescript-eslint/type-utils": "6.2.1-alpha.
|
|
62
|
-
"@typescript-eslint/utils": "6.2.1-alpha.
|
|
63
|
-
"@typescript-eslint/visitor-keys": "6.2.1-alpha.
|
|
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.
|
|
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": "
|
|
103
|
+
"gitHead": "34bfb5c7b599ec794dfd0042f94cb7ce1021a84b"
|
|
104
104
|
}
|