Merge branch 'main' into henrymercer/disk-telemetry

This commit is contained in:
Henry Mercer 2023-08-09 11:50:50 +01:00
commit c93877b070
97 changed files with 405 additions and 532 deletions

View file

@ -4,7 +4,12 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
## [UNRELEASED]
No user facing changes.
## 2.21.3 - 08 Aug 2023
- We are rolling out a feature in August 2023 that will improve multi-threaded performance on larger runners. [#1817](https://github.com/github/codeql-action/pull/1817)
- We are rolling out a feature in August 2023 that adds beta support for [Project Lombok](https://projectlombok.org/) when analyzing Java. [#1809](https://github.com/github/codeql-action/pull/1809)
- Reduce disk space usage when downloading the CodeQL bundle. [#1820](https://github.com/github/codeql-action/pull/1820)
## 2.21.2 - 28 Jul 2023

92
node_modules/.package-lock.json generated vendored
View file

@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "2.21.3",
"version": "2.21.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
@ -906,9 +906,9 @@
"dev": true
},
"node_modules/@types/sinon": {
"version": "10.0.15",
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz",
"integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==",
"version": "10.0.16",
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz",
"integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==",
"dev": true,
"dependencies": {
"@types/sinonjs__fake-timers": "*"
@ -934,16 +934,16 @@
"integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ=="
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.0.tgz",
"integrity": "sha512-rClGrMuyS/3j0ETa1Ui7s6GkLhfZGKZL3ZrChLeAiACBE/tRc1wq8SNZESUuluxhLj9FkUefRs2l6bCIArWBiQ==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.1.tgz",
"integrity": "sha512-iZVM/ALid9kO0+I81pnp1xmYiFyqibAHzrqX4q5YvvVEyJqY+e6rfTXSCsc2jUxGNqJqTfFSSij/NFkZBiBzLw==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.2.0",
"@typescript-eslint/type-utils": "6.2.0",
"@typescript-eslint/utils": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0",
"@typescript-eslint/scope-manager": "6.2.1",
"@typescript-eslint/type-utils": "6.2.1",
"@typescript-eslint/utils": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@ -970,15 +970,15 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.2.0.tgz",
"integrity": "sha512-igVYOqtiK/UsvKAmmloQAruAdUHihsOCvplJpplPZ+3h4aDkC/UKZZNKgB6h93ayuYLuEymU3h8nF1xMRbh37g==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.2.1.tgz",
"integrity": "sha512-Ld+uL1kYFU8e6btqBFpsHkwQ35rw30IWpdQxgOqOh4NfxSDH6uCkah1ks8R/RgQqI5hHPXMaLy9fbFseIe+dIg==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.2.0",
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0",
"@typescript-eslint/scope-manager": "6.2.1",
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/typescript-estree": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1",
"debug": "^4.3.4"
},
"engines": {
@ -998,13 +998,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz",
"integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.1.tgz",
"integrity": "sha512-UCqBF9WFqv64xNsIEPfBtenbfodPXsJ3nPAr55mGPkQIkiQvgoWNo+astj9ZUfJfVKiYgAZDMnM6dIpsxUMp3Q==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0"
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -1015,13 +1015,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.2.0.tgz",
"integrity": "sha512-DnGZuNU2JN3AYwddYIqrVkYW0uUQdv0AY+kz2M25euVNlujcN2u+rJgfJsBFlUEzBB6OQkUqSZPyuTLf2bP5mw==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.2.1.tgz",
"integrity": "sha512-fTfCgomBMIgu2Dh2Or3gMYgoNAnQm3RLtRp+jP7A8fY+LJ2+9PNpi5p6QB5C4RSP+U3cjI0vDlI3mspAkpPVbQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/utils": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.1",
"@typescript-eslint/utils": "6.2.1",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
@ -1042,9 +1042,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.0.tgz",
"integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.1.tgz",
"integrity": "sha512-528bGcoelrpw+sETlyM91k51Arl2ajbNT9L4JwoXE2dvRe1yd8Q64E4OL7vHYw31mlnVsf+BeeLyAZUEQtqahQ==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -1055,13 +1055,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz",
"integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.1.tgz",
"integrity": "sha512-G+UJeQx9AKBHRQBpmvr8T/3K5bJa485eu+4tQBxFq0KoT22+jJyzo1B50JDT9QdC1DEmWQfdKsa8ybiNWYsi0Q==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0",
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -1082,17 +1082,17 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.2.0.tgz",
"integrity": "sha512-RCFrC1lXiX1qEZN8LmLrxYRhOkElEsPKTVSNout8DMzf8PeWoQG7Rxz2SadpJa3VSh5oYKGwt7j7X/VRg+Y3OQ==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.2.1.tgz",
"integrity": "sha512-eBIXQeupYmxVB6S7x+B9SdBeB6qIdXKjgQBge2J+Ouv8h9Cxm5dHf/gfAZA6dkMaag+03HdbVInuXMmqFB/lKQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.2.0",
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/scope-manager": "6.2.1",
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/typescript-estree": "6.2.1",
"semver": "^7.5.4"
},
"engines": {
@ -1107,12 +1107,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz",
"integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.1.tgz",
"integrity": "sha512-iTN6w3k2JEZ7cyVdZJTVJx2Lv7t6zFA8DCrJEHD2mwfc16AEvvBWVhbFh34XyG2NORCd0viIgQY1+u7kPI0WpA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/types": "6.2.1",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {

View file

@ -8,7 +8,7 @@ This package contains type definitions for Sinon (https://sinonjs.org).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon.
### Additional Details
* Last updated: Sun, 14 May 2023 04:32:51 GMT
* Last updated: Tue, 01 Aug 2023 09:02:50 GMT
* Dependencies: [@types/sinonjs__fake-timers](https://npmjs.com/package/@types/sinonjs__fake-timers)
* Global values: `sinon`

View file

@ -775,7 +775,7 @@ declare namespace Sinon {
}
interface SinonMockStatic {
(): SinonExpectation;
(name?: string): SinonExpectation;
/**
* Creates a mock for the provided object.
* Does not change the object, but returns a mock object to set expectations on the objects methods.

View file

@ -1,6 +1,6 @@
{
"name": "@types/sinon",
"version": "10.0.15",
"version": "10.0.16",
"description": "TypeScript definitions for Sinon",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon",
"license": "MIT",
@ -57,6 +57,6 @@
"dependencies": {
"@types/sinonjs__fake-timers": "*"
},
"typesPublisherContentHash": "c87e5ef382887bbdb8c25d070fd87c515977fd4e28b3d8cf4293c673f5e33f2e",
"typesPublisherContentHash": "80a97a78fae8ba4177fdc4c2d9cb72ff3c90b9c29fbc7c54a1ecaa647e7128ed",
"typeScriptVersion": "4.3"
}

View file

@ -231,27 +231,21 @@ exports.default = util.createRule({
data: { typeImports },
};
}
else {
return {
messageId: 'aImportIsOnlyTypes',
data: { typeImports },
};
}
return {
messageId: 'aImportIsOnlyTypes',
data: { typeImports },
};
}
else {
if (isTypeImport) {
return {
messageId: 'someImportsInDecoMeta',
data: { typeImports }, // typeImports are all the value specifiers that are in the type position
};
}
else {
return {
messageId: 'someImportsAreOnlyTypes',
data: { typeImports }, // typeImports are all the type specifiers in the value position
};
}
if (isTypeImport) {
return {
messageId: 'someImportsInDecoMeta',
data: { typeImports }, // typeImports are all the value specifiers that are in the type position
};
}
return {
messageId: 'someImportsAreOnlyTypes',
data: { typeImports }, // typeImports are all the type specifiers in the value position
};
})();
context.report({
node: report.node,

File diff suppressed because one or more lines are too long

View file

@ -162,21 +162,19 @@ exports.default = util.createRule({
...base,
};
}
else {
return {
type,
accessibility: undefined,
declare: false,
decorators: [],
definite: false,
optional: false,
override: false,
readonly: false,
static: false,
typeAnnotation: undefined,
...base,
};
}
return {
type,
accessibility: undefined,
declare: false,
decorators: [],
definite: false,
optional: false,
override: false,
readonly: false,
static: false,
typeAnnotation: undefined,
...base,
};
}
return Object.assign({}, rules, {
// overwrite the base rule here so we can use our KNOWN_NODES list instead

File diff suppressed because one or more lines are too long

View file

@ -116,9 +116,7 @@ exports.default = util.createRule({
typeAnnotation.range[0],
]);
}
else {
return fixer.insertTextBefore(typeAnnotation, ' '.repeat(-difference));
}
return fixer.insertTextBefore(typeAnnotation, ' '.repeat(-difference));
},
data: {
computed: '',
@ -143,9 +141,7 @@ exports.default = util.createRule({
typeAnnotation.typeAnnotation.range[0],
]);
}
else {
return fixer.insertTextBefore(typeAnnotation.typeAnnotation, ' '.repeat(-difference));
}
return fixer.insertTextBefore(typeAnnotation.typeAnnotation, ' '.repeat(-difference));
},
data: {
computed: '',
@ -250,9 +246,7 @@ exports.default = util.createRule({
toCheck.range[0],
]);
}
else {
return fixer.insertTextBefore(toCheck, ' '.repeat(-difference));
}
return fixer.insertTextBefore(toCheck, ' '.repeat(-difference));
},
data: {
computed: '',

File diff suppressed because one or more lines are too long

View file

@ -101,12 +101,10 @@ exports.default = util.createRule({
if (isHigherPrecedenceThanUnary(tsNode)) {
return fixer.insertTextBefore(node, 'void ');
}
else {
return [
fixer.insertTextBefore(node, 'void ('),
fixer.insertTextAfterRange([expression.range[1], expression.range[1]], ')'),
];
}
return [
fixer.insertTextBefore(node, 'void ('),
fixer.insertTextAfterRange([expression.range[1], expression.range[1]], ')'),
];
},
},
],
@ -130,12 +128,10 @@ exports.default = util.createRule({
if (isHigherPrecedenceThanUnary(tsNode)) {
return fixer.insertTextBefore(node, 'await ');
}
else {
return [
fixer.insertTextBefore(node, 'await ('),
fixer.insertTextAfterRange([expression.range[1], expression.range[1]], ')'),
];
}
return [
fixer.insertTextBefore(node, 'await ('),
fixer.insertTextAfterRange([expression.range[1], expression.range[1]], ')'),
];
},
},
],
@ -195,18 +191,14 @@ exports.default = util.createRule({
if (isValidRejectionHandler(catchRejectionHandler)) {
return { isUnhandled: false };
}
else {
return { isUnhandled: true, nonFunctionHandler: true };
}
return { isUnhandled: true, nonFunctionHandler: true };
}
const thenRejectionHandler = getRejectionHandlerFromThenCall(node);
if (thenRejectionHandler) {
if (isValidRejectionHandler(thenRejectionHandler)) {
return { isUnhandled: false };
}
else {
return { isUnhandled: true, nonFunctionHandler: true };
}
return { isUnhandled: true, nonFunctionHandler: true };
}
// `x.finally()` is transparent to resolution of the promise, so check `x`.
// ("object" in this context is the `x` in `x.finally()`)
@ -224,9 +216,7 @@ exports.default = util.createRule({
if (alternateResult.isUnhandled) {
return alternateResult;
}
else {
return isUnhandledPromise(checker, node.consequent);
}
return isUnhandledPromise(checker, node.consequent);
}
else if (node.type === utils_1.AST_NODE_TYPES.MemberExpression ||
node.type === utils_1.AST_NODE_TYPES.Identifier ||
@ -241,9 +231,7 @@ exports.default = util.createRule({
if (leftResult.isUnhandled) {
return leftResult;
}
else {
return isUnhandledPromise(checker, node.right);
}
return isUnhandledPromise(checker, node.right);
}
// We conservatively return false for all other types of expressions because
// we don't want to accidentally fail if the promise is handled internally but
@ -296,9 +284,7 @@ function getRejectionHandlerFromCatchCall(expression) {
expression.arguments.length >= 1) {
return expression.arguments[0];
}
else {
return undefined;
}
return undefined;
}
function getRejectionHandlerFromThenCall(expression) {
if (expression.callee.type === utils_1.AST_NODE_TYPES.MemberExpression &&
@ -307,9 +293,7 @@ function getRejectionHandlerFromThenCall(expression) {
expression.arguments.length >= 2) {
return expression.arguments[1];
}
else {
return undefined;
}
return undefined;
}
function getObjectFromFinallyCall(expression) {
return expression.callee.type === utils_1.AST_NODE_TYPES.MemberExpression &&

File diff suppressed because one or more lines are too long

View file

@ -179,10 +179,15 @@ exports.default = util.createRule({
if (ignoreParameters || !node.params) {
return;
}
node.params.filter(param => param.type === utils_1.AST_NODE_TYPES.AssignmentPattern &&
param.left &&
param.right).forEach(param => {
reportInferrableType(param, param.left.typeAnnotation, param.right);
node.params.forEach(param => {
if (param.type === utils_1.AST_NODE_TYPES.TSParameterProperty) {
param = param.parameter;
}
if (param.type === utils_1.AST_NODE_TYPES.AssignmentPattern &&
param.left &&
param.right) {
reportInferrableType(param, param.left.typeAnnotation, param.right);
}
});
}
function inferrablePropertyVisitor(node) {

File diff suppressed because one or more lines are too long

View file

@ -401,11 +401,9 @@ exports.default = util.createRule({
column: identifier.loc.start.column + 1,
};
}
else {
return {
global: true,
};
}
return {
global: true,
};
}
/**
* Checks the current context for shadowed variables.

File diff suppressed because one or more lines are too long

View file

@ -66,9 +66,7 @@ exports.default = util.createRule({
}
return false;
}
else {
return ((type.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) !== 0);
}
return (type.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) !== 0;
};
const sameTypeWithoutNullish = (assertedTypes, originalTypes) => {
const nonNullishOriginalTypes = originalTypes.filter(type => (type.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) === 0);

View file

@ -1 +1 @@
{"version":3,"file":"non-nullable-type-assertion-style.js","sourceRoot":"","sources":["../../src/rules/non-nullable-type-assertion-style.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAC1D,sDAAwC;AACxC,+CAAiC;AAEjC,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,mCAAmC;IACzC,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,sDAAsD;YACnE,WAAW,EAAE,WAAW;YACxB,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,sBAAsB,EACpB,+EAA+E;SAClF;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE,EAAE;IAElB,MAAM,CAAC,OAAO;Q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,aAAa,EAAE;oBAClB,OAAO;iBACR;gBAED,IAAI,sBAAsB,CAAC,aAAa,EAAE,aAAa,CAAC,EAAE;oBACxD,OAAO,CAAC,MAAM,CAAC;wBACb,GAAG,CAAC,KAAK;4BACP,OAAO,KAAK,CAAC,WAAW,CACtB,IAAI,EACJ,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAC1C,CAAC;wBACJ,CAAC;wBACD,SAAS,EAAE,wBAAwB;wBACnC,IAAI;qBACL,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
{"version":3,"file":"non-nullable-type-assertion-style.js","sourceRoot":"","sources":["../../src/rules/non-nullable-type-assertion-style.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAC1D,sDAAwC;AACxC,+CAAiC;AAEjC,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,mCAAmC;IACzC,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,sDAAsD;YACnE,WAAW,EAAE,WAAW;YACxB,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,sBAAsB,EACpB,+EAA+E;SAClF;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE,EAAE;IAElB,MAAM,CAAC,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C,MAAM,kBAAkB,GAAG,CAAC,IAAmB,EAAyB,EAAE;YACxE,MAAM,IAAI,GAAG,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAE9C,IACE,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,E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;qBACL,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}

View file

@ -251,15 +251,13 @@ function getFixer(sourceCode, parserServices, operator, options, chain) {
right: unaryOperator + newCode,
};
}
else {
const unaryOperator = lastOperand.node.left.type === utils_1.AST_NODE_TYPES.UnaryExpression
? lastOperand.node.left.operator + ' '
: '';
return {
left: unaryOperator + newCode,
right: sourceCode.getText(lastOperand.node.right),
};
}
const unaryOperator = lastOperand.node.left.type === utils_1.AST_NODE_TYPES.UnaryExpression
? lastOperand.node.left.operator + ' '
: '';
return {
left: unaryOperator + newCode,
right: sourceCode.getText(lastOperand.node.right),
};
})();
newCode = `${left} ${operator} ${right}`;
}

File diff suppressed because one or more lines are too long

View file

@ -94,13 +94,11 @@ function gatherLogicalOperands(node, parserServices, options) {
isYoda: false,
};
}
else {
return {
comparedExpression: operand.right,
comparedValue: getComparisonValueType(operand.left),
isYoda: true,
};
}
return {
comparedExpression: operand.right,
comparedValue: getComparisonValueType(operand.left),
isYoda: true,
};
})();
if (comparedValue === "UndefinedStringLiteral" /* ComparisonValueType.UndefinedStringLiteral */) {
if (comparedExpression.type === utils_1.AST_NODE_TYPES.UnaryExpression &&

File diff suppressed because one or more lines are too long

View file

@ -161,11 +161,13 @@ exports.default = (0, util_1.createRule)({
/**
* Parse a given `RegExp` pattern to that string if it's a static string.
* @param pattern The RegExp pattern text to parse.
* @param uFlag The Unicode flag of the RegExp.
* @param unicode Whether the RegExp is unicode.
*/
function parseRegExpText(pattern, uFlag) {
function parseRegExpText(pattern, unicode) {
// Parse it.
const ast = regexpp.parsePattern(pattern, undefined, undefined, uFlag);
const ast = regexpp.parsePattern(pattern, undefined, undefined, {
unicode,
});
if (ast.alternatives.length !== 1) {
return null;
}

File diff suppressed because one or more lines are too long

View file

@ -134,12 +134,10 @@ exports.default = util.createRule({
if (isHighPrecendence) {
return fixer.insertTextBefore(node, 'await ');
}
else {
return [
fixer.insertTextBefore(node, 'await ('),
fixer.insertTextAfter(node, ')'),
];
}
return [
fixer.insertTextBefore(node, 'await ('),
fixer.insertTextAfter(node, ')'),
];
}
function isHigherPrecedenceThanAwait(node) {
const operator = ts.isBinaryExpression(node)

File diff suppressed because one or more lines are too long

View file

@ -58,9 +58,7 @@ function getIdentifierRules(rules, node) {
else if ((0, util_1.isFunctionOrFunctionType)(scope)) {
return rules.parameter;
}
else {
return rules.colon;
}
return rules.colon;
}
function getRules(rules, node) {
const scope = node?.parent?.parent;
@ -76,9 +74,7 @@ function getRules(rules, node) {
else if ((0, util_1.isFunction)(scope)) {
return rules.returnType;
}
else {
return rules.colon;
}
return rules.colon;
}
exports.default = util.createRule({
name: 'type-annotation-spacing',

File diff suppressed because one or more lines are too long

View file

@ -129,12 +129,10 @@ function getNameFromMember(member, sourceCode) {
name: `"${name}"`,
};
}
else {
return {
type: MemberNameType.Normal,
name,
};
}
return {
type: MemberNameType.Normal,
name,
};
}
return {
type: MemberNameType.Expression,

View file

@ -1 +1 @@
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../../src/util/misc.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8DAAgE;AAEhE,oDAA0D;AAC1D,+CAAiC;AAEjC,MAAM,qBAAqB,GAAG;IAC5B,EAAE,CAAC,SAAS,CAAC,GAAG;IAChB,EAAE,CAAC,SAAS,CAAC,IAAI;IACjB,EAAE,CAAC,SAAS,CAAC,IAAI;CACT,CAAC;AACX;;GAEG;AACH,SAAS,gBAAgB,CAAC,QAAgB;IACxC,MAAM,aAAa,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC7C,KAAK,MAAM,aAAa,IAAI,qBAAqB,EAAE;QACjD,IAAI,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;YACzC,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AA2MC,4CAAgB;AAzMlB;;GAEG;AACH,SAAS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;AA8BC,sCAAa;AA5Bf,SAAS,2BAA2B,CAClC,IAAuB,EACvB,IAAY;IAEZ,OAAO,CACL,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc;QAC3C,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB;QAC9C,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB;QAC9C,CAAC,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,WAAW,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAClE,CAAC,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,kBAAkB,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAC1E,CAAC;AACJ,CAAC;AAeC,kEAA2B"}

View file

@ -6,7 +6,5 @@ description: 'Disallow or enforce spaces inside of blocks after opening block an
>
> See **https://typescript-eslint.io/rules/block-spacing** for documentation.
## Examples
This rule extends the base [`eslint/block-spacing`](https://eslint.org/docs/rules/block-spacing) rule.
This version adds support for TypeScript related blocks (interfaces, object type literals and enums).

View file

@ -6,7 +6,5 @@ description: 'Enforce consistent brace style for blocks.'
>
> See **https://typescript-eslint.io/rules/brace-style** for documentation.
## Examples
This rule extends the base [`eslint/brace-style`](https://eslint.org/docs/rules/brace-style) rule.
It adds support for `enum`, `interface`, `namespace` and `module` declarations.

View file

@ -6,8 +6,6 @@ description: 'Enforce that class methods utilize `this`.'
>
> See **https://typescript-eslint.io/rules/class-methods-use-this** for documentation.
## Examples
This rule extends the base [`eslint/class-methods-use-this`](https://eslint.org/docs/rules/class-methods-use-this) rule.
It adds support for ignoring `override` methods or methods on classes that implement an interface.

View file

@ -6,8 +6,6 @@ description: 'Require or disallow trailing commas.'
>
> See **https://typescript-eslint.io/rules/comma-dangle** for documentation.
## Examples
This rule extends the base [`eslint/comma-dangle`](https://eslint.org/docs/rules/comma-dangle) rule.
It adds support for TypeScript syntax.

View file

@ -6,7 +6,5 @@ description: 'Enforce consistent spacing before and after commas.'
>
> See **https://typescript-eslint.io/rules/comma-spacing** for documentation.
## Examples
This rule extends the base [`eslint/comma-spacing`](https://eslint.org/docs/rules/comma-spacing) rule.
It adds support for trailing comma in a types parameters list.

View file

@ -6,8 +6,6 @@ description: 'Enforce default parameters to be last.'
>
> See **https://typescript-eslint.io/rules/default-param-last** for documentation.
## Examples
This rule extends the base [`eslint/default-param-last`](https://eslint.org/docs/rules/default-param-last) rule.
It adds support for optional parameters.

View file

@ -6,8 +6,6 @@ description: 'Enforce dot notation whenever possible.'
>
> See **https://typescript-eslint.io/rules/dot-notation** for documentation.
## Examples
This rule extends the base [`eslint/dot-notation`](https://eslint.org/docs/rules/dot-notation) rule.
It adds:

View file

@ -6,7 +6,5 @@ description: 'Require or disallow spacing between function identifiers and their
>
> See **https://typescript-eslint.io/rules/func-call-spacing** for documentation.
## Examples
This rule extends the base [`eslint/func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) rule.
It adds support for generic type parameters on function calls.

View file

@ -14,7 +14,5 @@ Please read [Issue #1824: Problems with the indent rule](https://github.com/type
:::
## Examples
This rule extends the base [`eslint/indent`](https://eslint.org/docs/rules/indent) rule.
It adds support for TypeScript nodes.

View file

@ -6,7 +6,5 @@ description: 'Require or disallow initialization in variable declarations.'
>
> See **https://typescript-eslint.io/rules/init-declarations** for documentation.
## Examples
This rule extends the base [`eslint/init-declarations`](https://eslint.org/docs/rules/init-declarations) rule.
It adds support for TypeScript's `declare` variables.

View file

@ -6,7 +6,5 @@ description: 'Enforce consistent spacing between property names and type annotat
>
> See **https://typescript-eslint.io/rules/key-spacing** for documentation.
## Examples
This rule extends the base [`eslint/key-spacing`](https://eslint.org/docs/rules/key-spacing) rule.
This version adds support for type annotations on interfaces, classes and type literals properties.
It adds support for type annotations on interfaces, classes and type literals properties.

View file

@ -6,7 +6,5 @@ description: 'Enforce consistent spacing before and after keywords.'
>
> See **https://typescript-eslint.io/rules/keyword-spacing** for documentation.
## Examples
This rule extends the base [`eslint/keyword-spacing`](https://eslint.org/docs/rules/keyword-spacing) rule.
This version adds support for generic type parameters on function calls.
It adds support for generic type parameters on function calls.

View file

@ -6,8 +6,6 @@ description: 'Require empty lines around comments.'
>
> See **https://typescript-eslint.io/rules/lines-around-comment** for documentation.
## Rule Details
This rule extends the base [`eslint/lines-around-comment`](https://eslint.org/docs/rules/lines-around-comment) rule.
It adds support for TypeScript syntax.

View file

@ -6,10 +6,6 @@ description: 'Require or disallow an empty line between class members.'
>
> See **https://typescript-eslint.io/rules/lines-between-class-members** for documentation.
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.
## Examples
This rule extends the base [`eslint/lines-between-class-members`](https://eslint.org/docs/rules/lines-between-class-members) rule.
It adds support for ignoring overload methods in a class.

View file

@ -6,8 +6,6 @@ description: 'Disallow generic `Array` constructors.'
>
> See **https://typescript-eslint.io/rules/no-array-constructor** for documentation.
## Examples
This rule extends the base [`eslint/no-array-constructor`](https://eslint.org/docs/rules/no-array-constructor) rule.
It adds support for the generically typed `Array` constructor (`new Array<Foo>()`).

View file

@ -6,7 +6,5 @@ description: 'Disallow duplicate class members.'
>
> See **https://typescript-eslint.io/rules/no-dupe-class-members** for documentation.
## Examples
This rule extends the base [`eslint/no-dupe-class-members`](https://eslint.org/docs/rules/no-dupe-class-members) rule.
It adds support for TypeScript's method overload definitions.

View file

@ -10,8 +10,6 @@ TypeScript supports types ("constituents") within union and intersection types b
However, developers typically expect each constituent to be unique within its intersection or union.
Duplicate values make the code overly verbose and generally reduce readability.
## Rule Details
This rule disallows duplicate union or intersection constituents.
We consider types to be duplicate if they evaluate to the same result in the type system.
For example, given `type A = string` and `type T = string | A`, this rule would flag that `A` is the same type as `string`.

View file

@ -6,8 +6,6 @@ description: 'Disallow empty functions.'
>
> See **https://typescript-eslint.io/rules/no-empty-function** for documentation.
## Examples
This rule extends the base [`eslint/no-empty-function`](https://eslint.org/docs/rules/no-empty-function) rule.
It adds support for handling TypeScript specific code that would otherwise trigger the rule.

View file

@ -6,7 +6,5 @@ description: 'Disallow unnecessary parentheses.'
>
> See **https://typescript-eslint.io/rules/no-extra-parens** for documentation.
## Examples
This rule extends the base [`eslint/no-extra-parens`](https://eslint.org/docs/rules/no-extra-parens) rule.
It adds support for TypeScript type assertions.

View file

@ -6,7 +6,5 @@ description: 'Disallow unnecessary semicolons.'
>
> See **https://typescript-eslint.io/rules/no-extra-semi** for documentation.
## Examples
This rule extends the base [`eslint/no-extra-semi`](https://eslint.org/docs/rules/no-extra-semi) rule.
It adds support for class properties.

View file

@ -58,7 +58,7 @@ returnsPromise().then(
Promise.reject('value').catch(() => {});
Promise.reject('value').finally(() => {});
await Promise.reject('value').finally(() => {});
```
## Options

View file

@ -6,7 +6,5 @@ description: 'Disallow `this` keywords outside of classes or class-like objects.
>
> See **https://typescript-eslint.io/rules/no-invalid-this** for documentation.
## Examples
This rule extends the base [`eslint/no-invalid-this`](https://eslint.org/docs/rules/no-invalid-this) rule.
It adds support for TypeScript's `this` parameters.

View file

@ -6,7 +6,5 @@ description: 'Disallow function declarations that contain unsafe references insi
>
> See **https://typescript-eslint.io/rules/no-loop-func** for documentation.
## Examples
This rule extends the base [`eslint/no-loop-func`](https://eslint.org/docs/rules/no-loop-func) rule.
It adds support for TypeScript types.

View file

@ -6,7 +6,5 @@ description: 'Disallow literal numbers that lose precision.'
>
> See **https://typescript-eslint.io/rules/no-loss-of-precision** for documentation.
## Examples
This rule extends the base [`eslint/no-loss-of-precision`](https://eslint.org/docs/rules/no-loss-of-precision) rule.
It adds support for [numeric separators](https://github.com/tc39/proposal-numeric-separator).

View file

@ -6,8 +6,6 @@ description: 'Disallow magic numbers.'
>
> See **https://typescript-eslint.io/rules/no-magic-numbers** for documentation.
## Examples
This rule extends the base [`eslint/no-magic-numbers`](https://eslint.org/docs/rules/no-magic-numbers) rule.
It adds support for:

View file

@ -6,8 +6,6 @@ description: 'Disallow variable redeclaration.'
>
> See **https://typescript-eslint.io/rules/no-redeclare** for documentation.
## Examples
This rule extends the base [`eslint/no-redeclare`](https://eslint.org/docs/rules/no-redeclare) rule.
It adds support for TypeScript function overloads, and declaration merging.

View file

@ -6,8 +6,6 @@ description: 'Disallow specified modules when loaded by `import`.'
>
> See **https://typescript-eslint.io/rules/no-restricted-imports** for documentation.
## Examples
This rule extends the base [`eslint/no-restricted-imports`](https://eslint.org/docs/rules/no-restricted-imports) rule.
## Options

View file

@ -6,8 +6,6 @@ description: 'Disallow variable declarations from shadowing variables declared i
>
> See **https://typescript-eslint.io/rules/no-shadow** for documentation.
## Examples
This rule extends the base [`eslint/no-shadow`](https://eslint.org/docs/rules/no-shadow) rule.
It adds support for TypeScript's `this` parameters and global augmentation, and adds options for TypeScript features.

View file

@ -6,7 +6,5 @@ description: 'Disallow unused expressions.'
>
> See **https://typescript-eslint.io/rules/no-unused-expressions** for documentation.
## Examples
This rule extends the base [`eslint/no-unused-expressions`](https://eslint.org/docs/rules/no-unused-expressions) rule.
It adds support for optional call expressions `x?.()`, and directive in module declarations.

View file

@ -6,7 +6,22 @@ description: 'Disallow unused variables.'
>
> See **https://typescript-eslint.io/rules/no-unused-vars** for documentation.
## Examples
This rule extends the base [`eslint/no-unused-vars`](https://eslint.org/docs/rules/no-unused-vars) rule.
It adds support for TypeScript features, such as types.
## Benefits Over TypeScript
TypeScript provides [`noUnusedLocals`](https://www.typescriptlang.org/tsconfig#noUnusedLocals) and [`noUnusedParameters`](https://www.typescriptlang.org/tsconfig#noUnusedParameters) compiler options that can report errors on unused local variables or parameters, respectively.
Those compiler options can be convenient to use if you don't want to set up ESLint and typescript-eslint.
However:
- These lint rules are more configurable than TypeScript's compiler options.
- For example, the [`varsIgnorePattern` option](https://eslint.org/docs/latest/rules/no-unused-vars#varsignorepattern) can customize what names are always allowed to be exempted. TypeScript hardcodes its exemptions to names starting with `_`.
- [ESLint can be configured](https://eslint.org/docs/latest/use/configure/rules) within lines, files, and folders. TypeScript compiler options are linked to their TSConfig file.
- Many projects configure TypeScript's reported errors to block builds more aggressively than ESLint complaints. Blocking builds on unused variables can be inconvenient.
We generally recommend using `@typescript-eslint/no-unused-vars` to flag unused locals and parameters instead of TypeScript.
:::tip
Editors such as VS Code will still generally "grey out" unused variables even if `noUnusedLocals` and `noUnusedParameters` are not enabled in a project.
:::

View file

@ -6,8 +6,6 @@ description: 'Disallow the use of variables before they are defined.'
>
> See **https://typescript-eslint.io/rules/no-use-before-define** for documentation.
## Examples
This rule extends the base [`eslint/no-use-before-define`](https://eslint.org/docs/rules/no-use-before-define) rule.
It adds support for `type`, `interface` and `enum` declarations.

View file

@ -6,8 +6,6 @@ description: 'Disallow unnecessary constructors.'
>
> See **https://typescript-eslint.io/rules/no-useless-constructor** for documentation.
## Examples
This rule extends the base [`eslint/no-useless-constructor`](https://eslint.org/docs/rules/no-useless-constructor) rule.
It adds support for:

View file

@ -6,7 +6,5 @@ description: 'Enforce consistent spacing inside braces.'
>
> See **https://typescript-eslint.io/rules/object-curly-spacing** for documentation.
## Examples
This rule extends the base [`eslint/object-curly-spacing`](https://eslint.org/docs/rules/object-curly-spacing) rule.
It adds support for TypeScript's object types.

View file

@ -6,8 +6,6 @@ description: 'Require or disallow padding lines between statements.'
>
> See **https://typescript-eslint.io/rules/padding-line-between-statements** for documentation.
## Examples
This rule extends the base [`eslint/padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) rule.
It adds support for TypeScript constructs such as `interface` and `type`.

View file

@ -6,7 +6,5 @@ description: 'Enforce the consistent use of either backticks, double, or single
>
> See **https://typescript-eslint.io/rules/quotes** for documentation.
## Examples
This rule extends the base [`eslint/quotes`](https://eslint.org/docs/rules/quotes) rule.
It adds support for TypeScript features which allow quoted names, but not backtick quoted names.

View file

@ -6,11 +6,11 @@ description: 'Disallow async functions which have no `await` expression.'
>
> See **https://typescript-eslint.io/rules/require-await** for documentation.
## Examples
This rule extends the base [`eslint/require-await`](https://eslint.org/docs/rules/require-await) rule.
It uses type information to add support for `async` functions that return a `Promise`.
## Examples
Examples of **correct** code for this rule:
```ts

View file

@ -6,10 +6,6 @@ description: 'Require or disallow semicolons instead of ASI.'
>
> See **https://typescript-eslint.io/rules/semi** for documentation.
This rule enforces consistent use of semicolons after statements.
## Examples
This rule extends the base [`eslint/semi`](https://eslint.org/docs/rules/semi) rule.
It adds support for TypeScript features that require semicolons.

View file

@ -6,8 +6,6 @@ description: 'Enforce consistent spacing before blocks.'
>
> See **https://typescript-eslint.io/rules/space-before-blocks** for documentation.
## Examples
This rule extends the base [`eslint/space-before-blocks`](https://eslint.org/docs/rules/space-before-blocks) rule.
It adds support for interfaces and enums.

View file

@ -6,7 +6,5 @@ description: 'Enforce consistent spacing before function parenthesis.'
>
> See **https://typescript-eslint.io/rules/space-before-function-paren** for documentation.
## Examples
This rule extends the base [`eslint/space-before-function-paren`](https://eslint.org/docs/rules/space-before-function-paren) rule.
It adds support for generic type parameters on function calls.

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin",
"version": "6.2.0",
"version": "6.2.1",
"description": "TypeScript plugin for ESLint",
"files": [
"dist",
@ -57,10 +57,10 @@
},
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.2.0",
"@typescript-eslint/type-utils": "6.2.0",
"@typescript-eslint/utils": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0",
"@typescript-eslint/scope-manager": "6.2.1",
"@typescript-eslint/type-utils": "6.2.1",
"@typescript-eslint/utils": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@ -74,8 +74,8 @@
"@types/marked": "*",
"@types/natural-compare": "*",
"@types/prettier": "*",
"@typescript-eslint/rule-schema-to-typescript-types": "6.2.0",
"@typescript-eslint/rule-tester": "6.2.0",
"@typescript-eslint/rule-schema-to-typescript-types": "6.2.1",
"@typescript-eslint/rule-tester": "6.2.1",
"ajv": "^6.12.6",
"chalk": "^5.3.0",
"cross-fetch": "*",
@ -100,5 +100,5 @@
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"gitHead": "c869aa1792ed8e3c89d5ada2df8c00f8fe36526a"
"gitHead": "948b0614626c1c737ec30106425ef4a9b8c33dbf"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/parser",
"version": "6.2.0",
"version": "6.2.1",
"description": "An ESLint custom parser which leverages TypeScript ESTree",
"files": [
"dist",
@ -51,10 +51,10 @@
"eslint": "^7.0.0 || ^8.0.0"
},
"dependencies": {
"@typescript-eslint/scope-manager": "6.2.0",
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0",
"@typescript-eslint/scope-manager": "6.2.1",
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/typescript-estree": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1",
"debug": "^4.3.4"
},
"devDependencies": {
@ -77,5 +77,5 @@
]
}
},
"gitHead": "c869aa1792ed8e3c89d5ada2df8c00f8fe36526a"
"gitHead": "948b0614626c1c737ec30106425ef4a9b8c33dbf"
}

View file

@ -150,7 +150,7 @@ class ClassVisitor extends Visitor_1.Visitor {
*/
if (!withMethodDecorators &&
methodNode.kind === 'constructor' &&
__classPrivateFieldGet(this, _ClassVisitor_classNode, "f").decorators) {
__classPrivateFieldGet(this, _ClassVisitor_classNode, "f").decorators.length) {
withMethodDecorators = true;
}
// Process parameter declarations.

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/scope-manager",
"version": "6.2.0",
"version": "6.2.1",
"description": "TypeScript scope analyser for ESLint",
"files": [
"dist",
@ -44,12 +44,12 @@
"typecheck": "nx typecheck"
},
"dependencies": {
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0"
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1"
},
"devDependencies": {
"@types/glob": "*",
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.1",
"glob": "*",
"jest-specific-snapshot": "*",
"make-dir": "*",
@ -69,5 +69,5 @@
]
}
},
"gitHead": "c869aa1792ed8e3c89d5ada2df8c00f8fe36526a"
"gitHead": "948b0614626c1c737ec30106425ef4a9b8c33dbf"
}

View file

@ -1 +1 @@
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../src/predicates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAOjC;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,EACE,UAAkB,EAClB,cAAqB,GACtB,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO,GACzD,OAAO,CAYT;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,OAAO,CAQT;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAEtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAExD;AAYD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,aAAa,CAM3E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAQpD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,OAAO,CAQT;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,EAAE,CAAC,IAAI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IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,aAAa,CAM3E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAQpD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,OAAO,CAQT;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,OAAO,CAQT;AAED,oBAAY,OAAO;IACjB,GAAG,IAAA;IACH,QAAQ,IAAA;IACR,IAAI,IAAA;CACL;AACD;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,OAAO,CAST;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,UAAU,EAAE,EAAE,CAAC,IAAI,GAClB,OAAO,CAqBT;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,IAAI,IAAI,EAAE,CAAC,iBAAiB,CAE9B;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,IAAI,IAAI,EAAE,CAAC,mBAAmB,CAEhC"}

View file

@ -45,9 +45,7 @@ function isNullableType(type, { isReceiver = false, allowUndefined = true, } = {
if (allowUndefined) {
return (flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) !== 0;
}
else {
return (flags & ts.TypeFlags.Null) !== 0;
}
return (flags & ts.TypeFlags.Null) !== 0;
}
exports.isNullableType = isNullableType;
/**

View file

@ -1 +1 @@
{"version":3,"file":"predicates.js","sourceRoot":"","sources":["../src/predicates.ts"],"names":[],"mappings":";;;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ilities for working with TypeScript + ESLint together",
"files": [
"dist",
@ -45,13 +45,13 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/utils": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.1",
"@typescript-eslint/utils": "6.2.1",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
"devDependencies": {
"@typescript-eslint/parser": "6.2.0",
"@typescript-eslint/parser": "6.2.1",
"ajv": "^8.12.0",
"typescript": "*"
},
@ -74,5 +74,5 @@
]
}
},
"gitHead": "c869aa1792ed8e3c89d5ada2df8c00f8fe36526a"
"gitHead": "948b0614626c1c737ec30106425ef4a9b8c33dbf"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/types",
"version": "6.2.0",
"version": "6.2.1",
"description": "Types for the TypeScript-ESTree AST spec",
"files": [
"dist",
@ -86,5 +86,5 @@
]
}
},
"gitHead": "c869aa1792ed8e3c89d5ada2df8c00f8fe36526a"
"gitHead": "948b0614626c1c737ec30106425ef4a9b8c33dbf"
}

View file

@ -1 +1 @@
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA2B5C,OAAO,KAAK,EACV,aAAa,EACb,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,EAAE,MAAM,aAAa,CAAC;AAKtE,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kCAAkC,CAAC,EAAE,OAAO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AAqB,CAAiB;IAEvD,OAAO,CAAC,YAAY,CAAS;IAE7B;;;;;OAKG;gBACS,GAAG,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,gBAAgB;IAK1D,UAAU,IAAI,OAAO;IAOrB,cAAc,IAAI,QAAQ,CAAC,OAAO;IAIlC;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IA8BjB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAkElB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAItB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,oCAAoC;IAe5C;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAsB7B;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAiC9B;;;;;OAKG;IACH,OAAO,CAAC,gDAAgD;IAexD;;;;OAIG;IACH,OAAO,CAAC,kDAAkD;IAmB1D;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,sBAAsB;IA4C9B;;;;OAIG;IACH,OAAO,CAAC,UAAU;IA+FlB,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,+BAA+B;IAiDvC;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,sBAAsB;IAoC9B,OAAO,CAAC,mBAAmB;IAQ3B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,qBAAqB;IAsB7B;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;CAwmFpB"}

View file

@ -123,21 +123,19 @@ class Converter {
exportKind: 'value',
});
}
else {
const isType = result.type === ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration ||
result.type === ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration;
const isDeclare = 'declare' in result && result.declare === true;
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration,
// @ts-expect-error - TODO, narrow the types here
declaration: result,
specifiers: [],
source: null,
exportKind: isType || isDeclare ? 'type' : 'value',
range: [exportKeyword.getStart(this.ast), result.range[1]],
assertions: [],
});
}
const isType = result.type === ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration ||
result.type === ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration;
const isDeclare = 'declare' in result && result.declare === true;
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration,
// @ts-expect-error - TODO, narrow the types here
declaration: result,
specifiers: [],
source: null,
exportKind: isType || isDeclare ? 'type' : 'value',
range: [exportKeyword.getStart(this.ast), result.range[1]],
assertions: [],
});
}
return result;
}
@ -230,9 +228,7 @@ class Converter {
child.directive = raw.slice(1, -1);
return child; // child can be null, but it's filtered below
}
else {
allowDirectives = false;
}
allowDirectives = false;
}
return child; // child can be null, but it's filtered below
})
@ -780,12 +776,10 @@ class Converter {
typeAnnotation: undefined,
});
}
else {
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.ArrayExpression,
elements: node.elements.map(el => this.convertChild(el)),
});
}
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.ArrayExpression,
elements: node.elements.map(el => this.convertChild(el)),
});
}
case SyntaxKind.ObjectLiteralExpression: {
// TypeScript uses ObjectLiteralExpression in destructuring assignment, too
@ -864,18 +858,16 @@ class Converter {
kind: 'init',
});
}
else {
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.Property,
computed: false,
key: this.convertChild(node.name),
kind: 'init',
method: false,
optional: false,
shorthand: true,
value: this.convertChild(node.name),
});
}
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.Property,
computed: false,
key: this.convertChild(node.name),
kind: 'init',
method: false,
optional: false,
shorthand: true,
value: this.convertChild(node.name),
});
}
case SyntaxKind.ComputedPropertyName:
return this.convertChild(node.expression);
@ -1108,48 +1100,44 @@ class Converter {
value: undefined,
});
}
else {
return arrayItem;
}
return arrayItem;
}
let result;
if (node.dotDotDotToken) {
result = this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.RestElement,
argument: this.convertChild(node.propertyName ?? node.name),
decorators: [],
optional: false,
typeAnnotation: undefined,
value: undefined,
});
}
else {
let result;
if (node.dotDotDotToken) {
result = this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.RestElement,
argument: this.convertChild(node.propertyName ?? node.name),
decorators: [],
optional: false,
typeAnnotation: undefined,
value: undefined,
});
}
else {
result = this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.Property,
key: this.convertChild(node.propertyName ?? node.name),
value: this.convertChild(node.name),
computed: Boolean(node.propertyName &&
node.propertyName.kind === SyntaxKind.ComputedPropertyName),
method: false,
optional: false,
shorthand: !node.propertyName,
kind: 'init',
});
}
if (node.initializer) {
result.value = this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
decorators: [],
left: this.convertChild(node.name),
optional: false,
range: [node.name.getStart(this.ast), node.initializer.end],
right: this.convertChild(node.initializer),
typeAnnotation: undefined,
});
}
return result;
result = this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.Property,
key: this.convertChild(node.propertyName ?? node.name),
value: this.convertChild(node.name),
computed: Boolean(node.propertyName &&
node.propertyName.kind === SyntaxKind.ComputedPropertyName),
method: false,
optional: false,
shorthand: !node.propertyName,
kind: 'init',
});
}
if (node.initializer) {
result.value = this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
decorators: [],
left: this.convertChild(node.name),
optional: false,
range: [node.name.getStart(this.ast), node.initializer.end],
right: this.convertChild(node.initializer),
typeAnnotation: undefined,
});
}
return result;
}
case SyntaxKind.ArrowFunction: {
return this.createNode(node, {
@ -1238,12 +1226,10 @@ class Converter {
value: undefined,
});
}
else {
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.SpreadElement,
argument: this.convertChild(node.expression),
});
}
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.SpreadElement,
argument: this.convertChild(node.expression),
});
}
case SyntaxKind.Parameter: {
let parameter;
@ -1436,24 +1422,22 @@ class Converter {
assertions: this.convertAssertClasue(node.assertClause),
});
}
else {
this.assertModuleSpecifier(node, false);
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.ExportAllDeclaration,
source: this.convertChild(node.moduleSpecifier),
exportKind: node.isTypeOnly ? 'type' : 'value',
exported:
// note - for compat with 3.7.x, where node.exportClause is always undefined and
// SyntaxKind.NamespaceExport does not exist yet (i.e. is undefined), this
// cannot be shortened to an optional chain, or else you end up with
// undefined === undefined, and the true path will hard error at runtime
node.exportClause &&
node.exportClause.kind === SyntaxKind.NamespaceExport
? this.convertChild(node.exportClause.name)
: null,
assertions: this.convertAssertClasue(node.assertClause),
});
}
this.assertModuleSpecifier(node, false);
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.ExportAllDeclaration,
source: this.convertChild(node.moduleSpecifier),
exportKind: node.isTypeOnly ? 'type' : 'value',
exported:
// note - for compat with 3.7.x, where node.exportClause is always undefined and
// SyntaxKind.NamespaceExport does not exist yet (i.e. is undefined), this
// cannot be shortened to an optional chain, or else you end up with
// undefined === undefined, and the true path will hard error at runtime
node.exportClause &&
node.exportClause.kind === SyntaxKind.NamespaceExport
? this.convertChild(node.exportClause.name)
: null,
assertions: this.convertAssertClasue(node.assertClause),
});
}
case SyntaxKind.ExportSpecifier:
return this.createNode(node, {
@ -1469,13 +1453,11 @@ class Converter {
expression: this.convertChild(node.expression),
});
}
else {
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration,
declaration: this.convertChild(node.expression),
exportKind: 'value',
});
}
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration,
declaration: this.convertChild(node.expression),
exportKind: 'value',
});
// Unary Operations
case SyntaxKind.PrefixUnaryExpression:
case SyntaxKind.PostfixUnaryExpression: {
@ -1491,14 +1473,12 @@ class Converter {
argument: this.convertChild(node.operand),
});
}
else {
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.UnaryExpression,
operator,
prefix: node.kind === SyntaxKind.PrefixUnaryExpression,
argument: this.convertChild(node.operand),
});
}
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.UnaryExpression,
operator,
prefix: node.kind === SyntaxKind.PrefixUnaryExpression,
argument: this.convertChild(node.operand),
});
}
case SyntaxKind.DeleteExpression:
return this.createNode(node, {
@ -1546,25 +1526,23 @@ class Converter {
result.expressions.push(this.convertChild(node.right));
return result;
}
else {
const expressionType = (0, node_utils_1.getBinaryExpressionType)(node.operatorToken);
if (this.allowPattern &&
expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression) {
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
decorators: [],
left: this.convertPattern(node.left, node),
optional: false,
right: this.convertChild(node.right),
typeAnnotation: undefined,
});
}
const expressionType = (0, node_utils_1.getBinaryExpressionType)(node.operatorToken);
if (this.allowPattern &&
expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression) {
return this.createNode(node, {
...expressionType,
left: this.converter(node.left, node, expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression),
type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern,
decorators: [],
left: this.convertPattern(node.left, node),
optional: false,
right: this.convertChild(node.right),
typeAnnotation: undefined,
});
}
return this.createNode(node, {
...expressionType,
left: this.converter(node.left, node, expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression),
right: this.convertChild(node.right),
});
}
case SyntaxKind.PropertyAccessExpression: {
const object = this.convertChild(node.expression);
@ -1813,12 +1791,10 @@ class Converter {
expression,
});
}
else {
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.JSXExpressionContainer,
expression,
});
}
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.JSXExpressionContainer,
expression,
});
}
case SyntaxKind.JsxAttribute: {
return this.createNode(node, {
@ -2252,12 +2228,10 @@ class Converter {
type: ts_estree_1.AST_NODE_TYPES.TSNullKeyword,
});
}
else {
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.TSLiteralType,
literal: this.convertChild(node.literal),
});
}
return this.createNode(node, {
type: ts_estree_1.AST_NODE_TYPES.TSLiteralType,
literal: this.convertChild(node.literal),
});
}
case SyntaxKind.TypeAssertionExpression: {
return this.createNode(node, {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -524,16 +524,14 @@ function convertToken(token, ast) {
},
};
}
else {
// @ts-expect-error TS is complaining about `value` not being the correct
// type but it is
return {
type: tokenType,
value,
range,
loc,
};
}
// @ts-expect-error TS is complaining about `value` not being the correct
// type but it is
return {
type: tokenType,
value,
range,
loc,
};
}
exports.convertToken = convertToken;
/**

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"version":3,"file":"ExpiringCache.d.ts","sourceRoot":"","sources":["../../src/parseSettings/ExpiringCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,uCAAuC,KAAK,CAAC;AAG1D,MAAM,WAAW,SAAS,CAAC,GAAG,EAAE,KAAK;IACnC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC;IAC5B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,qBAAa,aAAa,CAAC,IAAI,EAAE,MAAM,CAAE,YAAW,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;;gBAW7D,oBAAoB,EAAE,oBAAoB;IAItD,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAYnC,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS;IAoBlC,KAAK,IAAI,IAAI;CAGd"}
{"version":3,"file":"ExpiringCache.d.ts","sourceRoot":"","sources":["../../src/parseSettings/ExpiringCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,uCAAuC,KAAK,CAAC;AAG1D,MAAM,WAAW,SAAS,CAAC,GAAG,EAAE,KAAK;IACnC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC;IAC5B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,qBAAa,aAAa,CAAC,IAAI,EAAE,MAAM,CAAE,YAAW,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;;gBAW7D,oBAAoB,EAAE,oBAAoB;IAItD,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAYnC,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS;IAmBlC,KAAK,IAAI,IAAI;CAGd"}

View file

@ -45,10 +45,8 @@ class ExpiringCache {
// cache hit woo!
return entry.value;
}
else {
// key has expired - clean it up to free up memory
__classPrivateFieldGet(this, _ExpiringCache_map, "f").delete(key);
}
// key has expired - clean it up to free up memory
__classPrivateFieldGet(this, _ExpiringCache_map, "f").delete(key);
}
// no hit :'(
return undefined;

View file

@ -1 +1 @@
{"version":3,"file":"ExpiringCache.js","sourceRoot":"","sources":["../../src/parseSettings/ExpiringCache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEa,QAAA,uCAAuC,GAAG,EAAE,CAAC;AAC1D,MAAM,YAAY,GAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAO9C;;GAEG;AACH,MAAa,aAAa;IAWxB,YAAY,oBAA0C;QAV7C,sDAA4C;QAE5C,6BAAO,IAAI,GAAG,EAMpB,EAAC;QAGF,uB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AO9C;;GAEG;AACH,MAAa,aAAa;IAWxB,YAAY,oBAA0C;QAV7C,sDAA4C;QAE5C,6BAAO,IAAI,GAAG,EAMpB,EAAC;QAGF,uBAAA,IAAI,uCAAyB,oBAAoB,MAAA,CAAC;IACpD,CAAC;IAED,GAAG,CAAC,GAAS,EAAE,KAAa;QAC1B,uBAAA,IAAI,0BAAK,CAAC,GAAG,CAAC,GAAG,EAAE;YACjB,KAAK;YACL,QAAQ,EACN,uBAAA,IAAI,2CAAsB,KAAK,UAAU;gBACvC,CAAC,CAAC,qFAAqF;oBACrF,YAAY;gBACd,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;SACvB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,GAAS;QACX,MAAM,KAAK,GAAG,uBAAA,IAAI,0BAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,KAAK,EAAE,KAAK,IAAI,IAAI,EAAE;YACxB,IAAI,uBAAA,IAAI,2CAAsB,KAAK,UAAU,EAAE;gBAC7C,OAAO,KAAK,CAAC,KAAK,CAAC;aACpB;YAED,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YACrD,IAAI,UAAU,GAAG,uBAAA,IAAI,2CAAsB,EAAE;gBAC3C,iBAAiB;gBACjB,OAAO,KAAK,CAAC,KAAK,CAAC;aACpB;YACD,kDAAkD;YAClD,uBAAA,IAAI,0BAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,aAAa;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK;QACH,uBAAA,IAAI,0BAAK,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;CACF;AAjDD,sCAiDC"}

View file

@ -30,7 +30,7 @@ exports.warnAboutTSVersion = void 0;
const semver_1 = __importDefault(require("semver"));
const ts = __importStar(require("typescript"));
/**
* This needs to be kept in sync with /docs/maintenance/Versioning.mdx
* This needs to be kept in sync with /docs/users/Versioning.mdx
* in the typescript-eslint monorepo
*/
const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.3.5 <5.2.0';

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/typescript-estree",
"version": "6.2.0",
"version": "6.2.1",
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
"files": [
"dist",
@ -52,8 +52,8 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0",
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -85,5 +85,5 @@
]
}
},
"gitHead": "c869aa1792ed8e3c89d5ada2df8c00f8fe36526a"
"gitHead": "948b0614626c1c737ec30106425ef4a9b8c33dbf"
}

View file

@ -13,7 +13,7 @@ interface RuleMetaDataDocs {
/**
* The recommendation level for the rule.
* Used by the build tools to generate the recommended and strict configs.
* Set to false to not include it as a recommendation
* Exclude to not include it as a recommendation.
*/
recommended?: RuleRecommendation;
/**

View file

@ -13,7 +13,7 @@ interface RuleMetaDataDocs {
/**
* The recommendation level for the rule.
* Used by the build tools to generate the recommended and strict configs.
* Set to false to not include it as a recommendation
* Exclude to not include it as a recommendation.
*/
recommended?: RuleRecommendation;
/**

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/utils",
"version": "6.2.0",
"version": "6.2.1",
"description": "Utilities for working with TypeScript + ESLint together",
"files": [
"dist",
@ -68,16 +68,16 @@
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.2.0",
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/scope-manager": "6.2.1",
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/typescript-estree": "6.2.1",
"semver": "^7.5.4"
},
"peerDependencies": {
"eslint": "^7.0.0 || ^8.0.0"
},
"devDependencies": {
"@typescript-eslint/parser": "6.2.0",
"@typescript-eslint/parser": "6.2.1",
"typescript": "*"
},
"funding": {
@ -91,5 +91,5 @@
]
}
},
"gitHead": "c869aa1792ed8e3c89d5ada2df8c00f8fe36526a"
"gitHead": "948b0614626c1c737ec30106425ef4a9b8c33dbf"
}

View file

@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/visitor-keys",
"version": "6.2.0",
"version": "6.2.1",
"description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
"files": [
"dist",
@ -45,7 +45,7 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/types": "6.2.1",
"eslint-visitor-keys": "^3.4.1"
},
"devDependencies": {
@ -62,5 +62,5 @@
]
}
},
"gitHead": "c869aa1792ed8e3c89d5ada2df8c00f8fe36526a"
"gitHead": "948b0614626c1c737ec30106425ef4a9b8c33dbf"
}

100
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "codeql",
"version": "2.21.3",
"version": "2.21.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "codeql",
"version": "2.21.3",
"version": "2.21.4",
"license": "MIT",
"dependencies": {
"@actions/artifact": "^1.1.1",
@ -44,9 +44,9 @@
"@types/js-yaml": "^4.0.5",
"@types/node": "16.11.22",
"@types/semver": "^7.5.0",
"@types/sinon": "^10.0.15",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"@types/sinon": "^10.0.16",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"ava": "^5.3.1",
"eslint": "^8.46.0",
"eslint-import-resolver-typescript": "^3.5.5",
@ -963,9 +963,9 @@
"dev": true
},
"node_modules/@types/sinon": {
"version": "10.0.15",
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz",
"integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==",
"version": "10.0.16",
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz",
"integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==",
"dev": true,
"dependencies": {
"@types/sinonjs__fake-timers": "*"
@ -991,16 +991,16 @@
"integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ=="
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.0.tgz",
"integrity": "sha512-rClGrMuyS/3j0ETa1Ui7s6GkLhfZGKZL3ZrChLeAiACBE/tRc1wq8SNZESUuluxhLj9FkUefRs2l6bCIArWBiQ==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.1.tgz",
"integrity": "sha512-iZVM/ALid9kO0+I81pnp1xmYiFyqibAHzrqX4q5YvvVEyJqY+e6rfTXSCsc2jUxGNqJqTfFSSij/NFkZBiBzLw==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.2.0",
"@typescript-eslint/type-utils": "6.2.0",
"@typescript-eslint/utils": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0",
"@typescript-eslint/scope-manager": "6.2.1",
"@typescript-eslint/type-utils": "6.2.1",
"@typescript-eslint/utils": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@ -1027,15 +1027,15 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.2.0.tgz",
"integrity": "sha512-igVYOqtiK/UsvKAmmloQAruAdUHihsOCvplJpplPZ+3h4aDkC/UKZZNKgB6h93ayuYLuEymU3h8nF1xMRbh37g==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.2.1.tgz",
"integrity": "sha512-Ld+uL1kYFU8e6btqBFpsHkwQ35rw30IWpdQxgOqOh4NfxSDH6uCkah1ks8R/RgQqI5hHPXMaLy9fbFseIe+dIg==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.2.0",
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0",
"@typescript-eslint/scope-manager": "6.2.1",
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/typescript-estree": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1",
"debug": "^4.3.4"
},
"engines": {
@ -1055,13 +1055,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz",
"integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.1.tgz",
"integrity": "sha512-UCqBF9WFqv64xNsIEPfBtenbfodPXsJ3nPAr55mGPkQIkiQvgoWNo+astj9ZUfJfVKiYgAZDMnM6dIpsxUMp3Q==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0"
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -1072,13 +1072,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.2.0.tgz",
"integrity": "sha512-DnGZuNU2JN3AYwddYIqrVkYW0uUQdv0AY+kz2M25euVNlujcN2u+rJgfJsBFlUEzBB6OQkUqSZPyuTLf2bP5mw==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.2.1.tgz",
"integrity": "sha512-fTfCgomBMIgu2Dh2Or3gMYgoNAnQm3RLtRp+jP7A8fY+LJ2+9PNpi5p6QB5C4RSP+U3cjI0vDlI3mspAkpPVbQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/utils": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.1",
"@typescript-eslint/utils": "6.2.1",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
@ -1099,9 +1099,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.0.tgz",
"integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.1.tgz",
"integrity": "sha512-528bGcoelrpw+sETlyM91k51Arl2ajbNT9L4JwoXE2dvRe1yd8Q64E4OL7vHYw31mlnVsf+BeeLyAZUEQtqahQ==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -1112,13 +1112,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz",
"integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.1.tgz",
"integrity": "sha512-G+UJeQx9AKBHRQBpmvr8T/3K5bJa485eu+4tQBxFq0KoT22+jJyzo1B50JDT9QdC1DEmWQfdKsa8ybiNWYsi0Q==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/visitor-keys": "6.2.0",
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/visitor-keys": "6.2.1",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -1139,17 +1139,17 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.2.0.tgz",
"integrity": "sha512-RCFrC1lXiX1qEZN8LmLrxYRhOkElEsPKTVSNout8DMzf8PeWoQG7Rxz2SadpJa3VSh5oYKGwt7j7X/VRg+Y3OQ==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.2.1.tgz",
"integrity": "sha512-eBIXQeupYmxVB6S7x+B9SdBeB6qIdXKjgQBge2J+Ouv8h9Cxm5dHf/gfAZA6dkMaag+03HdbVInuXMmqFB/lKQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.2.0",
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/typescript-estree": "6.2.0",
"@typescript-eslint/scope-manager": "6.2.1",
"@typescript-eslint/types": "6.2.1",
"@typescript-eslint/typescript-estree": "6.2.1",
"semver": "^7.5.4"
},
"engines": {
@ -1164,12 +1164,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz",
"integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.1.tgz",
"integrity": "sha512-iTN6w3k2JEZ7cyVdZJTVJx2Lv7t6zFA8DCrJEHD2mwfc16AEvvBWVhbFh34XyG2NORCd0viIgQY1+u7kPI0WpA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.2.0",
"@typescript-eslint/types": "6.2.1",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {

View file

@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "2.21.3",
"version": "2.21.4",
"private": true,
"description": "CodeQL action",
"scripts": {
@ -59,9 +59,9 @@
"@types/js-yaml": "^4.0.5",
"@types/node": "16.11.22",
"@types/semver": "^7.5.0",
"@types/sinon": "^10.0.15",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"@types/sinon": "^10.0.16",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"ava": "^5.3.1",
"eslint": "^8.46.0",
"eslint-import-resolver-typescript": "^3.5.5",