xo 0.46.3 → 0.46.4
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/index.js +5 -10
- package/lib/options-manager.js +108 -86
- package/node_modules/@typescript-eslint/eslint-plugin/CHANGELOG.md +17 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js +4 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +24 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeReadonly.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeReadonly.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/index.js +13 -16
- package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/legacy.js +12 -15
- package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/package.json +6 -5
- package/node_modules/@typescript-eslint/eslint-plugin/package.json +4 -4
- package/node_modules/@typescript-eslint/experimental-utils/CHANGELOG.md +16 -0
- package/node_modules/@typescript-eslint/experimental-utils/dist/ast-utils/helpers.d.ts +6 -1
- package/node_modules/@typescript-eslint/experimental-utils/dist/ast-utils/helpers.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/experimental-utils/dist/ast-utils/helpers.js +7 -1
- package/node_modules/@typescript-eslint/experimental-utils/dist/ast-utils/helpers.js.map +1 -1
- package/node_modules/@typescript-eslint/experimental-utils/dist/ast-utils/predicates.d.ts +13 -7
- package/node_modules/@typescript-eslint/experimental-utils/dist/ast-utils/predicates.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/experimental-utils/dist/ast-utils/predicates.js +5 -9
- package/node_modules/@typescript-eslint/experimental-utils/dist/ast-utils/predicates.js.map +1 -1
- package/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/RuleTester.d.ts +4 -0
- package/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/RuleTester.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/RuleTester.js.map +1 -1
- package/node_modules/@typescript-eslint/experimental-utils/package.json +5 -5
- package/node_modules/@typescript-eslint/parser/CHANGELOG.md +8 -0
- package/node_modules/@typescript-eslint/parser/package.json +6 -6
- package/node_modules/@typescript-eslint/scope-manager/CHANGELOG.md +8 -0
- package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
- package/node_modules/@typescript-eslint/types/CHANGELOG.md +8 -0
- package/node_modules/@typescript-eslint/types/package.json +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/CHANGELOG.md +8 -0
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/ignore/index.js +13 -16
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/ignore/legacy.js +12 -15
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/ignore/package.json +6 -5
- package/node_modules/@typescript-eslint/typescript-estree/package.json +6 -6
- package/node_modules/@typescript-eslint/visitor-keys/CHANGELOG.md +8 -0
- package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
- package/package.json +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/CHANGELOG.md +0 -32
- package/node_modules/@typescript-eslint/typescript-estree/node_modules/ignore/CHANGELOG.md +0 -32
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ignore",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.9",
|
|
4
4
|
"description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.",
|
|
5
5
|
"files": [
|
|
6
6
|
"legacy.js",
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
"test:lint": "eslint .",
|
|
15
15
|
"test:tsc": "tsc ./test/ts/simple.ts --lib ES6",
|
|
16
16
|
"test:ts": "node ./test/ts/simple.js",
|
|
17
|
-
"
|
|
18
|
-
"test:
|
|
19
|
-
"test:
|
|
20
|
-
"test:
|
|
17
|
+
"tap": "tap --reporter classic",
|
|
18
|
+
"test:git": "npm run tap test/git-check-ignore.js",
|
|
19
|
+
"test:ignore": "npm run tap test/ignore.js",
|
|
20
|
+
"test:others": "npm run tap test/others.js",
|
|
21
|
+
"test:cases": "npm run tap test/*.js -- --coverage",
|
|
21
22
|
"test:only": "npm run test:lint && npm run test:tsc && npm run test:ts && npm run test:cases",
|
|
22
23
|
"test": "npm run test:only",
|
|
23
24
|
"test:win32": "IGNORE_TEST_WIN32=1 npm run test",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/eslint-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "TypeScript plugin for ESLint",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@typescript-eslint/experimental-utils": "5.
|
|
48
|
-
"@typescript-eslint/scope-manager": "5.
|
|
47
|
+
"@typescript-eslint/experimental-utils": "5.3.0",
|
|
48
|
+
"@typescript-eslint/scope-manager": "5.3.0",
|
|
49
49
|
"debug": "^4.3.2",
|
|
50
50
|
"functional-red-black-tree": "^1.0.1",
|
|
51
51
|
"ignore": "^5.1.8",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"type": "opencollective",
|
|
76
76
|
"url": "https://opencollective.com/typescript-eslint"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "c289d1358c62c41847ee2f32d135f13321dca177"
|
|
79
79
|
}
|
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **experimental-utils:** add `name` property to test case interface ([#4067](https://github.com/typescript-eslint/typescript-eslint/issues/4067)) ([f3021c9](https://github.com/typescript-eslint/typescript-eslint/commit/f3021c94460e8d06e4169335bcc1a23854531f2a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **experimental-utils:** extract `isTokenOfTypeWithConditions` out of `ast-utils`' `predicates` ([#3977](https://github.com/typescript-eslint/typescript-eslint/issues/3977)) ([5229597](https://github.com/typescript-eslint/typescript-eslint/commit/5229597d9bfc998852c4b4fb421859e8f3d3d688))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @typescript-eslint/experimental-utils
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AST_NODE_TYPES, TSESTree } from '../ts-estree';
|
|
1
|
+
import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree';
|
|
2
2
|
export declare const isNodeOfType: <NodeType extends AST_NODE_TYPES>(nodeType: NodeType) => (node: TSESTree.Node | null | undefined) => node is TSESTree.Node & {
|
|
3
3
|
type: NodeType;
|
|
4
4
|
};
|
|
@@ -10,4 +10,9 @@ export declare const isNodeOfTypeWithConditions: <NodeType extends AST_NODE_TYPE
|
|
|
10
10
|
}>>(nodeType: NodeType, conditions: Conditions) => (node: TSESTree.Node | null | undefined) => node is TSESTree.Node & {
|
|
11
11
|
type: NodeType;
|
|
12
12
|
} & Conditions;
|
|
13
|
+
export declare const isTokenOfTypeWithConditions: <TokenType extends AST_TOKEN_TYPES, Conditions extends Partial<TSESTree.Token & {
|
|
14
|
+
type: TokenType;
|
|
15
|
+
}>>(tokenType: TokenType, conditions: Conditions) => (token: TSESTree.Token | null | undefined) => token is TSESTree.Token & {
|
|
16
|
+
type: TokenType;
|
|
17
|
+
} & Conditions;
|
|
13
18
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/ast-utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/ast-utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKzE,eAAO,MAAM,YAAY,kEAGf,SAAS,IAAI,GAAG,IAAI,GAAG,SAAS;;CAEf,CAAC;AAE5B,eAAO,MAAM,aAAa,gFAGhB,SAAS,IAAI,GAAG,IAAI,GAAG,SAAS;;CAEC,CAAC;AAE5C,eAAO,MAAM,0BAA0B;;0DAO/B,SAAS,IAAI,GAAG,IAAI,GAAG,SAAS;;cAWvC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;6DAO/B,SAAS,KAAK,GAAG,IAAI,GAAG,SAAS;;cAWzC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNodeOfTypeWithConditions = exports.isNodeOfTypes = exports.isNodeOfType = void 0;
|
|
3
|
+
exports.isTokenOfTypeWithConditions = exports.isNodeOfTypeWithConditions = exports.isNodeOfTypes = exports.isNodeOfType = void 0;
|
|
4
4
|
const isNodeOfType = (nodeType) => (node) => (node === null || node === void 0 ? void 0 : node.type) === nodeType;
|
|
5
5
|
exports.isNodeOfType = isNodeOfType;
|
|
6
6
|
const isNodeOfTypes = (nodeTypes) => (node) => !!node && nodeTypes.includes(node.type);
|
|
@@ -11,4 +11,10 @@ const isNodeOfTypeWithConditions = (nodeType, conditions) => {
|
|
|
11
11
|
entries.every(([key, value]) => node[key] === value);
|
|
12
12
|
};
|
|
13
13
|
exports.isNodeOfTypeWithConditions = isNodeOfTypeWithConditions;
|
|
14
|
+
const isTokenOfTypeWithConditions = (tokenType, conditions) => {
|
|
15
|
+
const entries = Object.entries(conditions);
|
|
16
|
+
return (token) => (token === null || token === void 0 ? void 0 : token.type) === tokenType &&
|
|
17
|
+
entries.every(([key, value]) => token[key] === value);
|
|
18
|
+
};
|
|
19
|
+
exports.isTokenOfTypeWithConditions = isTokenOfTypeWithConditions;
|
|
14
20
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/ast-utils/helpers.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/ast-utils/helpers.ts"],"names":[],"mappings":";;;AAKO,MAAM,YAAY,GACvB,CAAkC,QAAkB,EAAE,EAAE,CACxD,CACE,IAAsC,EACM,EAAE,CAC9C,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,MAAK,QAAQ,CAAC;AALf,QAAA,YAAY,gBAKG;AAErB,MAAM,aAAa,GACxB,CAA8C,SAAoB,EAAE,EAAE,CACtE,CACE,IAAsC,EACe,EAAE,CACvD,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAL/B,QAAA,aAAa,iBAKkB;AAErC,MAAM,0BAA0B,GAAG,CAIxC,QAAkB,EAClB,UAAsB,EAGsC,EAAE;IAC9D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAExC,CAAC;IAEF,OAAO,CACL,IAAsC,EACmB,EAAE,CAC3D,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,MAAK,QAAQ;QACvB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC;AACzD,CAAC,CAAC;AAlBW,QAAA,0BAA0B,8BAkBrC;AAEK,MAAM,2BAA2B,GAAG,CAIzC,SAAoB,EACpB,UAAsB,EAGyC,EAAE;IACjE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAExC,CAAC;IAEF,OAAO,CACL,KAAwC,EACoB,EAAE,CAC9D,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,MAAK,SAAS;QACzB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC;AAC1D,CAAC,CAAC;AAlBW,QAAA,2BAA2B,+BAkBtC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { AST_NODE_TYPES, TSESTree } from '../ts-estree';
|
|
2
|
-
declare
|
|
3
|
-
|
|
1
|
+
import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree';
|
|
2
|
+
declare const isOptionalChainPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.PunctuatorToken & {
|
|
3
|
+
type: AST_TOKEN_TYPES.Punctuator;
|
|
4
|
+
} & {
|
|
5
|
+
value: "?.";
|
|
4
6
|
};
|
|
5
7
|
declare function isNotOptionalChainPunctuator(token: TSESTree.Token): token is Exclude<TSESTree.Token, TSESTree.PunctuatorToken & {
|
|
6
8
|
value: '?.';
|
|
7
9
|
}>;
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
+
declare const isNonNullAssertionPunctuator: (token: TSESTree.Token | null | undefined) => token is TSESTree.PunctuatorToken & {
|
|
11
|
+
type: AST_TOKEN_TYPES.Punctuator;
|
|
12
|
+
} & {
|
|
13
|
+
value: "!";
|
|
10
14
|
};
|
|
11
15
|
declare function isNotNonNullAssertionPunctuator(token: TSESTree.Token): token is Exclude<TSESTree.Token, TSESTree.PunctuatorToken & {
|
|
12
16
|
value: '!';
|
|
@@ -156,8 +160,10 @@ declare const isAwaitExpression: (node: TSESTree.Node | null | undefined) => nod
|
|
|
156
160
|
/**
|
|
157
161
|
* Checks if a possible token is the `await` keyword.
|
|
158
162
|
*/
|
|
159
|
-
declare
|
|
160
|
-
|
|
163
|
+
declare const isAwaitKeyword: (token: TSESTree.Token | null | undefined) => token is TSESTree.IdentifierToken & {
|
|
164
|
+
type: AST_TOKEN_TYPES.Identifier;
|
|
165
|
+
} & {
|
|
166
|
+
value: "await";
|
|
161
167
|
};
|
|
162
168
|
declare const isLoop: (node: TSESTree.Node | null | undefined) => node is (TSESTree.DoWhileStatement & {
|
|
163
169
|
type: AST_NODE_TYPES.DoWhileStatement | AST_NODE_TYPES.ForInStatement | AST_NODE_TYPES.ForOfStatement | AST_NODE_TYPES.ForStatement | AST_NODE_TYPES.WhileStatement;
|
package/node_modules/@typescript-eslint/experimental-utils/dist/ast-utils/predicates.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/ast-utils/predicates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/ast-utils/predicates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AASzE,QAAA,MAAM,yBAAyB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3E;AAED,QAAA,MAAM,YAAY;;CAA0C,CAAC;AAE7D;;GAEG;AACH,QAAA,MAAM,iBAAiB;;CAA+C,CAAC;AAEvE;;GAEG;AACH,QAAA,MAAM,cAAc;;;;CAElB,CAAC;AAEH,QAAA,MAAM,MAAM;;;;;;;;;;EAMD,CAAC;AAEZ,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,wBAAwB,EACxB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,mBAAmB,EACnB,4BAA4B,EAC5B,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACrB,CAAC"}
|
|
@@ -3,17 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isVariableDeclarator = exports.isTypeAssertion = exports.isTSFunctionType = exports.isTSConstructorType = exports.isSetter = exports.isOptionalCallExpression = exports.isOptionalChainPunctuator = exports.isNotOptionalChainPunctuator = exports.isNotNonNullAssertionPunctuator = exports.isNonNullAssertionPunctuator = exports.isLogicalOrOperator = exports.isLoop = exports.isIdentifier = exports.isFunctionType = exports.isFunctionOrFunctionType = exports.isFunction = exports.isClassOrTypeElement = exports.isConstructor = exports.isAwaitKeyword = exports.isAwaitExpression = void 0;
|
|
4
4
|
const ts_estree_1 = require("../ts-estree");
|
|
5
5
|
const helpers_1 = require("./helpers");
|
|
6
|
-
|
|
7
|
-
return token.type === ts_estree_1.AST_TOKEN_TYPES.Punctuator && token.value === '?.';
|
|
8
|
-
}
|
|
6
|
+
const isOptionalChainPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: '?.' });
|
|
9
7
|
exports.isOptionalChainPunctuator = isOptionalChainPunctuator;
|
|
10
8
|
function isNotOptionalChainPunctuator(token) {
|
|
11
9
|
return !isOptionalChainPunctuator(token);
|
|
12
10
|
}
|
|
13
11
|
exports.isNotOptionalChainPunctuator = isNotOptionalChainPunctuator;
|
|
14
|
-
|
|
15
|
-
return token.type === ts_estree_1.AST_TOKEN_TYPES.Punctuator && token.value === '!';
|
|
16
|
-
}
|
|
12
|
+
const isNonNullAssertionPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: '!' });
|
|
17
13
|
exports.isNonNullAssertionPunctuator = isNonNullAssertionPunctuator;
|
|
18
14
|
function isNotNonNullAssertionPunctuator(token) {
|
|
19
15
|
return !isNonNullAssertionPunctuator(token);
|
|
@@ -114,9 +110,9 @@ exports.isAwaitExpression = isAwaitExpression;
|
|
|
114
110
|
/**
|
|
115
111
|
* Checks if a possible token is the `await` keyword.
|
|
116
112
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
113
|
+
const isAwaitKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, {
|
|
114
|
+
value: 'await',
|
|
115
|
+
});
|
|
120
116
|
exports.isAwaitKeyword = isAwaitKeyword;
|
|
121
117
|
const isLoop = (0, helpers_1.isNodeOfTypes)([
|
|
122
118
|
ts_estree_1.AST_NODE_TYPES.DoWhileStatement,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicates.js","sourceRoot":"","sources":["../../src/ast-utils/predicates.ts"],"names":[],"mappings":";;;AAAA,4CAAyE;AAEzE,
|
|
1
|
+
{"version":3,"file":"predicates.js","sourceRoot":"","sources":["../../src/ast-utils/predicates.ts"],"names":[],"mappings":";;;AAAA,4CAAyE;AAEzE,uCAKmB;AAEnB,MAAM,yBAAyB,GAAG,IAAA,qCAA2B,EAC3D,2BAAe,CAAC,UAAU,EAC1B,EAAE,KAAK,EAAE,IAAI,EAAE,CAChB,CAAC;AA2JA,8DAAyB;AAzJ3B,SAAS,4BAA4B,CACnC,KAAqB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CAAC;QACxC,IAAI,CAAC,IAAI,KAAK,KAAK,CACpB,CAAC;AACJ,CAAC;AAwCC,4BAAQ;AAtCV,MAAM,YAAY,GAAG,IAAA,sBAAY,EAAC,0BAAc,CAAC,UAAU,CAAC,CAAC;AA8B3D,oCAAY;AA5Bd;;GAEG;AACH,MAAM,iBAAiB,GAAG,IAAA,sBAAY,EAAC,0BAAc,CAAC,eAAe,CAAC,CAAC;AAkBrE,8CAAiB;AAhBnB;;GAEG;AACH,MAAM,cAAc,GAAG,IAAA,qCAA2B,EAAC,2BAAe,CAAC,UAAU,EAAE;IAC7E,KAAK,EAAE,OAAO;CACf,CAAC,CAAC;AAYD,wCAAc;AAVhB,MAAM,MAAM,GAAG,IAAA,uBAAa,EAAC;IAC3B,0BAAc,CAAC,gBAAgB;IAC/B,0BAAc,CAAC,YAAY;IAC3B,0BAAc,CAAC,cAAc;IAC7B,0BAAc,CAAC,cAAc;IAC7B,0BAAc,CAAC,cAAc;CACrB,CAAC,CAAC;AAWV,wBAAM"}
|
|
@@ -3,6 +3,10 @@ import { ParserOptions } from './ParserOptions';
|
|
|
3
3
|
import { Linter } from './Linter';
|
|
4
4
|
import { RuleCreateFunction, RuleModule, SharedConfigurationSettings } from './Rule';
|
|
5
5
|
interface ValidTestCase<TOptions extends Readonly<unknown[]>> {
|
|
6
|
+
/**
|
|
7
|
+
* Name for the test case.
|
|
8
|
+
*/
|
|
9
|
+
readonly name?: string;
|
|
6
10
|
/**
|
|
7
11
|
* Code for the test case.
|
|
8
12
|
*/
|
package/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/RuleTester.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleTester.d.ts","sourceRoot":"","sources":["../../src/ts-eslint/RuleTester.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC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1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleTester.js","sourceRoot":"","sources":["../../src/ts-eslint/RuleTester.ts"],"names":[],"mappings":";;;AAAA,mCAAwD;
|
|
1
|
+
{"version":3,"file":"RuleTester.js","sourceRoot":"","sources":["../../src/ts-eslint/RuleTester.ts"],"names":[],"mappings":";;;AAAA,mCAAwD;AA0LxD,MAAM,UAAW,SAAS,mBAA0C;CAAG;AAKrE,gCAAU"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/experimental-utils",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "(Experimental) Utilities for working with TypeScript + ESLint together",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@types/json-schema": "^7.0.9",
|
|
43
|
-
"@typescript-eslint/scope-manager": "5.
|
|
44
|
-
"@typescript-eslint/types": "5.
|
|
45
|
-
"@typescript-eslint/typescript-estree": "5.
|
|
43
|
+
"@typescript-eslint/scope-manager": "5.3.0",
|
|
44
|
+
"@typescript-eslint/types": "5.3.0",
|
|
45
|
+
"@typescript-eslint/typescript-estree": "5.3.0",
|
|
46
46
|
"eslint-scope": "^5.1.1",
|
|
47
47
|
"eslint-utils": "^3.0.0"
|
|
48
48
|
},
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
]
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "c289d1358c62c41847ee2f32d135f13321dca177"
|
|
67
67
|
}
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @typescript-eslint/parser
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @typescript-eslint/parser
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/parser",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "An ESLint custom parser which leverages TypeScript ESTree",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@typescript-eslint/scope-manager": "5.
|
|
48
|
-
"@typescript-eslint/types": "5.
|
|
49
|
-
"@typescript-eslint/typescript-estree": "5.
|
|
47
|
+
"@typescript-eslint/scope-manager": "5.3.0",
|
|
48
|
+
"@typescript-eslint/types": "5.3.0",
|
|
49
|
+
"@typescript-eslint/typescript-estree": "5.3.0",
|
|
50
50
|
"debug": "^4.3.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/glob": "*",
|
|
54
|
-
"@typescript-eslint/experimental-utils": "5.
|
|
54
|
+
"@typescript-eslint/experimental-utils": "5.3.0",
|
|
55
55
|
"glob": "*",
|
|
56
56
|
"typescript": "*"
|
|
57
57
|
},
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "c289d1358c62c41847ee2f32d135f13321dca177"
|
|
75
75
|
}
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @typescript-eslint/scope-manager
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @typescript-eslint/scope-manager
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/scope-manager",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "TypeScript scope analyser for ESLint",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@typescript-eslint/types": "5.
|
|
43
|
-
"@typescript-eslint/visitor-keys": "5.
|
|
42
|
+
"@typescript-eslint/types": "5.3.0",
|
|
43
|
+
"@typescript-eslint/visitor-keys": "5.3.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/glob": "*",
|
|
47
|
-
"@typescript-eslint/typescript-estree": "5.
|
|
47
|
+
"@typescript-eslint/typescript-estree": "5.3.0",
|
|
48
48
|
"glob": "*",
|
|
49
49
|
"jest-specific-snapshot": "*",
|
|
50
50
|
"make-dir": "*",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "c289d1358c62c41847ee2f32d135f13321dca177"
|
|
68
68
|
}
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @typescript-eslint/types
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @typescript-eslint/types
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/types",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Types for the TypeScript-ESTree AST spec",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"typescript": "*"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "c289d1358c62c41847ee2f32d135f13321dca177"
|
|
56
56
|
}
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @typescript-eslint/typescript-estree
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @typescript-eslint/typescript-estree
|
|
@@ -288,22 +288,18 @@ const REPLACERS = [
|
|
|
288
288
|
const regexCache = Object.create(null)
|
|
289
289
|
|
|
290
290
|
// @param {pattern}
|
|
291
|
-
const makeRegex = (pattern,
|
|
292
|
-
|
|
293
|
-
if (r) {
|
|
294
|
-
return r
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
// const replacers = negative
|
|
298
|
-
// ? NEGATIVE_REPLACERS
|
|
299
|
-
// : POSITIVE_REPLACERS
|
|
291
|
+
const makeRegex = (pattern, ignorecase) => {
|
|
292
|
+
let source = regexCache[pattern]
|
|
300
293
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
294
|
+
if (!source) {
|
|
295
|
+
source = REPLACERS.reduce(
|
|
296
|
+
(prev, current) => prev.replace(current[0], current[1].bind(pattern)),
|
|
297
|
+
pattern
|
|
298
|
+
)
|
|
299
|
+
regexCache[pattern] = source
|
|
300
|
+
}
|
|
305
301
|
|
|
306
|
-
return
|
|
302
|
+
return ignorecase
|
|
307
303
|
? new RegExp(source, 'i')
|
|
308
304
|
: new RegExp(source)
|
|
309
305
|
}
|
|
@@ -352,7 +348,7 @@ const createRule = (pattern, ignorecase) => {
|
|
|
352
348
|
// > begin with a hash.
|
|
353
349
|
.replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')
|
|
354
350
|
|
|
355
|
-
const regex = makeRegex(pattern,
|
|
351
|
+
const regex = makeRegex(pattern, ignorecase)
|
|
356
352
|
|
|
357
353
|
return new IgnoreRule(
|
|
358
354
|
origin,
|
|
@@ -400,9 +396,10 @@ class Ignore {
|
|
|
400
396
|
constructor ({
|
|
401
397
|
ignorecase = true
|
|
402
398
|
} = {}) {
|
|
399
|
+
define(this, KEY_IGNORE, true)
|
|
400
|
+
|
|
403
401
|
this._rules = []
|
|
404
402
|
this._ignorecase = ignorecase
|
|
405
|
-
define(this, KEY_IGNORE, true)
|
|
406
403
|
this._initCache()
|
|
407
404
|
}
|
|
408
405
|
|
|
@@ -205,20 +205,17 @@ function (match) {
|
|
|
205
205
|
|
|
206
206
|
var regexCache = Object.create(null); // @param {pattern}
|
|
207
207
|
|
|
208
|
-
var makeRegex = function makeRegex(pattern,
|
|
209
|
-
var
|
|
210
|
-
|
|
211
|
-
if (
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
208
|
+
var makeRegex = function makeRegex(pattern, ignorecase) {
|
|
209
|
+
var source = regexCache[pattern];
|
|
210
|
+
|
|
211
|
+
if (!source) {
|
|
212
|
+
source = REPLACERS.reduce(function (prev, current) {
|
|
213
|
+
return prev.replace(current[0], current[1].bind(pattern));
|
|
214
|
+
}, pattern);
|
|
215
|
+
regexCache[pattern] = source;
|
|
216
|
+
}
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
return prev.replace(current[0], current[1].bind(pattern));
|
|
220
|
-
}, pattern);
|
|
221
|
-
return regexCache[pattern] = ignorecase ? new RegExp(source, 'i') : new RegExp(source);
|
|
218
|
+
return ignorecase ? new RegExp(source, 'i') : new RegExp(source);
|
|
222
219
|
};
|
|
223
220
|
|
|
224
221
|
var isString = function isString(subject) {
|
|
@@ -258,7 +255,7 @@ var createRule = function createRule(pattern, ignorecase) {
|
|
|
258
255
|
.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') // > Put a backslash ("\") in front of the first hash for patterns that
|
|
259
256
|
// > begin with a hash.
|
|
260
257
|
.replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#');
|
|
261
|
-
var regex = makeRegex(pattern,
|
|
258
|
+
var regex = makeRegex(pattern, ignorecase);
|
|
262
259
|
return new IgnoreRule(origin, pattern, negative, regex);
|
|
263
260
|
};
|
|
264
261
|
|
|
@@ -303,9 +300,9 @@ var Ignore = /*#__PURE__*/function () {
|
|
|
303
300
|
|
|
304
301
|
_classCallCheck(this, Ignore);
|
|
305
302
|
|
|
303
|
+
define(this, KEY_IGNORE, true);
|
|
306
304
|
this._rules = [];
|
|
307
305
|
this._ignorecase = ignorecase;
|
|
308
|
-
define(this, KEY_IGNORE, true);
|
|
309
306
|
|
|
310
307
|
this._initCache();
|
|
311
308
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ignore",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.9",
|
|
4
4
|
"description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.",
|
|
5
5
|
"files": [
|
|
6
6
|
"legacy.js",
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
"test:lint": "eslint .",
|
|
15
15
|
"test:tsc": "tsc ./test/ts/simple.ts --lib ES6",
|
|
16
16
|
"test:ts": "node ./test/ts/simple.js",
|
|
17
|
-
"
|
|
18
|
-
"test:
|
|
19
|
-
"test:
|
|
20
|
-
"test:
|
|
17
|
+
"tap": "tap --reporter classic",
|
|
18
|
+
"test:git": "npm run tap test/git-check-ignore.js",
|
|
19
|
+
"test:ignore": "npm run tap test/ignore.js",
|
|
20
|
+
"test:others": "npm run tap test/others.js",
|
|
21
|
+
"test:cases": "npm run tap test/*.js -- --coverage",
|
|
21
22
|
"test:only": "npm run test:lint && npm run test:tsc && npm run test:ts && npm run test:cases",
|
|
22
23
|
"test": "npm run test:only",
|
|
23
24
|
"test:win32": "IGNORE_TEST_WIN32=1 npm run test",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typescript-eslint/typescript-estree",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@typescript-eslint/types": "5.
|
|
45
|
-
"@typescript-eslint/visitor-keys": "5.
|
|
44
|
+
"@typescript-eslint/types": "5.3.0",
|
|
45
|
+
"@typescript-eslint/visitor-keys": "5.3.0",
|
|
46
46
|
"debug": "^4.3.2",
|
|
47
47
|
"globby": "^11.0.4",
|
|
48
48
|
"is-glob": "^4.0.3",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"@types/is-glob": "*",
|
|
60
60
|
"@types/semver": "*",
|
|
61
61
|
"@types/tmp": "*",
|
|
62
|
-
"@typescript-eslint/shared-fixtures": "5.
|
|
62
|
+
"@typescript-eslint/shared-fixtures": "5.3.0",
|
|
63
63
|
"glob": "*",
|
|
64
64
|
"jest-specific-snapshot": "*",
|
|
65
65
|
"make-dir": "*",
|
|
66
|
-
"tmp": "
|
|
66
|
+
"tmp": "*",
|
|
67
67
|
"typescript": "*"
|
|
68
68
|
},
|
|
69
69
|
"peerDependenciesMeta": {
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "c289d1358c62c41847ee2f32d135f13321dca177"
|
|
86
86
|
}
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.2.0...v5.3.0) (2021-11-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @typescript-eslint/visitor-keys
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [5.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.1.0...v5.2.0) (2021-10-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @typescript-eslint/visitor-keys
|