@typescript-eslint/utils 7.17.1-alpha.8 → 7.18.0
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.
|
@@ -126,7 +126,7 @@ declare class RuleTesterBase {
|
|
|
126
126
|
* Adds a new rule test to execute.
|
|
127
127
|
* @param ruleName The name of the rule to run.
|
|
128
128
|
* @param rule The rule to test.
|
|
129
|
-
* @param
|
|
129
|
+
* @param tests The collection of tests to run.
|
|
130
130
|
*/
|
|
131
131
|
run<MessageIds extends string, Options extends readonly unknown[]>(ruleName: string, rule: RuleModule<MessageIds, Options>, tests: RunTests<MessageIds, Options>): void;
|
|
132
132
|
/**
|
|
@@ -30,7 +30,7 @@ declare class TokenStore {
|
|
|
30
30
|
/**
|
|
31
31
|
* Gets the first token of the given node.
|
|
32
32
|
* @param node The AST node.
|
|
33
|
-
* @param
|
|
33
|
+
* @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
|
|
34
34
|
* @returns An object representing the token.
|
|
35
35
|
*/
|
|
36
36
|
getFirstToken<T extends SourceCode.CursorWithSkipOptions>(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions<T> | null;
|
|
@@ -38,7 +38,7 @@ declare class TokenStore {
|
|
|
38
38
|
* Gets the first token between two non-overlapping nodes.
|
|
39
39
|
* @param left Node before the desired token range.
|
|
40
40
|
* @param right Node after the desired token range.
|
|
41
|
-
* @param
|
|
41
|
+
* @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
|
|
42
42
|
* @returns An object representing the token.
|
|
43
43
|
*/
|
|
44
44
|
getFirstTokenBetween<T extends SourceCode.CursorWithSkipOptions>(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions<T> | null;
|
|
@@ -59,7 +59,7 @@ declare class TokenStore {
|
|
|
59
59
|
/**
|
|
60
60
|
* Gets the last token of the given node.
|
|
61
61
|
* @param node The AST node.
|
|
62
|
-
* @param
|
|
62
|
+
* @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
|
|
63
63
|
* @returns An object representing the token.
|
|
64
64
|
*/
|
|
65
65
|
getLastToken<T extends SourceCode.CursorWithSkipOptions>(node: TSESTree.Node, options?: T): SourceCode.ReturnTypeFromOptions<T> | null;
|
|
@@ -67,7 +67,7 @@ declare class TokenStore {
|
|
|
67
67
|
* Gets the last token between two non-overlapping nodes.
|
|
68
68
|
* @param left Node before the desired token range.
|
|
69
69
|
* @param right Node after the desired token range.
|
|
70
|
-
* @param
|
|
70
|
+
* @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
|
|
71
71
|
* @returns An object representing the token.
|
|
72
72
|
*/
|
|
73
73
|
getLastTokenBetween<T extends SourceCode.CursorWithSkipOptions>(left: TSESTree.Node | TSESTree.Token, right: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions<T> | null;
|
|
@@ -88,7 +88,7 @@ declare class TokenStore {
|
|
|
88
88
|
/**
|
|
89
89
|
* Gets the token that follows a given node or token.
|
|
90
90
|
* @param node The AST node or token.
|
|
91
|
-
* @param
|
|
91
|
+
* @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
|
|
92
92
|
* @returns An object representing the token.
|
|
93
93
|
*/
|
|
94
94
|
getTokenAfter<T extends SourceCode.CursorWithSkipOptions>(node: TSESTree.Node | TSESTree.Token, options?: T): SourceCode.ReturnTypeFromOptions<T> | null;
|
|
@@ -102,7 +102,7 @@ declare class TokenStore {
|
|
|
102
102
|
/**
|
|
103
103
|
* Gets the token starting at the specified index.
|
|
104
104
|
* @param offset Index of the start of the token's range.
|
|
105
|
-
* @param
|
|
105
|
+
* @param options The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`.
|
|
106
106
|
* @returns The token starting at index, or null if no such token.
|
|
107
107
|
*/
|
|
108
108
|
getTokenByRangeStart<T extends {
|
|
@@ -166,7 +166,7 @@ declare class SourceCodeBase extends TokenStore {
|
|
|
166
166
|
getAllComments(): TSESTree.Comment[];
|
|
167
167
|
/**
|
|
168
168
|
* Converts a (line, column) pair into a range index.
|
|
169
|
-
* @param
|
|
169
|
+
* @param location A line/column location
|
|
170
170
|
* @returns The range index of the location in the file.
|
|
171
171
|
*/
|
|
172
172
|
getIndexFromLoc(location: TSESTree.Position): number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/utils",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.18.0",
|
|
4
4
|
"description": "Utilities for working with TypeScript + ESLint together",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@eslint-community/eslint-utils": "^4.4.0",
|
|
67
|
-
"@typescript-eslint/scope-manager": "7.
|
|
68
|
-
"@typescript-eslint/types": "7.
|
|
69
|
-
"@typescript-eslint/typescript-estree": "7.
|
|
67
|
+
"@typescript-eslint/scope-manager": "7.18.0",
|
|
68
|
+
"@typescript-eslint/types": "7.18.0",
|
|
69
|
+
"@typescript-eslint/typescript-estree": "7.18.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"eslint": "^8.56.0"
|