mirror of
https://github.com/github/codeql-action.git
synced 2025-12-30 11:10:22 +08:00
Compare commits
80 Commits
v3.24.6
...
codeql-bun
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99c9897648 | ||
|
|
d7c4cc360c | ||
|
|
048b508a9d | ||
|
|
84ba7fb56d | ||
|
|
016720d81f | ||
|
|
f835435c19 | ||
|
|
58194bf81a | ||
|
|
956f09c2ef | ||
|
|
a99c6230dc | ||
|
|
155888c08e | ||
|
|
82b82e58c0 | ||
|
|
3c4b8bc120 | ||
|
|
a0a63a2dd4 | ||
|
|
3bd271cec3 | ||
|
|
70aa50b057 | ||
|
|
6ac57535de | ||
|
|
e20c273295 | ||
|
|
2bbafcdd7f | ||
|
|
7e30c622b0 | ||
|
|
ccc609bf1a | ||
|
|
a12b868bbc | ||
|
|
3d817349a4 | ||
|
|
ca4079b3a2 | ||
|
|
7cdd97256b | ||
|
|
1b1aada464 | ||
|
|
6505708f95 | ||
|
|
09d4101d2b | ||
|
|
a3ab02e645 | ||
|
|
9cf4574790 | ||
|
|
964f5e7811 | ||
|
|
9c0c35b370 | ||
|
|
c84e4c8e7b | ||
|
|
4aca720110 | ||
|
|
7f375aeb76 | ||
|
|
294b6df61d | ||
|
|
1aae1e7090 | ||
|
|
ea1261a218 | ||
|
|
66736a1775 | ||
|
|
dfb0fd0039 | ||
|
|
423a04bb2c | ||
|
|
6a57a861ab | ||
|
|
4b2a78627b | ||
|
|
05963f47d8 | ||
|
|
2b9b521560 | ||
|
|
1ecc2779e9 | ||
|
|
e28ae3a84c | ||
|
|
bddfc7c6d5 | ||
|
|
3edd1bf725 | ||
|
|
88a0b7abb3 | ||
|
|
88b28eb70d | ||
|
|
f055b5e672 | ||
|
|
0d680ab61c | ||
|
|
3d82264f40 | ||
|
|
e402144d13 | ||
|
|
a009e4d1af | ||
|
|
3b6ebfb5f8 | ||
|
|
8da95d81a8 | ||
|
|
070b05147a | ||
|
|
649f3e87e1 | ||
|
|
362c407426 | ||
|
|
f195496548 | ||
|
|
a7b089b87e | ||
|
|
ef507e1748 | ||
|
|
3ab4101902 | ||
|
|
a006adfa77 | ||
|
|
5e882999f1 | ||
|
|
69e120d747 | ||
|
|
5ec06c71f0 | ||
|
|
caf377935a | ||
|
|
532ca5486e | ||
|
|
2fa207a8b7 | ||
|
|
24c3eda0e3 | ||
|
|
27a6cd0a11 | ||
|
|
1bac334738 | ||
|
|
83a02f7883 | ||
|
|
849379362c | ||
|
|
5fa9b09edf | ||
|
|
baf3361f31 | ||
|
|
40034859a7 | ||
|
|
8762383e8d |
2
.github/actions/setup-swift/action.yml
vendored
2
.github/actions/setup-swift/action.yml
vendored
@@ -33,7 +33,7 @@ runs:
|
|||||||
fi
|
fi
|
||||||
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
|
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: swift-actions/setup-swift@cdbe0f7f4c77929b6580e71983e8606e55ffe7e4 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
|
- uses: swift-actions/setup-swift@e1dca7c4a36344146bbc2803f0d538462477bb37 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
|
||||||
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
|
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
|
||||||
with:
|
with:
|
||||||
swift-version: "${{ steps.get_swift_version.outputs.version }}"
|
swift-version: "${{ steps.get_swift_version.outputs.version }}"
|
||||||
|
|||||||
@@ -50,9 +50,11 @@ jobs:
|
|||||||
run: ./build.sh
|
run: ./build.sh
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
id: analysis
|
id: analysis
|
||||||
|
env:
|
||||||
|
# Forces a failure in this step.
|
||||||
|
CODEQL_ACTION_EXTRA_OPTIONS: '{ "database": { "finalize": ["--invalid-option"] } }'
|
||||||
with:
|
with:
|
||||||
expect-error: true
|
expect-error: true
|
||||||
ram: 1
|
|
||||||
download-and-check-artifacts:
|
download-and-check-artifacts:
|
||||||
name: Download and check debug artifacts after failure in analyze
|
name: Download and check debug artifacts after failure in analyze
|
||||||
needs: upload-artifacts
|
needs: upload-artifacts
|
||||||
|
|||||||
16
CHANGELOG.md
16
CHANGELOG.md
@@ -4,6 +4,22 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
|
|||||||
|
|
||||||
Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.
|
Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.
|
||||||
|
|
||||||
|
## [UNRELEASED]
|
||||||
|
|
||||||
|
No user facing changes.
|
||||||
|
|
||||||
|
## 3.24.9 - 22 Mar 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.16.5. [#2203](https://github.com/github/codeql-action/pull/2203)
|
||||||
|
|
||||||
|
## 3.24.8 - 18 Mar 2024
|
||||||
|
|
||||||
|
- Improve the ease of debugging extraction issues by increasing the verbosity of the extractor logs when running in debug mode. [#2195](https://github.com/github/codeql-action/pull/2195)
|
||||||
|
|
||||||
|
## 3.24.7 - 12 Mar 2024
|
||||||
|
|
||||||
|
- Update default CodeQL bundle version to 2.16.4. [#2185](https://github.com/github/codeql-action/pull/2185)
|
||||||
|
|
||||||
## 3.24.6 - 29 Feb 2024
|
## 3.24.6 - 29 Feb 2024
|
||||||
|
|
||||||
No user facing changes.
|
No user facing changes.
|
||||||
|
|||||||
@@ -7,25 +7,33 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
# If not specified the Action will check in several places until it finds the CodeQL tools.
|
# If not specified the Action will check in several places until it finds the CodeQL tools.
|
||||||
languages:
|
languages:
|
||||||
description: |
|
description: >-
|
||||||
A comma-separated value of the languages to be analysed e.g. python,javascript
|
A comma-separated list of CodeQL languages to analyze.
|
||||||
|
|
||||||
|
Due to the performance benefit of parallelizing builds, we recommend specifying languages to
|
||||||
|
analyze using a matrix and providing `\$\{{ matrix.language }}` as this input.
|
||||||
|
|
||||||
|
For more information, see
|
||||||
|
https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#changing-the-languages-that-are-analyzed.
|
||||||
required: false
|
required: false
|
||||||
build-mode:
|
build-mode:
|
||||||
description: >-
|
description: >-
|
||||||
[Experimental, for internal testing only] The build mode that will be used to analyze the language.
|
The build mode that will be used to analyze the language. This input is only available when
|
||||||
This input is only available in single-language analyses.
|
analyzing a single CodeQL language per job, for example using a matrix.
|
||||||
|
|
||||||
Available build modes will differ based on the language being analyzed. One of:
|
Available build modes will differ based on the language being analyzed. One of:
|
||||||
|
|
||||||
- none: The database will be created without building the source code.
|
- `none`: The database will be created without building the source code.
|
||||||
Available for all interpreted languages and some compiled languages.
|
Available for all interpreted languages and some compiled languages.
|
||||||
- autobuild: The database will be created by attempting to automatically build the source code.
|
- `autobuild`: The database will be created by attempting to automatically build the source
|
||||||
|
code.
|
||||||
To use this build mode, ensure that your workflow calls the `autobuild` action
|
To use this build mode, ensure that your workflow calls the `autobuild` action
|
||||||
between the `init` and `analyze` steps.
|
between the `init` and `analyze` steps.
|
||||||
Available for all compiled languages.
|
Available for all compiled languages.
|
||||||
- manual: The database will be created by building the source code using a manually specified
|
- `manual`: The database will be created by building the source code using a manually
|
||||||
build command. To use this build mode, specify manual build steps in your workflow
|
specified build command. To use this build mode, specify manual build steps in
|
||||||
between the `init` and `analyze` steps. Available for all compiled languages.
|
your workflow between the `init` and `analyze` steps. Available for all
|
||||||
|
compiled languages.
|
||||||
required: false
|
required: false
|
||||||
token:
|
token:
|
||||||
description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input.
|
description: GitHub token to use for authenticating with this instance of GitHub. To download custom packs from multiple registries, use the registries input.
|
||||||
@@ -70,7 +78,7 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
packs:
|
packs:
|
||||||
description: >-
|
description: >-
|
||||||
[Experimental] Comma-separated list of packs to run. Reference a pack in the format `scope/name[@version]`. If `version` is not
|
Comma-separated list of packs to run. Reference a pack in the format `scope/name[@version]`. If `version` is not
|
||||||
specified, then the latest version of the pack is used. By default, this overrides the same setting in a
|
specified, then the latest version of the pack is used. By default, this overrides the same setting in a
|
||||||
configuration file; prefix with "+" to use both sets of packs.
|
configuration file; prefix with "+" to use both sets of packs.
|
||||||
|
|
||||||
|
|||||||
4
lib/analyze-action-post.js
generated
4
lib/analyze-action-post.js
generated
@@ -31,10 +31,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const analyzeActionPostHelper = __importStar(require("./analyze-action-post-helper"));
|
const analyzeActionPostHelper = __importStar(require("./analyze-action-post-helper"));
|
||||||
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
||||||
|
const uploadSarifActionPostHelper = __importStar(require("./upload-sarif-action-post-helper"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
async function runWrapper() {
|
async function runWrapper() {
|
||||||
try {
|
try {
|
||||||
await analyzeActionPostHelper.run(debugArtifacts.uploadSarifDebugArtifact);
|
await analyzeActionPostHelper.run(debugArtifacts.uploadSarifDebugArtifact);
|
||||||
|
// Also run the upload-sarif post action since we're potentially running
|
||||||
|
// the same steps in the analyze action.
|
||||||
|
await uploadSarifActionPostHelper.uploadArtifacts(debugArtifacts.uploadDebugArtifacts);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`analyze post-action step failed: ${(0, util_1.wrapError)(error).message}`);
|
core.setFailed(`analyze post-action step failed: ${(0, util_1.wrapError)(error).message}`);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,sFAAwE;AACxE,kEAAoD;AACpD,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;IAC7E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,sFAAwE;AACxE,kEAAoD;AACpD,+FAAiF;AACjF,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;QAE3E,wEAAwE;QACxE,wCAAwC;QACxC,MAAM,2BAA2B,CAAC,eAAe,CAC/C,cAAc,CAAC,oBAAoB,CACpC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
19
lib/analyze.js
generated
19
lib/analyze.js
generated
@@ -98,8 +98,25 @@ async function runExtraction(codeql, config, logger, features) {
|
|||||||
config.buildMode === config_utils_1.BuildMode.Autobuild) {
|
config.buildMode === config_utils_1.BuildMode.Autobuild) {
|
||||||
await (0, autobuild_1.setupCppAutobuild)(codeql, logger);
|
await (0, autobuild_1.setupCppAutobuild)(codeql, logger);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
await codeql.extractUsingBuildMode(config, language);
|
await codeql.extractUsingBuildMode(config, language);
|
||||||
}
|
}
|
||||||
|
catch (e) {
|
||||||
|
if (config.buildMode === config_utils_1.BuildMode.Autobuild) {
|
||||||
|
const prefix = "We were unable to automatically build your code. " +
|
||||||
|
"Please change the build mode for this language to manual and specify build steps " +
|
||||||
|
"for your project. For more information, see " +
|
||||||
|
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed.";
|
||||||
|
const ErrorConstructor = e instanceof util.ConfigurationError
|
||||||
|
? util.ConfigurationError
|
||||||
|
: Error;
|
||||||
|
throw new ErrorConstructor(`${prefix} ${util.wrapError(e).message}`);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
await codeql.extractScannedLanguage(config, language);
|
await codeql.extractScannedLanguage(config, language);
|
||||||
}
|
}
|
||||||
@@ -138,7 +155,7 @@ async function finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.startGroup(`Finalizing ${language}`);
|
logger.startGroup(`Finalizing ${language}`);
|
||||||
await codeql.finalizeDatabase(util.getCodeQLDatabasePath(config, language), threadsFlag, memoryFlag);
|
await codeql.finalizeDatabase(util.getCodeQLDatabasePath(config, language), threadsFlag, memoryFlag, config.debugMode);
|
||||||
logger.endGroup();
|
logger.endGroup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{ "maximumVersion": "3.12", "minimumVersion": "3.8" }
|
{ "maximumVersion": "3.13", "minimumVersion": "3.8" }
|
||||||
|
|||||||
2
lib/autobuild.js
generated
2
lib/autobuild.js
generated
@@ -141,7 +141,7 @@ async function runAutobuild(language, config, logger) {
|
|||||||
if (language === languages_1.Language.cpp) {
|
if (language === languages_1.Language.cpp) {
|
||||||
await setupCppAutobuild(codeQL, logger);
|
await setupCppAutobuild(codeQL, logger);
|
||||||
}
|
}
|
||||||
await codeQL.runAutobuild(language);
|
await codeQL.runAutobuild(language, config.debugMode);
|
||||||
if (language === languages_1.Language.go) {
|
if (language === languages_1.Language.go) {
|
||||||
core.exportVariable(environment_1.EnvVar.DID_AUTOBUILD_GOLANG, "true");
|
core.exportVariable(environment_1.EnvVar.DID_AUTOBUILD_GOLANG, "true");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAA6E;AAC7E,6CAAgD;AAChD,qCAA6C;AAE7C,iDAA2C;AAC3C,+CAAuC;AACvC,mDAAmE;AACnE,2CAAyD;AAEzD,6CAAkD;AAClD,qDAAgD;AAChD,iCAA6C;AAEtC,KAAK,UAAU,2BAA2B,CAC/C,MAAc,EACd,MAA0B,EAC1B,MAAc;IAEd,IACE,CAAC,MAAM,CAAC,SAAS,KAAK,wBAAS,CAAC,IAAI;QAClC,CAAC,MAAM,MAAM,CAAC,eAAe,CAAC,6BAAY,CAAC,wBAAwB,CAAC,CAAC,CAAC;QACxE,MAAM,CAAC,SAAS,KAAK,wBAAS,CAAC,MAAM,EACrC,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,SAAS,oCAAoC,CAAC,CAAC;QAC3E,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,0CAA0C;IAC1C,mFAAmF;IACnF,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CAAC;YACF,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CACT,YAAY,WAAW,yCAAyC,MAAM,yCAAyC,MAAM,IAAI,CAC1H,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAI,CAAC,aAAa,WAAW,GAAG,CAAC,CAAC;QACzC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;AACH,CAAC;AAvCD,8CAuCC;AAEM,KAAK,UAAU,YAAY,CAChC,QAAkB,EAClB,MAA0B,EAC1B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,qCAAqC,QAAQ,OAAO,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,IAAI,QAAQ,KAAK,oBAAQ,CAAC,GAAG,EAAE,CAAC;QAC9B,MAAM,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IACD,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IACtD,IAAI,QAAQ,KAAK,oBAAQ,CAAC,EAAE,EAAE,CAAC;QAC7B,IAAI,CAAC,cAAc,CAAC,oBAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;IACD,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAfD,oCAeC"}
|
||||||
61
lib/cli-errors.js
generated
61
lib/cli-errors.js
generated
@@ -13,17 +13,30 @@ class CommandInvocationError extends Error {
|
|||||||
.map((x) => (x.includes(" ") ? `'${x}'` : x))
|
.map((x) => (x.includes(" ") ? `'${x}'` : x))
|
||||||
.join(" ");
|
.join(" ");
|
||||||
const fatalErrors = extractFatalErrors(stderr);
|
const fatalErrors = extractFatalErrors(stderr);
|
||||||
const lastLine = stderr.trim().split("\n").pop()?.trim();
|
const autobuildErrors = extractAutobuildErrors(stderr);
|
||||||
let error = fatalErrors
|
let message;
|
||||||
? ` and error was: ${fatalErrors.trim()}`
|
if (fatalErrors) {
|
||||||
: lastLine
|
message =
|
||||||
? ` and last log line was: ${lastLine}`
|
`Encountered a fatal error while running "${prettyCommand}". ` +
|
||||||
: "";
|
`Exit code was ${exitCode} and error was: ${fatalErrors.trim()} See the logs for more details.`;
|
||||||
if (error[error.length - 1] !== ".") {
|
|
||||||
error += ".";
|
|
||||||
}
|
}
|
||||||
super(`Encountered a fatal error while running "${prettyCommand}". ` +
|
else if (autobuildErrors) {
|
||||||
`Exit code was ${exitCode}${error} See the logs for more details.`);
|
const autobuildHelpLink = "https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed";
|
||||||
|
message =
|
||||||
|
"We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
|
`For more information, see ${autobuildHelpLink}. ` +
|
||||||
|
`Encountered the following error: ${autobuildErrors}`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let lastLine = stderr.trim().split("\n").pop()?.trim() || "";
|
||||||
|
if (lastLine[lastLine.length - 1] !== ".") {
|
||||||
|
lastLine += ".";
|
||||||
|
}
|
||||||
|
message =
|
||||||
|
`Encountered a fatal error while running "${prettyCommand}". ` +
|
||||||
|
`Exit code was ${exitCode} and last log line was: ${lastLine} See the logs for more details.`;
|
||||||
|
}
|
||||||
|
super(message);
|
||||||
this.exitCode = exitCode;
|
this.exitCode = exitCode;
|
||||||
this.stderr = stderr;
|
this.stderr = stderr;
|
||||||
this.stdout = stdout;
|
this.stdout = stdout;
|
||||||
@@ -88,26 +101,44 @@ function extractFatalErrors(error) {
|
|||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
function extractAutobuildErrors(error) {
|
||||||
|
const pattern = /.*\[autobuild\] \[ERROR\] (.*)/gi;
|
||||||
|
let errorLines = [...error.matchAll(pattern)].map((match) => match[1]);
|
||||||
|
// Truncate if there are more than 10 matching lines.
|
||||||
|
if (errorLines.length > 10) {
|
||||||
|
errorLines = errorLines.slice(0, 10);
|
||||||
|
errorLines.push("(truncated)");
|
||||||
|
}
|
||||||
|
return errorLines.join("\n") || undefined;
|
||||||
|
}
|
||||||
function ensureEndsInPeriod(text) {
|
function ensureEndsInPeriod(text) {
|
||||||
return text[text.length - 1] === "." ? text : `${text}.`;
|
return text[text.length - 1] === "." ? text : `${text}.`;
|
||||||
}
|
}
|
||||||
/** Error messages from the CLI that we consider configuration errors and handle specially. */
|
/** Error messages from the CLI that we consider configuration errors and handle specially. */
|
||||||
var CliConfigErrorCategory;
|
var CliConfigErrorCategory;
|
||||||
(function (CliConfigErrorCategory) {
|
(function (CliConfigErrorCategory) {
|
||||||
|
CliConfigErrorCategory["GradleBuildFailed"] = "GradleBuildFailed";
|
||||||
CliConfigErrorCategory["IncompatibleWithActionVersion"] = "IncompatibleWithActionVersion";
|
CliConfigErrorCategory["IncompatibleWithActionVersion"] = "IncompatibleWithActionVersion";
|
||||||
CliConfigErrorCategory["InitCalledTwice"] = "InitCalledTwice";
|
CliConfigErrorCategory["InitCalledTwice"] = "InitCalledTwice";
|
||||||
CliConfigErrorCategory["InvalidSourceRoot"] = "InvalidSourceRoot";
|
CliConfigErrorCategory["InvalidSourceRoot"] = "InvalidSourceRoot";
|
||||||
|
CliConfigErrorCategory["MavenBuildFailed"] = "MavenBuildFailed";
|
||||||
CliConfigErrorCategory["NoBuildCommandAutodetected"] = "NoBuildCommandAutodetected";
|
CliConfigErrorCategory["NoBuildCommandAutodetected"] = "NoBuildCommandAutodetected";
|
||||||
CliConfigErrorCategory["NoBuildMethodAutodetected"] = "NoBuildMethodAutodetected";
|
CliConfigErrorCategory["NoBuildMethodAutodetected"] = "NoBuildMethodAutodetected";
|
||||||
CliConfigErrorCategory["NoSourceCodeSeen"] = "NoSourceCodeSeen";
|
CliConfigErrorCategory["NoSourceCodeSeen"] = "NoSourceCodeSeen";
|
||||||
CliConfigErrorCategory["NoSupportedBuildCommandSucceeded"] = "NoSupportedBuildCommandSucceeded";
|
CliConfigErrorCategory["NoSupportedBuildCommandSucceeded"] = "NoSupportedBuildCommandSucceeded";
|
||||||
CliConfigErrorCategory["NoSupportedBuildSystemDetected"] = "NoSupportedBuildSystemDetected";
|
CliConfigErrorCategory["NoSupportedBuildSystemDetected"] = "NoSupportedBuildSystemDetected";
|
||||||
|
CliConfigErrorCategory["SwiftBuildFailed"] = "SwiftBuildFailed";
|
||||||
})(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {}));
|
})(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {}));
|
||||||
/**
|
/**
|
||||||
* All of our caught CLI error messages that we handle specially: ie. if we
|
* All of our caught CLI error messages that we handle specially: ie. if we
|
||||||
* would like to categorize an error as a configuration error or not.
|
* would like to categorize an error as a configuration error or not.
|
||||||
*/
|
*/
|
||||||
exports.cliErrorsConfig = {
|
exports.cliErrorsConfig = {
|
||||||
|
[CliConfigErrorCategory.GradleBuildFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("[autobuild] FAILURE: Build failed with an exception."),
|
||||||
|
],
|
||||||
|
},
|
||||||
// Version of CodeQL CLI is incompatible with this version of the CodeQL Action
|
// Version of CodeQL CLI is incompatible with this version of the CodeQL Action
|
||||||
[CliConfigErrorCategory.IncompatibleWithActionVersion]: {
|
[CliConfigErrorCategory.IncompatibleWithActionVersion]: {
|
||||||
cliErrorMessageCandidates: [
|
cliErrorMessageCandidates: [
|
||||||
@@ -124,6 +155,11 @@ exports.cliErrorsConfig = {
|
|||||||
[CliConfigErrorCategory.InvalidSourceRoot]: {
|
[CliConfigErrorCategory.InvalidSourceRoot]: {
|
||||||
cliErrorMessageCandidates: [new RegExp("Invalid source root")],
|
cliErrorMessageCandidates: [new RegExp("Invalid source root")],
|
||||||
},
|
},
|
||||||
|
[CliConfigErrorCategory.MavenBuildFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("\\[autobuild\\] \\[ERROR\\] Failed to execute goal"),
|
||||||
|
],
|
||||||
|
},
|
||||||
[CliConfigErrorCategory.NoBuildCommandAutodetected]: {
|
[CliConfigErrorCategory.NoBuildCommandAutodetected]: {
|
||||||
cliErrorMessageCandidates: [
|
cliErrorMessageCandidates: [
|
||||||
new RegExp("Could not auto-detect a suitable build method"),
|
new RegExp("Could not auto-detect a suitable build method"),
|
||||||
@@ -162,6 +198,11 @@ exports.cliErrorsConfig = {
|
|||||||
new RegExp("No supported build system detected"),
|
new RegExp("No supported build system detected"),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
[CliConfigErrorCategory.SwiftBuildFailed]: {
|
||||||
|
cliErrorMessageCandidates: [
|
||||||
|
new RegExp("\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command"),
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Check if the given CLI error or exit code, if applicable, apply to any known
|
* Check if the given CLI error or exit code, if applicable, apply to any known
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
89
lib/codeql.js
generated
89
lib/codeql.js
generated
@@ -65,6 +65,8 @@ const GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.7";
|
|||||||
* This is the deprecation date for the version of GHES that was most recently deprecated.
|
* This is the deprecation date for the version of GHES that was most recently deprecated.
|
||||||
*/
|
*/
|
||||||
const GHES_MOST_RECENT_DEPRECATION_DATE = "2023-11-08";
|
const GHES_MOST_RECENT_DEPRECATION_DATE = "2023-11-08";
|
||||||
|
/** The CLI verbosity level to use for extraction in debug mode. */
|
||||||
|
const EXTRACTION_DEBUG_MODE_VERBOSITY = "progress++";
|
||||||
/*
|
/*
|
||||||
* Deprecated in favor of ToolsFeature.
|
* Deprecated in favor of ToolsFeature.
|
||||||
*
|
*
|
||||||
@@ -110,6 +112,10 @@ exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.15.0";
|
|||||||
* Versions 2.15.0+ of the CodeQL CLI support sub-language file coverage information.
|
* Versions 2.15.0+ of the CodeQL CLI support sub-language file coverage information.
|
||||||
*/
|
*/
|
||||||
exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = "2.15.0";
|
exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = "2.15.0";
|
||||||
|
/**
|
||||||
|
* Versions 2.15.2+ of the CodeQL CLI support the `--sarif-include-query-help` option.
|
||||||
|
*/
|
||||||
|
const CODEQL_VERSION_INCLUDE_QUERY_HELP = "2.15.2";
|
||||||
/**
|
/**
|
||||||
* Set up CodeQL CLI access.
|
* Set up CodeQL CLI access.
|
||||||
*
|
*
|
||||||
@@ -201,6 +207,7 @@ function setCodeQL(partialCodeql) {
|
|||||||
databaseExportDiagnostics: resolveFunction(partialCodeql, "databaseExportDiagnostics"),
|
databaseExportDiagnostics: resolveFunction(partialCodeql, "databaseExportDiagnostics"),
|
||||||
diagnosticsExport: resolveFunction(partialCodeql, "diagnosticsExport"),
|
diagnosticsExport: resolveFunction(partialCodeql, "diagnosticsExport"),
|
||||||
resolveExtractor: resolveFunction(partialCodeql, "resolveExtractor"),
|
resolveExtractor: resolveFunction(partialCodeql, "resolveExtractor"),
|
||||||
|
mergeResults: resolveFunction(partialCodeql, "mergeResults"),
|
||||||
};
|
};
|
||||||
return cachedCodeQL;
|
return cachedCodeQL;
|
||||||
}
|
}
|
||||||
@@ -291,7 +298,6 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
else if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)) {
|
else if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)) {
|
||||||
extraArgs.push("--no-sublanguage-file-coverage");
|
extraArgs.push("--no-sublanguage-file-coverage");
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
await runTool(cmd, [
|
await runTool(cmd, [
|
||||||
"database",
|
"database",
|
||||||
"init",
|
"init",
|
||||||
@@ -302,15 +308,8 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
...extraArgs,
|
...extraArgs,
|
||||||
...getExtraOptionsFromEnv(["database", "init"]),
|
...getExtraOptionsFromEnv(["database", "init"]),
|
||||||
], { stdin: externalRepositoryToken });
|
], { stdin: externalRepositoryToken });
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
if (e instanceof Error) {
|
|
||||||
throw (0, cli_errors_1.wrapCliConfigurationError)(e);
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async runAutobuild(language) {
|
async runAutobuild(language, enableDebugLogging) {
|
||||||
const autobuildCmd = path.join(await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh");
|
const autobuildCmd = path.join(await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh");
|
||||||
// Update JAVA_TOOL_OPTIONS to contain '-Dhttp.keepAlive=false'
|
// Update JAVA_TOOL_OPTIONS to contain '-Dhttp.keepAlive=false'
|
||||||
// This is because of an issue with Azure pipelines timing out connections after 4 minutes
|
// This is because of an issue with Azure pipelines timing out connections after 4 minutes
|
||||||
@@ -323,6 +322,11 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
"-Dhttp.keepAlive=false",
|
"-Dhttp.keepAlive=false",
|
||||||
"-Dmaven.wagon.http.pool=false",
|
"-Dmaven.wagon.http.pool=false",
|
||||||
].join(" ");
|
].join(" ");
|
||||||
|
// Bump the verbosity of the autobuild command if we're in debug mode
|
||||||
|
if (enableDebugLogging) {
|
||||||
|
process.env[environment_1.EnvVar.CLI_VERBOSITY] =
|
||||||
|
process.env[environment_1.EnvVar.CLI_VERBOSITY] || EXTRACTION_DEBUG_MODE_VERBOSITY;
|
||||||
|
}
|
||||||
// On macOS, System Integrity Protection (SIP) typically interferes with
|
// On macOS, System Integrity Protection (SIP) typically interferes with
|
||||||
// CodeQL build tracing of protected binaries.
|
// CodeQL build tracing of protected binaries.
|
||||||
// The usual workaround is to prefix `$CODEQL_RUNNER` to build commands:
|
// The usual workaround is to prefix `$CODEQL_RUNNER` to build commands:
|
||||||
@@ -336,15 +340,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
// When `DYLD_INSERT_LIBRARIES` is set in the environment for a step,
|
// When `DYLD_INSERT_LIBRARIES` is set in the environment for a step,
|
||||||
// the Actions runtime introduces its own workaround for SIP
|
// the Actions runtime introduces its own workaround for SIP
|
||||||
// (https://github.com/actions/runner/pull/416).
|
// (https://github.com/actions/runner/pull/416).
|
||||||
try {
|
|
||||||
await runTool(autobuildCmd);
|
await runTool(autobuildCmd);
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
if (e instanceof Error) {
|
|
||||||
throw (0, cli_errors_1.wrapCliConfigurationError)(e);
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async extractScannedLanguage(config, language) {
|
async extractScannedLanguage(config, language) {
|
||||||
await runTool(cmd, [
|
await runTool(cmd, [
|
||||||
@@ -352,6 +348,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
"trace-command",
|
"trace-command",
|
||||||
"--index-traceless-dbs",
|
"--index-traceless-dbs",
|
||||||
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
||||||
|
...getExtractionVerbosityArguments(config.debugMode),
|
||||||
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
||||||
util.getCodeQLDatabasePath(config, language),
|
util.getCodeQLDatabasePath(config, language),
|
||||||
]);
|
]);
|
||||||
@@ -362,29 +359,23 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
"trace-command",
|
"trace-command",
|
||||||
"--use-build-mode",
|
"--use-build-mode",
|
||||||
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
|
||||||
|
...getExtractionVerbosityArguments(config.debugMode),
|
||||||
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
...getExtraOptionsFromEnv(["database", "trace-command"]),
|
||||||
util.getCodeQLDatabasePath(config, language),
|
util.getCodeQLDatabasePath(config, language),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
async finalizeDatabase(databasePath, threadsFlag, memoryFlag) {
|
async finalizeDatabase(databasePath, threadsFlag, memoryFlag, enableDebugLogging) {
|
||||||
const args = [
|
const args = [
|
||||||
"database",
|
"database",
|
||||||
"finalize",
|
"finalize",
|
||||||
"--finalize-dataset",
|
"--finalize-dataset",
|
||||||
threadsFlag,
|
threadsFlag,
|
||||||
memoryFlag,
|
memoryFlag,
|
||||||
|
...getExtractionVerbosityArguments(enableDebugLogging),
|
||||||
...getExtraOptionsFromEnv(["database", "finalize"]),
|
...getExtraOptionsFromEnv(["database", "finalize"]),
|
||||||
databasePath,
|
databasePath,
|
||||||
];
|
];
|
||||||
try {
|
|
||||||
await runTool(cmd, args);
|
await runTool(cmd, args);
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
if (e instanceof Error) {
|
|
||||||
throw (0, cli_errors_1.wrapCliConfigurationError)(e);
|
|
||||||
}
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async resolveLanguages() {
|
async resolveLanguages() {
|
||||||
const codeqlArgs = [
|
const codeqlArgs = [
|
||||||
@@ -492,9 +483,9 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
"--print-diagnostics-summary",
|
"--print-diagnostics-summary",
|
||||||
"--print-metrics-summary",
|
"--print-metrics-summary",
|
||||||
"--sarif-add-baseline-file-info",
|
"--sarif-add-baseline-file-info",
|
||||||
"--sarif-add-query-help",
|
|
||||||
"--sarif-group-rules-by-pack",
|
|
||||||
...(await getCodeScanningConfigExportArguments(config, this)),
|
...(await getCodeScanningConfigExportArguments(config, this)),
|
||||||
|
"--sarif-group-rules-by-pack",
|
||||||
|
...(await getCodeScanningQueryHelpArguments(this)),
|
||||||
...getExtraOptionsFromEnv(["database", "interpret-results"]),
|
...getExtraOptionsFromEnv(["database", "interpret-results"]),
|
||||||
];
|
];
|
||||||
if (automationDetailsId !== undefined) {
|
if (automationDetailsId !== undefined) {
|
||||||
@@ -674,6 +665,22 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
|||||||
}).exec();
|
}).exec();
|
||||||
return JSON.parse(extractorPath);
|
return JSON.parse(extractorPath);
|
||||||
},
|
},
|
||||||
|
async mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory = false, }) {
|
||||||
|
const args = [
|
||||||
|
"github",
|
||||||
|
"merge-results",
|
||||||
|
"--output",
|
||||||
|
outputFile,
|
||||||
|
...getExtraOptionsFromEnv(["github", "merge-results"]),
|
||||||
|
];
|
||||||
|
for (const sarifFile of sarifFiles) {
|
||||||
|
args.push("--sarif", sarifFile);
|
||||||
|
}
|
||||||
|
if (mergeRunsFromEqualCategory) {
|
||||||
|
args.push("--sarif-merge-runs-from-equal-category");
|
||||||
|
}
|
||||||
|
await runTool(cmd, args);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
// To ensure that status reports include the CodeQL CLI version wherever
|
// To ensure that status reports include the CodeQL CLI version wherever
|
||||||
// possible, we want to call getVersion(), which populates the version value
|
// possible, we want to call getVersion(), which populates the version value
|
||||||
@@ -760,16 +767,16 @@ exports.getExtraOptions = getExtraOptions;
|
|||||||
* (2) It avoids us hitting the limit of how much data we can send in our
|
* (2) It avoids us hitting the limit of how much data we can send in our
|
||||||
* status reports on GitHub.com.
|
* status reports on GitHub.com.
|
||||||
*/
|
*/
|
||||||
const maxErrorSize = 20000;
|
const maxErrorSize = 20_000;
|
||||||
async function runTool(cmd, args = [], opts = {}) {
|
async function runTool(cmd, args = [], opts = {}) {
|
||||||
let output = "";
|
let stdout = "";
|
||||||
let error = "";
|
let stderr = "";
|
||||||
process.stdout.write(`[command]${cmd} ${args.join(" ")}\n`);
|
process.stdout.write(`[command]${cmd} ${args.join(" ")}\n`);
|
||||||
const exitCode = await new toolrunner.ToolRunner(cmd, args, {
|
const exitCode = await new toolrunner.ToolRunner(cmd, args, {
|
||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
stdout: (data) => {
|
stdout: (data) => {
|
||||||
output += data.toString("utf8");
|
stdout += data.toString("utf8");
|
||||||
if (!opts.noStreamStdout) {
|
if (!opts.noStreamStdout) {
|
||||||
process.stdout.write(data);
|
process.stdout.write(data);
|
||||||
}
|
}
|
||||||
@@ -781,7 +788,7 @@ async function runTool(cmd, args = [], opts = {}) {
|
|||||||
// Eg: if we have 20,000 the start index should be 2.
|
// Eg: if we have 20,000 the start index should be 2.
|
||||||
readStartIndex = data.length - maxErrorSize + 1;
|
readStartIndex = data.length - maxErrorSize + 1;
|
||||||
}
|
}
|
||||||
error += data.toString("utf8", readStartIndex);
|
stderr += data.toString("utf8", readStartIndex);
|
||||||
// Mimic the standard behavior of the toolrunner by writing stderr to stdout
|
// Mimic the standard behavior of the toolrunner by writing stderr to stdout
|
||||||
process.stdout.write(data);
|
process.stdout.write(data);
|
||||||
},
|
},
|
||||||
@@ -790,9 +797,10 @@ async function runTool(cmd, args = [], opts = {}) {
|
|||||||
...(opts.stdin ? { input: Buffer.from(opts.stdin || "") } : {}),
|
...(opts.stdin ? { input: Buffer.from(opts.stdin || "") } : {}),
|
||||||
}).exec();
|
}).exec();
|
||||||
if (exitCode !== 0) {
|
if (exitCode !== 0) {
|
||||||
throw new cli_errors_1.CommandInvocationError(cmd, args, exitCode, error, output);
|
const e = new cli_errors_1.CommandInvocationError(cmd, args, exitCode, stderr, stdout);
|
||||||
|
throw (0, cli_errors_1.wrapCliConfigurationError)(e);
|
||||||
}
|
}
|
||||||
return output;
|
return stdout;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Generates a code scanning configuration that is to be used for a scan.
|
* Generates a code scanning configuration that is to be used for a scan.
|
||||||
@@ -911,4 +919,15 @@ async function isSublanguageFileCoverageEnabled(config, codeql) {
|
|||||||
semver.gte(config.gitHubVersion.version, "3.12.0")) &&
|
semver.gte(config.gitHubVersion.version, "3.12.0")) &&
|
||||||
(await util.codeQlVersionAbove(codeql, exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)));
|
(await util.codeQlVersionAbove(codeql, exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)));
|
||||||
}
|
}
|
||||||
|
async function getCodeScanningQueryHelpArguments(codeql) {
|
||||||
|
if (await util.codeQlVersionAbove(codeql, CODEQL_VERSION_INCLUDE_QUERY_HELP)) {
|
||||||
|
return ["--sarif-include-query-help=always"];
|
||||||
|
}
|
||||||
|
return ["--sarif-add-query-help"];
|
||||||
|
}
|
||||||
|
function getExtractionVerbosityArguments(enableDebugLogging) {
|
||||||
|
return enableDebugLogging
|
||||||
|
? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`]
|
||||||
|
: [];
|
||||||
|
}
|
||||||
//# sourceMappingURL=codeql.js.map
|
//# sourceMappingURL=codeql.js.map
|
||||||
File diff suppressed because one or more lines are too long
56
lib/codeql.test.js
generated
56
lib/codeql.test.js
generated
@@ -37,6 +37,7 @@ const yaml = __importStar(require("js-yaml"));
|
|||||||
const nock_1 = __importDefault(require("nock"));
|
const nock_1 = __importDefault(require("nock"));
|
||||||
const sinon = __importStar(require("sinon"));
|
const sinon = __importStar(require("sinon"));
|
||||||
const actionsUtil = __importStar(require("./actions-util"));
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
|
const cli_errors_1 = require("./cli-errors");
|
||||||
const codeql = __importStar(require("./codeql"));
|
const codeql = __importStar(require("./codeql"));
|
||||||
const defaults = __importStar(require("./defaults.json"));
|
const defaults = __importStar(require("./defaults.json"));
|
||||||
const languages_1 = require("./languages");
|
const languages_1 = require("./languages");
|
||||||
@@ -553,7 +554,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.11.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.11.6"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("", "", ""), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("", "", "", false), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: new RegExp("No code found during the build\\. Please see: " +
|
message: new RegExp("No code found during the build\\. Please see: " +
|
||||||
"https://gh\\.io/troubleshooting-code-scanning/no-source-code-seen-during-build\\."),
|
"https://gh\\.io/troubleshooting-code-scanning/no-source-code-seen-during-build\\."),
|
||||||
@@ -565,7 +566,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.11.6"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.11.6"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("", "", ""), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("", "", "", false), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: new RegExp("No code found during the build\\. Please see: " +
|
message: new RegExp("No code found during the build\\. Please see: " +
|
||||||
"https://gh\\.io/troubleshooting-code-scanning/no-source-code-seen-during-build\\."),
|
"https://gh\\.io/troubleshooting-code-scanning/no-source-code-seen-during-build\\."),
|
||||||
@@ -579,7 +580,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
||||||
message: 'Encountered a fatal error while running "codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db". ' +
|
message: 'Encountered a fatal error while running "codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db". ' +
|
||||||
`Exit code was 32 and last log line was: ${cliMessage} See the logs for more details.`,
|
`Exit code was 32 and last log line was: ${cliMessage} See the logs for more details.`,
|
||||||
});
|
});
|
||||||
@@ -594,12 +595,57 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: new RegExp('Encountered a fatal error while running \\"codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db\\"\\. ' +
|
message: new RegExp('Encountered a fatal error while running \\"codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db\\"\\. ' +
|
||||||
`Exit code was 32 and error was: ${datasetImportError.replaceAll(".", "\\.")}\\. Context: ${heapError.replaceAll(".", "\\.")}\\. See the logs for more details\\.`),
|
`Exit code was 32 and error was: ${datasetImportError.replaceAll(".", "\\.")}\\. Context: ${heapError.replaceAll(".", "\\.")}\\. See the logs for more details\\.`),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
(0, ava_1.default)("runTool summarizes autobuilder errors", async (t) => {
|
||||||
|
const stderr = `
|
||||||
|
[2019-09-18 12:00:00] [autobuild] A non-error message
|
||||||
|
[2019-09-18 12:00:00] Untagged message
|
||||||
|
[2019-09-18 12:00:00] [autobuild] [ERROR] Start of the error message
|
||||||
|
[2019-09-18 12:00:00] [autobuild] An interspersed non-error message
|
||||||
|
[2019-09-18 12:00:01] [autobuild] [ERROR] Some more context about the error message
|
||||||
|
[2019-09-18 12:00:01] [autobuild] [ERROR] continued
|
||||||
|
[2019-09-18 12:00:01] [autobuild] [ERROR] and finished here.
|
||||||
|
[2019-09-18 12:00:01] [autobuild] A non-error message
|
||||||
|
`;
|
||||||
|
stubToolRunnerConstructor(1, stderr);
|
||||||
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
|
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
||||||
|
// safeWhich throws because of the test CodeQL object.
|
||||||
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
|
await t.throwsAsync(async () => await codeqlObject.runAutobuild(languages_1.Language.java, false), {
|
||||||
|
instanceOf: cli_errors_1.CommandInvocationError,
|
||||||
|
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
|
"For more information, see " +
|
||||||
|
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed. " +
|
||||||
|
"Encountered the following error: Start of the error message\n" +
|
||||||
|
" Some more context about the error message\n" +
|
||||||
|
" continued\n" +
|
||||||
|
" and finished here.",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
(0, ava_1.default)("runTool truncates long autobuilder errors", async (t) => {
|
||||||
|
const stderr = Array.from({ length: 20 }, (_, i) => `[2019-09-18 12:00:00] [autobuild] [ERROR] line${i + 1}`).join("\n");
|
||||||
|
stubToolRunnerConstructor(1, stderr);
|
||||||
|
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||||
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
|
sinon.stub(codeqlObject, "resolveExtractor").resolves("/path/to/extractor");
|
||||||
|
// safeWhich throws because of the test CodeQL object.
|
||||||
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
|
await t.throwsAsync(async () => await codeqlObject.runAutobuild(languages_1.Language.java, false), {
|
||||||
|
instanceOf: cli_errors_1.CommandInvocationError,
|
||||||
|
message: "We were unable to automatically build your code. Please provide manual build steps. " +
|
||||||
|
"For more information, see " +
|
||||||
|
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed. " +
|
||||||
|
"Encountered the following error: " +
|
||||||
|
`${Array.from({ length: 10 }, (_, i) => `line${i + 1}`).join("\n")}\n(truncated)`,
|
||||||
|
});
|
||||||
|
});
|
||||||
(0, ava_1.default)("runTool outputs last line of stderr if fatal error could not be found", async (t) => {
|
(0, ava_1.default)("runTool outputs last line of stderr if fatal error could not be found", async (t) => {
|
||||||
const cliStderr = "line1\nline2\nline3\nline4\nline5";
|
const cliStderr = "line1\nline2\nline3\nline4\nline5";
|
||||||
stubToolRunnerConstructor(32, cliStderr);
|
stubToolRunnerConstructor(32, cliStderr);
|
||||||
@@ -607,7 +653,7 @@ for (const { codeqlVersion, flagPassed, githubVersion, negativeFlagPassed, } of
|
|||||||
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
sinon.stub(codeqlObject, "getVersion").resolves((0, testing_utils_1.makeVersionInfo)("2.12.4"));
|
||||||
// safeWhich throws because of the test CodeQL object.
|
// safeWhich throws because of the test CodeQL object.
|
||||||
sinon.stub(safeWhich, "safeWhich").resolves("");
|
sinon.stub(safeWhich, "safeWhich").resolves("");
|
||||||
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"), {
|
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048", false), {
|
||||||
instanceOf: util.ConfigurationError,
|
instanceOf: util.ConfigurationError,
|
||||||
message: new RegExp('Encountered a fatal error while running \\"codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db\\"\\. ' +
|
message: new RegExp('Encountered a fatal error while running \\"codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db\\"\\. ' +
|
||||||
"Exit code was 32 and last log line was: line5\\. See the logs for more details\\."),
|
"Exit code was 32 and last log line was: line5\\. See the logs for more details\\."),
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"bundleVersion": "codeql-bundle-v2.16.3",
|
"bundleVersion": "codeql-bundle-v2.16.5",
|
||||||
"cliVersion": "2.16.3",
|
"cliVersion": "2.16.5",
|
||||||
"priorBundleVersion": "codeql-bundle-v2.16.2",
|
"priorBundleVersion": "codeql-bundle-v2.16.4",
|
||||||
"priorCliVersion": "2.16.2"
|
"priorCliVersion": "2.16.4"
|
||||||
}
|
}
|
||||||
|
|||||||
5
lib/environment.js
generated
5
lib/environment.js
generated
@@ -13,6 +13,11 @@ var EnvVar;
|
|||||||
EnvVar["ANALYZE_DID_COMPLETE_SUCCESSFULLY"] = "CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY";
|
EnvVar["ANALYZE_DID_COMPLETE_SUCCESSFULLY"] = "CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY";
|
||||||
/** Whether the `autobuild` Action completes successfully. */
|
/** Whether the `autobuild` Action completes successfully. */
|
||||||
EnvVar["AUTOBUILD_DID_COMPLETE_SUCCESSFULLY"] = "CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY";
|
EnvVar["AUTOBUILD_DID_COMPLETE_SUCCESSFULLY"] = "CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY";
|
||||||
|
/**
|
||||||
|
* The verbosity level of the CLI. One of the following: `errors`, `warnings`, `progress`,
|
||||||
|
* `progress+`, `progress++`, `progress+++`.
|
||||||
|
*/
|
||||||
|
EnvVar["CLI_VERBOSITY"] = "CODEQL_VERBOSITY";
|
||||||
/** Whether the CodeQL Action has invoked the Go autobuilder. */
|
/** Whether the CodeQL Action has invoked the Go autobuilder. */
|
||||||
EnvVar["DID_AUTOBUILD_GOLANG"] = "CODEQL_ACTION_DID_AUTOBUILD_GOLANG";
|
EnvVar["DID_AUTOBUILD_GOLANG"] = "CODEQL_ACTION_DID_AUTOBUILD_GOLANG";
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,IAAY,MA+EX;AA/ED,WAAY,MAAM;IAChB,2DAA2D;IAC3D,+FAAqF,C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AC7C,uCAA6B,CAAA;IAE7B,+EAA+E;IAC/E,iDAAuC,CAAA;IAEvC,mEAAyD,CAAA;IAEzD;;;OAGG;IACH,2FAAiF,CAAA;IAEjF,mFAAmF;IACnF,6FAAmF,CAAA;IAEnF,qFAAqF;IACrF,+CAAqC,CAAA;IAErC,mEAAyD,CAAA;IAEzD,kEAAkE;IAClE,2CAAiC,CAAA;IAEjC;;;;;;OAMG;IACH,4DAAkD,CAAA;IAElD;;;OAGG;IACH,wDAA8C,CAAA;AAChD,CAAC,EArFW,MAAM,sBAAN,MAAM,QAqFjB"}
|
||||||
7
lib/feature-flags.js
generated
7
lib/feature-flags.js
generated
@@ -48,6 +48,7 @@ exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = "2.15.1";
|
|||||||
*/
|
*/
|
||||||
var Feature;
|
var Feature;
|
||||||
(function (Feature) {
|
(function (Feature) {
|
||||||
|
Feature["CliSarifMerge"] = "cli_sarif_merge_enabled";
|
||||||
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
||||||
Feature["CppTrapCachingEnabled"] = "cpp_trap_caching_enabled";
|
Feature["CppTrapCachingEnabled"] = "cpp_trap_caching_enabled";
|
||||||
Feature["DisableJavaBuildlessEnabled"] = "disable_java_buildless_enabled";
|
Feature["DisableJavaBuildlessEnabled"] = "disable_java_buildless_enabled";
|
||||||
@@ -58,6 +59,12 @@ var Feature;
|
|||||||
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
||||||
})(Feature || (exports.Feature = Feature = {}));
|
})(Feature || (exports.Feature = Feature = {}));
|
||||||
exports.featureConfig = {
|
exports.featureConfig = {
|
||||||
|
[Feature.CliSarifMerge]: {
|
||||||
|
envVar: "CODEQL_ACTION_CLI_SARIF_MERGE",
|
||||||
|
// This is guarded by a `supportsFeature` check rather than by a version check.
|
||||||
|
minimumVersion: undefined,
|
||||||
|
defaultValue: false,
|
||||||
|
},
|
||||||
[Feature.CppDependencyInstallation]: {
|
[Feature.CppDependencyInstallation]: {
|
||||||
envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
|
envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
|
||||||
minimumVersion: "2.15.0",
|
minimumVersion: "2.15.0",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
lib/init-action-post.js
generated
2
lib/init-action-post.js
generated
@@ -62,6 +62,8 @@ async function runWrapper() {
|
|||||||
await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.InitPost, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(), logger, error.message, error.stack));
|
await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.InitPost, (0, status_report_1.getActionsStatus)(error), startedAt, config, await (0, util_1.checkDiskUsage)(), logger, error.message, error.stack));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const jobStatus = initActionPostHelper.getFinalJobStatus();
|
||||||
|
logger.info(`CodeQL job status was ${(0, status_report_1.getJobStatusDisplayName)(jobStatus)}.`);
|
||||||
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.InitPost, "success", startedAt, config, await (0, util_1.checkDiskUsage)(), logger);
|
const statusReportBase = await (0, status_report_1.createStatusReportBase)(status_report_1.ActionName.InitPost, "success", startedAt, config, await (0, util_1.checkDiskUsage)(), logger);
|
||||||
const statusReport = {
|
const statusReport = {
|
||||||
...statusReportBase,
|
...statusReportBase,
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"init-action-post.js","sourceRoot":"","sources":["../src/init-action-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,iDAAuE;AAC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B,0BAAU,CAAC,QAAQ,EACnB,IAAA,gCAAgB,EAAC,KAAK,CAAC,EACvB,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,GAAE,EACtB,MAAM,EACN,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;IACT,CAAC;IACD,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,0BAAU,CAAC,QAAQ,EACnB,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,GAAE,EACtB,MAAM,CACP,CAAC;IACF,MAAM,YAAY,GAAyB;QACzC,GAAG,gBAAgB;QACnB,GAAG,uBAAuB;QAC1B,UAAU,EAAE,oBAAoB,CAAC,iBAAiB,EAAE;KACrD,CAAC;IACF,MAAM,IAAA,gCAAgB,EAAC,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
{"version":3,"file":"init-action-post.js","sourceRoot":"","sources":["../src/init-action-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,iDAAuE;AACvE,6CAAgD;AAChD,iDAAmD;AACnD,kEAAoD;AACpD,mDAA2C;AAC3C,gFAAkE;AAClE,uCAA6C;AAC7C,6CAAkD;AAClD,mDAOyB;AACzB,iCAKgB;AAOhB,KAAK,UAAU,UAAU;IACvB,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,IAAI,MAA0B,CAAC;IAC/B,IAAI,uBAES,CAAC;IACd,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEjD,MAAM,aAAa,GAAG,IAAA,+BAAkB,EACtC,IAAA,0BAAmB,EAA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tB,MAAM,CACP,CAAC;IACF,MAAM,YAAY,GAAyB;QACzC,GAAG,gBAAgB;QACnB,GAAG,uBAAuB;QAC1B,UAAU,EAAE,oBAAoB,CAAC,iBAAiB,EAAE;KACrD,CAAC;IACF,MAAM,IAAA,gCAAgB,EAAC,YAAY,CAAC,CAAC;AACvC,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
17
lib/status-report.js
generated
17
lib/status-report.js
generated
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.sendStatusReport = exports.createStatusReportBase = exports.getActionsStatus = exports.JobStatus = exports.isFirstPartyAnalysis = exports.ActionName = void 0;
|
exports.sendStatusReport = exports.createStatusReportBase = exports.getJobStatusDisplayName = exports.getActionsStatus = exports.JobStatus = exports.isFirstPartyAnalysis = exports.ActionName = void 0;
|
||||||
const os = __importStar(require("os"));
|
const os = __importStar(require("os"));
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const actions_util_1 = require("./actions-util");
|
const actions_util_1 = require("./actions-util");
|
||||||
@@ -71,6 +71,21 @@ function getActionsStatus(error, otherFailureCause) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.getActionsStatus = getActionsStatus;
|
exports.getActionsStatus = getActionsStatus;
|
||||||
|
function getJobStatusDisplayName(status) {
|
||||||
|
switch (status) {
|
||||||
|
case JobStatus.SuccessStatus:
|
||||||
|
return "success";
|
||||||
|
case JobStatus.FailureStatus:
|
||||||
|
return "failure";
|
||||||
|
case JobStatus.ConfigErrorStatus:
|
||||||
|
return "configuration error";
|
||||||
|
case JobStatus.UnknownStatus:
|
||||||
|
return "unknown";
|
||||||
|
default:
|
||||||
|
(0, util_1.assertNever)(status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.getJobStatusDisplayName = getJobStatusDisplayName;
|
||||||
/**
|
/**
|
||||||
* Sets the overall job status environment variable to configuration error
|
* Sets the overall job status environment variable to configuration error
|
||||||
* or failure, unless it's already been set to one of these values in a
|
* or failure, unless it's already been set to one of these values in a
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
lib/tools-features.js
generated
1
lib/tools-features.js
generated
@@ -8,6 +8,7 @@ var ToolsFeature;
|
|||||||
ToolsFeature["InformsAboutUnsupportedPathFilters"] = "informsAboutUnsupportedPathFilters";
|
ToolsFeature["InformsAboutUnsupportedPathFilters"] = "informsAboutUnsupportedPathFilters";
|
||||||
ToolsFeature["SetsCodeqlRunnerEnvVar"] = "setsCodeqlRunnerEnvVar";
|
ToolsFeature["SetsCodeqlRunnerEnvVar"] = "setsCodeqlRunnerEnvVar";
|
||||||
ToolsFeature["TraceCommandUseBuildMode"] = "traceCommandUseBuildMode";
|
ToolsFeature["TraceCommandUseBuildMode"] = "traceCommandUseBuildMode";
|
||||||
|
ToolsFeature["SarifMergeRunsFromEqualCategory"] = "sarifMergeRunsFromEqualCategory";
|
||||||
})(ToolsFeature || (exports.ToolsFeature = ToolsFeature = {}));
|
})(ToolsFeature || (exports.ToolsFeature = ToolsFeature = {}));
|
||||||
/**
|
/**
|
||||||
* Determines if the given feature is supported by the CLI.
|
* Determines if the given feature is supported by the CLI.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"tools-features.js","sourceRoot":"","sources":["../src/tools-features.ts"],"names":[],"mappings":";;;AAEA,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mDAAmC,CAAA;IACnC,+FAA+E,CAAA;IAC/E,yFAAyE,CAAA;IACzE,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;AACvD,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAED;;;;;;GAMG;AACH,SAAgB,uBAAuB,CACrC,WAAwB,EACxB,OAAqB;IAErB,OAAO,CAAC,CAAC,WAAW,CAAC,QAAQ,IAAI,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACjE,CAAC;AALD,0DAKC"}
|
{"version":3,"file":"tools-features.js","sourceRoot":"","sources":["../src/tools-features.ts"],"names":[],"mappings":";;;AAEA,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,mDAAmC,CAAA;IACnC,+FAA+E,CAAA;IAC/E,yFAAyE,CAAA;IACzE,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,mFAAmE,CAAA;AACrE,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB;AAED;;;;;;GAMG;AACH,SAAgB,uBAAuB,CACrC,WAAwB,EACxB,OAAqB;IAErB,OAAO,CAAC,CAAC,WAAW,CAAC,QAAQ,IAAI,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACjE,CAAC;AALD,0DAKC"}
|
||||||
4
lib/trap-caching.js
generated
4
lib/trap-caching.js
generated
@@ -42,7 +42,7 @@ const MINIMUM_CACHE_MB_TO_UPLOAD = 10;
|
|||||||
// uploads or downloads to complete before continuing. Note
|
// uploads or downloads to complete before continuing. Note
|
||||||
// this timeout is per operation, so will be run as many
|
// this timeout is per operation, so will be run as many
|
||||||
// times as there are languages with TRAP caching enabled.
|
// times as there are languages with TRAP caching enabled.
|
||||||
const MAX_CACHE_OPERATION_MS = 120000; // Two minutes
|
const MAX_CACHE_OPERATION_MS = 120_000; // Two minutes
|
||||||
/**
|
/**
|
||||||
* Download TRAP caches from the Actions cache.
|
* Download TRAP caches from the Actions cache.
|
||||||
* @param codeql The CodeQL instance to use.
|
* @param codeql The CodeQL instance to use.
|
||||||
@@ -117,7 +117,7 @@ async function uploadTrapCaches(codeql, config, logger) {
|
|||||||
logger.info(`Skipping upload of TRAP cache for ${language} as we couldn't determine its size`);
|
logger.info(`Skipping upload of TRAP cache for ${language} as we couldn't determine its size`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (trapFolderSize < MINIMUM_CACHE_MB_TO_UPLOAD * 1048576) {
|
if (trapFolderSize < MINIMUM_CACHE_MB_TO_UPLOAD * 1_048_576) {
|
||||||
logger.info(`Skipping upload of TRAP cache for ${language} as it is too small`);
|
logger.info(`Skipping upload of TRAP cache for ${language} as it is too small`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
lib/trap-caching.test.js
generated
2
lib/trap-caching.test.js
generated
@@ -132,7 +132,7 @@ function getTestConfigWithTempDir(tempDir) {
|
|||||||
const loggedMessages = [];
|
const loggedMessages = [];
|
||||||
const logger = (0, testing_utils_1.getRecordingLogger)(loggedMessages);
|
const logger = (0, testing_utils_1.getRecordingLogger)(loggedMessages);
|
||||||
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
|
sinon.stub(actionsUtil, "isAnalyzingDefaultBranch").resolves(true);
|
||||||
sinon.stub(util, "tryGetFolderBytes").resolves(999999999);
|
sinon.stub(util, "tryGetFolderBytes").resolves(999_999_999);
|
||||||
const stubSave = sinon.stub(cache, "saveCache");
|
const stubSave = sinon.stub(cache, "saveCache");
|
||||||
process.env.GITHUB_SHA = "somesha";
|
process.env.GITHUB_SHA = "somesha";
|
||||||
await (0, trap_caching_1.uploadTrapCaches)(stubCodeql, testConfigWithoutTmpDir, logger);
|
await (0, trap_caching_1.uploadTrapCaches)(stubCodeql, testConfigWithoutTmpDir, logger);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"trap-caching.test.js","sourceRoot":"","sources":["../src/trap-caching.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,sDAAwC;AACxC,8CAAuB;AACvB,6CAA+B;AAE/B,4DAA8C;AAC9C,qCAIkB;AAElB,2CAAuC;AACvC,mDAKyB;AACzB,iDAIwB;AACxB,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;A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,CAAC;AACL,CAAC,CAAC,CAAC"}
|
||||||
76
lib/upload-lib.js
generated
76
lib/upload-lib.js
generated
@@ -34,10 +34,17 @@ const core = __importStar(require("@actions/core"));
|
|||||||
const file_url_1 = __importDefault(require("file-url"));
|
const file_url_1 = __importDefault(require("file-url"));
|
||||||
const jsonschema = __importStar(require("jsonschema"));
|
const jsonschema = __importStar(require("jsonschema"));
|
||||||
const actionsUtil = __importStar(require("./actions-util"));
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
|
const actions_util_1 = require("./actions-util");
|
||||||
const api = __importStar(require("./api-client"));
|
const api = __importStar(require("./api-client"));
|
||||||
|
const api_client_1 = require("./api-client");
|
||||||
|
const codeql_1 = require("./codeql");
|
||||||
|
const config_utils_1 = require("./config-utils");
|
||||||
const environment_1 = require("./environment");
|
const environment_1 = require("./environment");
|
||||||
|
const feature_flags_1 = require("./feature-flags");
|
||||||
const fingerprints = __importStar(require("./fingerprints"));
|
const fingerprints = __importStar(require("./fingerprints"));
|
||||||
|
const init_1 = require("./init");
|
||||||
const repository_1 = require("./repository");
|
const repository_1 = require("./repository");
|
||||||
|
const tools_features_1 = require("./tools-features");
|
||||||
const util = __importStar(require("./util"));
|
const util = __importStar(require("./util"));
|
||||||
const util_1 = require("./util");
|
const util_1 = require("./util");
|
||||||
const GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
|
const GENERIC_403_MSG = "The repo on which this action is running has not opted-in to CodeQL code scanning.";
|
||||||
@@ -62,6 +69,64 @@ function combineSarifFiles(sarifFiles) {
|
|||||||
}
|
}
|
||||||
return combinedSarif;
|
return combinedSarif;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Checks whether all the runs in the given SARIF files were produced by CodeQL.
|
||||||
|
* @param sarifFiles The list of SARIF files to check.
|
||||||
|
*/
|
||||||
|
function areAllRunsProducedByCodeQL(sarifFiles) {
|
||||||
|
return sarifFiles.every((sarifFile) => {
|
||||||
|
const sarifObject = JSON.parse(fs.readFileSync(sarifFile, "utf8"));
|
||||||
|
return sarifObject.runs?.every((run) => run.tool?.driver?.name === "CodeQL");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// Takes a list of paths to sarif files and combines them together using the
|
||||||
|
// CLI `github merge-results` command when all SARIF files are produced by
|
||||||
|
// CodeQL. Otherwise, it will fall back to combining the files in the action.
|
||||||
|
// Returns the contents of the combined sarif file.
|
||||||
|
async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) {
|
||||||
|
if (sarifFiles.length === 1) {
|
||||||
|
return JSON.parse(fs.readFileSync(sarifFiles[0], "utf8"));
|
||||||
|
}
|
||||||
|
if (!areAllRunsProducedByCodeQL(sarifFiles)) {
|
||||||
|
logger.debug("Not all SARIF files were produced by CodeQL. Merging files in the action.");
|
||||||
|
// If not, use the naive method of combining the files.
|
||||||
|
return combineSarifFiles(sarifFiles);
|
||||||
|
}
|
||||||
|
// Initialize CodeQL, either by using the config file from the 'init' step,
|
||||||
|
// or by initializing it here.
|
||||||
|
let codeQL;
|
||||||
|
let tempDir = actionsUtil.getTemporaryDirectory();
|
||||||
|
const config = await (0, config_utils_1.getConfig)(tempDir, logger);
|
||||||
|
if (config !== undefined) {
|
||||||
|
codeQL = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||||
|
tempDir = config.tempDir;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logger.info("Initializing CodeQL since the 'init' Action was not called before this step.");
|
||||||
|
const apiDetails = {
|
||||||
|
auth: (0, actions_util_1.getRequiredInput)("token"),
|
||||||
|
externalRepoAuth: (0, actions_util_1.getOptionalInput)("external-repository-token"),
|
||||||
|
url: (0, util_1.getRequiredEnvParam)("GITHUB_SERVER_URL"),
|
||||||
|
apiURL: (0, util_1.getRequiredEnvParam)("GITHUB_API_URL"),
|
||||||
|
};
|
||||||
|
const codeQLDefaultVersionInfo = await features.getDefaultCliVersion(gitHubVersion.type);
|
||||||
|
const initCodeQLResult = await (0, init_1.initCodeQL)(undefined, // There is no tools input on the upload action
|
||||||
|
apiDetails, tempDir, gitHubVersion.type, codeQLDefaultVersionInfo, logger);
|
||||||
|
codeQL = initCodeQLResult.codeql;
|
||||||
|
}
|
||||||
|
if (!(await codeQL.supportsFeature(tools_features_1.ToolsFeature.SarifMergeRunsFromEqualCategory))) {
|
||||||
|
logger.warning("The CodeQL CLI does not support merging SARIF files. Merging files in the action.");
|
||||||
|
return combineSarifFiles(sarifFiles);
|
||||||
|
}
|
||||||
|
const baseTempDir = path.resolve(tempDir, "combined-sarif");
|
||||||
|
fs.mkdirSync(baseTempDir, { recursive: true });
|
||||||
|
const outputDirectory = fs.mkdtempSync(path.resolve(baseTempDir, "output-"));
|
||||||
|
const outputFile = path.resolve(outputDirectory, "combined-sarif.sarif");
|
||||||
|
await codeQL.mergeResults(sarifFiles, outputFile, {
|
||||||
|
mergeRunsFromEqualCategory: true,
|
||||||
|
});
|
||||||
|
return JSON.parse(fs.readFileSync(outputFile, "utf8"));
|
||||||
|
}
|
||||||
// Populates the run.automationDetails.id field using the analysis_key and environment
|
// Populates the run.automationDetails.id field using the analysis_key and environment
|
||||||
// and return an updated sarif file contents.
|
// and return an updated sarif file contents.
|
||||||
function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
|
function populateRunAutomationDetails(sarif, category, analysis_key, environment) {
|
||||||
@@ -264,11 +329,15 @@ exports.buildPayload = buildPayload;
|
|||||||
async function uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKey, category, analysisName, workflowRunID, workflowRunAttempt, sourceRoot, environment, logger) {
|
async function uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKey, category, analysisName, workflowRunID, workflowRunAttempt, sourceRoot, environment, logger) {
|
||||||
logger.startGroup("Uploading results");
|
logger.startGroup("Uploading results");
|
||||||
logger.info(`Processing sarif files: ${JSON.stringify(sarifFiles)}`);
|
logger.info(`Processing sarif files: ${JSON.stringify(sarifFiles)}`);
|
||||||
|
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||||
|
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
|
||||||
// Validate that the files we were asked to upload are all valid SARIF files
|
// Validate that the files we were asked to upload are all valid SARIF files
|
||||||
for (const file of sarifFiles) {
|
for (const file of sarifFiles) {
|
||||||
validateSarifFileSchema(file, logger);
|
validateSarifFileSchema(file, logger);
|
||||||
}
|
}
|
||||||
let sarif = combineSarifFiles(sarifFiles);
|
let sarif = (await features.getValue(feature_flags_1.Feature.CliSarifMerge))
|
||||||
|
? await combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger)
|
||||||
|
: combineSarifFiles(sarifFiles);
|
||||||
sarif = await fingerprints.addFingerprints(sarif, sourceRoot, logger);
|
sarif = await fingerprints.addFingerprints(sarif, sourceRoot, logger);
|
||||||
sarif = populateRunAutomationDetails(sarif, category, analysisKey, environment);
|
sarif = populateRunAutomationDetails(sarif, category, analysisKey, environment);
|
||||||
const toolNames = util.getToolNames(sarif);
|
const toolNames = util.getToolNames(sarif);
|
||||||
@@ -383,8 +452,9 @@ function shouldConsiderConfigurationError(processingErrors) {
|
|||||||
* Returns whether the provided processing errors are the result of an invalid SARIF upload request.
|
* Returns whether the provided processing errors are the result of an invalid SARIF upload request.
|
||||||
*/
|
*/
|
||||||
function shouldConsiderInvalidRequest(processingErrors) {
|
function shouldConsiderInvalidRequest(processingErrors) {
|
||||||
return (processingErrors.length === 1 &&
|
return processingErrors.every((error) => error.startsWith("rejecting SARIF") ||
|
||||||
processingErrors[0].startsWith("rejecting SARIF,"));
|
error.startsWith("could not convert rules: invalid security severity value, is not a number") ||
|
||||||
|
/^SARIF URI scheme [^\s]* did not match the checkout URI scheme [^\s]*/.test(error));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Checks the processing result for an unsuccessful execution. Throws if the
|
* Checks the processing result for an unsuccessful execution. Throws if the
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
55
lib/upload-sarif-action-post-helper.js
generated
Normal file
55
lib/upload-sarif-action-post-helper.js
generated
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
"use strict";
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||||
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||||
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||||
|
}
|
||||||
|
Object.defineProperty(o, k2, desc);
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.uploadArtifacts = void 0;
|
||||||
|
const fs = __importStar(require("fs"));
|
||||||
|
const path = __importStar(require("path"));
|
||||||
|
const core = __importStar(require("@actions/core"));
|
||||||
|
const actionsUtil = __importStar(require("./actions-util"));
|
||||||
|
async function uploadArtifacts(uploadDebugArtifacts) {
|
||||||
|
const tempDir = actionsUtil.getTemporaryDirectory();
|
||||||
|
// Upload Actions SARIF artifacts for debugging when environment variable is set
|
||||||
|
if (process.env["CODEQL_ACTION_DEBUG_COMBINED_SARIF"] === "true") {
|
||||||
|
core.info("Uploading available combined SARIF files as Actions debugging artifact...");
|
||||||
|
const baseTempDir = path.resolve(tempDir, "combined-sarif");
|
||||||
|
const toUpload = [];
|
||||||
|
if (fs.existsSync(baseTempDir)) {
|
||||||
|
const outputDirs = fs.readdirSync(baseTempDir);
|
||||||
|
for (const outputDir of outputDirs) {
|
||||||
|
const sarifFiles = fs
|
||||||
|
.readdirSync(path.resolve(baseTempDir, outputDir))
|
||||||
|
.filter((f) => f.endsWith(".sarif"));
|
||||||
|
for (const sarifFile of sarifFiles) {
|
||||||
|
toUpload.push(path.resolve(baseTempDir, outputDir, sarifFile));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (toUpload.length > 0) {
|
||||||
|
await uploadDebugArtifacts(toUpload, baseTempDir, "upload-debug-artifacts");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.uploadArtifacts = uploadArtifacts;
|
||||||
|
//# sourceMappingURL=upload-sarif-action-post-helper.js.map
|
||||||
1
lib/upload-sarif-action-post-helper.js.map
Normal file
1
lib/upload-sarif-action-post-helper.js.map
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"upload-sarif-action-post-helper.js","sourceRoot":"","sources":["../src/upload-sarif-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AAEtC,4DAA8C;AAEvC,KAAK,UAAU,eAAe,CACnC,oBAIkB;IAElB,MAAM,OAAO,GAAG,WAAW,CAAC,qBAAqB,EAAE,CAAC;IAEpD,gFAAgF;IAChF,IAAI,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,KAAK,MAAM,EAAE,CAAC;QACjE,IAAI,CAAC,IAAI,CACP,2EAA2E,CAC5E,CAAC;QAEF,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QAE5D,MAAM,QAAQ,GAAa,EAAE,CAAC;QAE9B,IAAI,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YAE/C,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;gBACnC,MAAM,UAAU,GAAG,EAAE;qBAClB,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;qBACjD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAEvC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;oBACnC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;gBACjE,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,oBAAoB,CACxB,QAAQ,EACR,WAAW,EACX,wBAAwB,CACzB,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAzCD,0CAyCC"}
|
||||||
@@ -23,16 +23,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getSourceFileOfNode = void 0;
|
|
||||||
const ts = __importStar(require("typescript"));
|
|
||||||
/**
|
/**
|
||||||
* Gets the source file for a given node
|
* This file is the entry point for the `post:` hook of `upload-sarif-action.yml`.
|
||||||
|
* It will run after the all steps in this job, in reverse order in relation to
|
||||||
|
* other `post:` hooks.
|
||||||
*/
|
*/
|
||||||
function getSourceFileOfNode(node) {
|
const core = __importStar(require("@actions/core"));
|
||||||
while (node.kind !== ts.SyntaxKind.SourceFile) {
|
const debugArtifacts = __importStar(require("./debug-artifacts"));
|
||||||
node = node.parent;
|
const uploadSarifActionPostHelper = __importStar(require("./upload-sarif-action-post-helper"));
|
||||||
|
const util_1 = require("./util");
|
||||||
|
async function runWrapper() {
|
||||||
|
try {
|
||||||
|
await uploadSarifActionPostHelper.uploadArtifacts(debugArtifacts.uploadDebugArtifacts);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.setFailed(`upload-sarif post-action step failed: ${(0, util_1.wrapError)(error).message}`);
|
||||||
}
|
}
|
||||||
return node;
|
|
||||||
}
|
}
|
||||||
exports.getSourceFileOfNode = getSourceFileOfNode;
|
void runWrapper();
|
||||||
//# sourceMappingURL=getSourceFileOfNode.js.map
|
//# sourceMappingURL=upload-sarif-action-post.js.map
|
||||||
1
lib/upload-sarif-action-post.js.map
Normal file
1
lib/upload-sarif-action-post.js.map
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"upload-sarif-action-post.js","sourceRoot":"","sources":["../src/upload-sarif-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,kEAAoD;AACpD,+FAAiF;AACjF,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,2BAA2B,CAAC,eAAe,CAC/C,cAAc,CAAC,oBAAoB,CACpC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,yCAAyC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CACpE,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||||
2
lib/util.js
generated
2
lib/util.js
generated
@@ -664,7 +664,7 @@ exports.withTimeout = withTimeout;
|
|||||||
async function checkForTimeout() {
|
async function checkForTimeout() {
|
||||||
if (hadTimeout === true) {
|
if (hadTimeout === true) {
|
||||||
core.info("A timeout occurred, force exiting the process after 30 seconds to prevent hanging.");
|
core.info("A timeout occurred, force exiting the process after 30 seconds to prevent hanging.");
|
||||||
await delay(30000, { allowProcessExit: true });
|
await delay(30_000, { allowProcessExit: true });
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
lib/util.test.js
generated
2
lib/util.test.js
generated
@@ -217,7 +217,7 @@ for (const { input, totalMemoryMb, platform, expectedMemoryValue, reservedPercen
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const longTime = 999999;
|
const longTime = 999_999;
|
||||||
const shortTime = 10;
|
const shortTime = 10;
|
||||||
(0, ava_1.default)("withTimeout on long task", async (t) => {
|
(0, ava_1.default)("withTimeout on long task", async (t) => {
|
||||||
let longTaskTimedOut = false;
|
let longTaskTimedOut = false;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
572
node_modules/.package-lock.json
generated
vendored
572
node_modules/.package-lock.json
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "codeql",
|
"name": "codeql",
|
||||||
"version": "3.24.6",
|
"version": "3.24.10",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
@@ -960,16 +960,16 @@
|
|||||||
"integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA=="
|
"integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA=="
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "7.1.0",
|
"version": "7.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.4.0.tgz",
|
||||||
"integrity": "sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==",
|
"integrity": "sha512-yHMQ/oFaM7HZdVrVm/M2WHaNPgyuJH4WelkSVEWSSsir34kxW2kDJCxlXRhhGWEsMN0WAW/vLpKfKVcm8k+MPw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.5.1",
|
"@eslint-community/regexpp": "^4.5.1",
|
||||||
"@typescript-eslint/scope-manager": "7.1.0",
|
"@typescript-eslint/scope-manager": "7.4.0",
|
||||||
"@typescript-eslint/type-utils": "7.1.0",
|
"@typescript-eslint/type-utils": "7.4.0",
|
||||||
"@typescript-eslint/utils": "7.1.0",
|
"@typescript-eslint/utils": "7.4.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.1.0",
|
"@typescript-eslint/visitor-keys": "7.4.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"graphemer": "^1.4.0",
|
"graphemer": "^1.4.0",
|
||||||
"ignore": "^5.2.4",
|
"ignore": "^5.2.4",
|
||||||
@@ -978,7 +978,7 @@
|
|||||||
"ts-api-utils": "^1.0.1"
|
"ts-api-utils": "^1.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -994,67 +994,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "7.1.0",
|
"version": "7.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.4.0.tgz",
|
||||||
"integrity": "sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==",
|
"integrity": "sha512-ZvKHxHLusweEUVwrGRXXUVzFgnWhigo4JurEj0dGF1tbcGh6buL+ejDdjxOQxv6ytcY1uhun1p2sm8iWStlgLQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "7.1.0",
|
"@typescript-eslint/scope-manager": "7.4.0",
|
||||||
"@typescript-eslint/types": "7.1.0",
|
"@typescript-eslint/types": "7.4.0",
|
||||||
"@typescript-eslint/typescript-estree": "7.1.0",
|
"@typescript-eslint/typescript-estree": "7.4.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.1.0",
|
"@typescript-eslint/visitor-keys": "7.4.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -1069,116 +1022,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "7.1.0",
|
|
||||||
"debug": "^4.3.4",
|
|
||||||
"globby": "^11.1.0",
|
|
||||||
"is-glob": "^4.0.3",
|
|
||||||
"minimatch": "9.0.3",
|
|
||||||
"semver": "^7.5.4",
|
|
||||||
"ts-api-utils": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/brace-expansion": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"balanced-match": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/minimatch": {
|
|
||||||
"version": "9.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
|
||||||
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"brace-expansion": "^2.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16 || 14 >=14.17"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/isaacs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "6.21.0",
|
"version": "7.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.4.0.tgz",
|
||||||
"integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
|
"integrity": "sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.21.0",
|
"@typescript-eslint/types": "7.4.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.21.0"
|
"@typescript-eslint/visitor-keys": "7.4.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -1186,18 +1040,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "7.1.0",
|
"version": "7.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.4.0.tgz",
|
||||||
"integrity": "sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==",
|
"integrity": "sha512-247ETeHgr9WTRMqHbbQdzwzhuyaJ8dPTuyuUEMANqzMRB1rj/9qFIuIXK7l0FX9i9FXbHeBQl/4uz6mYuCE7Aw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "7.1.0",
|
"@typescript-eslint/typescript-estree": "7.4.0",
|
||||||
"@typescript-eslint/utils": "7.1.0",
|
"@typescript-eslint/utils": "7.4.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"ts-api-utils": "^1.0.1"
|
"ts-api-utils": "^1.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -1212,95 +1066,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "7.1.0",
|
|
||||||
"debug": "^4.3.4",
|
|
||||||
"globby": "^11.1.0",
|
|
||||||
"is-glob": "^4.0.3",
|
|
||||||
"minimatch": "9.0.3",
|
|
||||||
"semver": "^7.5.4",
|
|
||||||
"ts-api-utils": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"balanced-match": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/type-utils/node_modules/minimatch": {
|
|
||||||
"version": "9.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
|
||||||
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"brace-expansion": "^2.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16 || 14 >=14.17"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/isaacs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "6.21.0",
|
"version": "7.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.4.0.tgz",
|
||||||
"integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
|
"integrity": "sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -1308,13 +1080,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "6.21.0",
|
"version": "7.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.4.0.tgz",
|
||||||
"integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
|
"integrity": "sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.21.0",
|
"@typescript-eslint/types": "7.4.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.21.0",
|
"@typescript-eslint/visitor-keys": "7.4.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@@ -1323,7 +1095,7 @@
|
|||||||
"ts-api-utils": "^1.0.1"
|
"ts-api-utils": "^1.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -1360,21 +1132,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/utils": {
|
||||||
"version": "7.1.0",
|
"version": "7.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.4.0.tgz",
|
||||||
"integrity": "sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==",
|
"integrity": "sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.4.0",
|
"@eslint-community/eslint-utils": "^4.4.0",
|
||||||
"@types/json-schema": "^7.0.12",
|
"@types/json-schema": "^7.0.12",
|
||||||
"@types/semver": "^7.5.0",
|
"@types/semver": "^7.5.0",
|
||||||
"@typescript-eslint/scope-manager": "7.1.0",
|
"@typescript-eslint/scope-manager": "7.4.0",
|
||||||
"@typescript-eslint/types": "7.1.0",
|
"@typescript-eslint/types": "7.4.0",
|
||||||
"@typescript-eslint/typescript-estree": "7.1.0",
|
"@typescript-eslint/typescript-estree": "7.4.0",
|
||||||
"semver": "^7.5.4"
|
"semver": "^7.5.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -1384,116 +1156,17 @@
|
|||||||
"eslint": "^8.56.0"
|
"eslint": "^8.56.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "7.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "7.1.0",
|
|
||||||
"debug": "^4.3.4",
|
|
||||||
"globby": "^11.1.0",
|
|
||||||
"is-glob": "^4.0.3",
|
|
||||||
"minimatch": "9.0.3",
|
|
||||||
"semver": "^7.5.4",
|
|
||||||
"ts-api-utils": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "7.1.0",
|
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/brace-expansion": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"balanced-match": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/minimatch": {
|
|
||||||
"version": "9.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
|
||||||
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"brace-expansion": "^2.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16 || 14 >=14.17"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/isaacs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "6.21.0",
|
"version": "7.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.4.0.tgz",
|
||||||
"integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
|
"integrity": "sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.21.0",
|
"@typescript-eslint/types": "7.4.0",
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
"eslint-visitor-keys": "^3.4.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -1548,9 +1221,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/adm-zip": {
|
"node_modules/adm-zip": {
|
||||||
"version": "0.5.10",
|
"version": "0.5.12",
|
||||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.12.tgz",
|
||||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
"integrity": "sha512-6TVU49mK6KZb4qG6xWaaM4C7sA/sgUMLy/JYMOzkcp3BvVLpW0fXDFQiIzAuxFCt/2+xD7fNIiPFAoLZPhVNLQ==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0"
|
"node": ">=6.0"
|
||||||
}
|
}
|
||||||
@@ -3031,14 +2704,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-plugin-github": {
|
"node_modules/eslint-plugin-github": {
|
||||||
"version": "4.10.1",
|
"version": "4.10.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.10.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.10.2.tgz",
|
||||||
"integrity": "sha512-1AqQBockOM+m0ZUpwfjWtX0lWdX5cRi/hwJnSNvXoOmz/Hh+ULH6QFz6ENWueTWjoWpgPv0af3bj+snps6o4og==",
|
"integrity": "sha512-F1F5aAFgi1Y5hYoTFzGQACBkw5W1hu2Fu5FSTrMlXqrojJnKl1S2pWO/rprlowRQpt+hzHhqSpsfnodJEVd5QA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/browserslist-config": "^1.0.0",
|
"@github/browserslist-config": "^1.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
||||||
"@typescript-eslint/parser": "^6.0.0",
|
"@typescript-eslint/parser": "^7.0.1",
|
||||||
"aria-query": "^5.3.0",
|
"aria-query": "^5.3.0",
|
||||||
"eslint-config-prettier": ">=8.0.0",
|
"eslint-config-prettier": ">=8.0.0",
|
||||||
"eslint-plugin-escompat": "^3.3.3",
|
"eslint-plugin-escompat": "^3.3.3",
|
||||||
@@ -3061,121 +2734,6 @@
|
|||||||
"eslint": "^8.0.1"
|
"eslint": "^8.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/eslint-plugin": {
|
|
||||||
"version": "6.21.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz",
|
|
||||||
"integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@eslint-community/regexpp": "^4.5.1",
|
|
||||||
"@typescript-eslint/scope-manager": "6.21.0",
|
|
||||||
"@typescript-eslint/type-utils": "6.21.0",
|
|
||||||
"@typescript-eslint/utils": "6.21.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "6.21.0",
|
|
||||||
"debug": "^4.3.4",
|
|
||||||
"graphemer": "^1.4.0",
|
|
||||||
"ignore": "^5.2.4",
|
|
||||||
"natural-compare": "^1.4.0",
|
|
||||||
"semver": "^7.5.4",
|
|
||||||
"ts-api-utils": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
|
|
||||||
"eslint": "^7.0.0 || ^8.0.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/parser": {
|
|
||||||
"version": "6.21.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
|
|
||||||
"integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/scope-manager": "6.21.0",
|
|
||||||
"@typescript-eslint/types": "6.21.0",
|
|
||||||
"@typescript-eslint/typescript-estree": "6.21.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "6.21.0",
|
|
||||||
"debug": "^4.3.4"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"eslint": "^7.0.0 || ^8.0.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/type-utils": {
|
|
||||||
"version": "6.21.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz",
|
|
||||||
"integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/typescript-estree": "6.21.0",
|
|
||||||
"@typescript-eslint/utils": "6.21.0",
|
|
||||||
"debug": "^4.3.4",
|
|
||||||
"ts-api-utils": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"eslint": "^7.0.0 || ^8.0.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/utils": {
|
|
||||||
"version": "6.21.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz",
|
|
||||||
"integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==",
|
|
||||||
"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.21.0",
|
|
||||||
"@typescript-eslint/types": "6.21.0",
|
|
||||||
"@typescript-eslint/typescript-estree": "6.21.0",
|
|
||||||
"semver": "^7.5.4"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"eslint": "^7.0.0 || ^8.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/eslint-plugin-i18n-text": {
|
"node_modules/eslint-plugin-i18n-text": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz",
|
||||||
@@ -5006,9 +4564,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/nock": {
|
"node_modules/nock": {
|
||||||
"version": "13.5.3",
|
"version": "13.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/nock/-/nock-13.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz",
|
||||||
"integrity": "sha512-2NlGmHIK2rTeyy7UaY1ZNg0YZfEJMxghXgZi0b4DBsUyoDNTTxZeCSG1nmirAWF44RkkoV8NnegLVQijgVapNQ==",
|
"integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
@@ -6504,9 +6062,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.3.3",
|
"version": "5.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz",
|
||||||
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
|
"integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
|
|||||||
5
node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js
generated
vendored
5
node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js
generated
vendored
@@ -88,8 +88,6 @@ module.exports = {
|
|||||||
'no-shadow': 'off',
|
'no-shadow': 'off',
|
||||||
'@typescript-eslint/no-shadow': 'error',
|
'@typescript-eslint/no-shadow': 'error',
|
||||||
'@typescript-eslint/no-this-alias': 'error',
|
'@typescript-eslint/no-this-alias': 'error',
|
||||||
'no-throw-literal': 'off',
|
|
||||||
'@typescript-eslint/no-throw-literal': 'error',
|
|
||||||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
||||||
'@typescript-eslint/no-unnecessary-condition': 'error',
|
'@typescript-eslint/no-unnecessary-condition': 'error',
|
||||||
'@typescript-eslint/no-unnecessary-qualifier': 'error',
|
'@typescript-eslint/no-unnecessary-qualifier': 'error',
|
||||||
@@ -116,6 +114,8 @@ module.exports = {
|
|||||||
'@typescript-eslint/no-useless-template-literals': 'error',
|
'@typescript-eslint/no-useless-template-literals': 'error',
|
||||||
'@typescript-eslint/no-var-requires': 'error',
|
'@typescript-eslint/no-var-requires': 'error',
|
||||||
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
|
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
|
||||||
|
'no-throw-literal': 'off',
|
||||||
|
'@typescript-eslint/only-throw-error': 'error',
|
||||||
'@typescript-eslint/parameter-properties': 'error',
|
'@typescript-eslint/parameter-properties': 'error',
|
||||||
'@typescript-eslint/prefer-as-const': 'error',
|
'@typescript-eslint/prefer-as-const': 'error',
|
||||||
'prefer-destructuring': 'off',
|
'prefer-destructuring': 'off',
|
||||||
@@ -153,6 +153,7 @@ module.exports = {
|
|||||||
'@typescript-eslint/typedef': 'error',
|
'@typescript-eslint/typedef': 'error',
|
||||||
'@typescript-eslint/unbound-method': 'error',
|
'@typescript-eslint/unbound-method': 'error',
|
||||||
'@typescript-eslint/unified-signatures': 'error',
|
'@typescript-eslint/unified-signatures': 'error',
|
||||||
|
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=all.js.map
|
//# sourceMappingURL=all.js.map
|
||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"all.js","sourceRoot":"","sources":["../../src/configs/all.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,iDAAiD,EAAE,OAAO;QAC1D,+BAA+B,EAAE,OAAO;QACxC,mCAAmC,EAAE,OAAO;QAC5C,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;QAChD,8BAA8B,EAAE,OAAO;QACvC,iDAAiD,EAAE,OAAO;QAC1D,wBAAwB,EAAE,KAAK;QAC/B,2CAA2C,EAAE,OAAO;QACpD,oDAAoD,EAAE,OAAO;QAC7D,oDAAoD,EAAE,OAAO;QAC7D,mBAAmB,EAAE,KAAK;QAC1B,sCAAsC,EAAE,OAAO;QAC/C,+CAA+C,EA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E,OAAO;QAC3C,2CAA2C,EAAE,OAAO;QACpD,kDAAkD,EAAE,OAAO;QAC3D,iBAAiB,EAAE,KAAK;QACxB,iCAAiC,EAAE,OAAO;QAC1C,2CAA2C,EAAE,OAAO;QACpD,+CAA+C,EAAE,OAAO;QACxD,gDAAgD,EAAE,OAAO;QACzD,2CAA2C,EAAE,OAAO;QACpD,4BAA4B,EAAE,OAAO;QACrC,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;QAChD,2DAA2D,EAAE,OAAO;KACrE;CAC6B,CAAC"}
|
||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/configs/disable-type-checked.js
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/configs/disable-type-checked.js
generated
vendored
@@ -39,6 +39,7 @@ module.exports = {
|
|||||||
'@typescript-eslint/no-unsafe-unary-minus': 'off',
|
'@typescript-eslint/no-unsafe-unary-minus': 'off',
|
||||||
'@typescript-eslint/no-useless-template-literals': 'off',
|
'@typescript-eslint/no-useless-template-literals': 'off',
|
||||||
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
|
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
|
||||||
|
'@typescript-eslint/only-throw-error': 'off',
|
||||||
'@typescript-eslint/prefer-destructuring': 'off',
|
'@typescript-eslint/prefer-destructuring': 'off',
|
||||||
'@typescript-eslint/prefer-find': 'off',
|
'@typescript-eslint/prefer-find': 'off',
|
||||||
'@typescript-eslint/prefer-includes': 'off',
|
'@typescript-eslint/prefer-includes': 'off',
|
||||||
@@ -60,6 +61,7 @@ module.exports = {
|
|||||||
'@typescript-eslint/strict-boolean-expressions': 'off',
|
'@typescript-eslint/strict-boolean-expressions': 'off',
|
||||||
'@typescript-eslint/switch-exhaustiveness-check': 'off',
|
'@typescript-eslint/switch-exhaustiveness-check': 'off',
|
||||||
'@typescript-eslint/unbound-method': 'off',
|
'@typescript-eslint/unbound-method': 'off',
|
||||||
|
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=disable-type-checked.js.map
|
//# sourceMappingURL=disable-type-checked.js.map
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"disable-type-checked.js","sourceRoot":"","sources":["../../src/configs/disable-type-checked.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,aAAa,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;IAChD,KAAK,EAAE;QACL,mCAAmC,EAAE,KAAK;QAC1C,sCAAsC,EAAE,KAAK;QAC7C,4CAA4C,EAAE,KAAK;QACnD,iCAAiC,EAAE,KAAK;QACxC,sCAAsC,EAAE,KAAK;QAC7C,oCAAoC,EAAE,KAAK;QAC3C,sCAAsC,EAAE,KAAK;QAC7C,iDAAiD,EAAE,KAAK;QACxD,mDAAmD,EAAE,KAAK;QAC1D,yCAAyC,EAAE,KAAK;QAChD,oCAAoC,EAAE,KAAK;QAC3C,oCAAoC,EAAE,KAAK;QAC3C,iDAAiD,EAAE,KAAK;QACxD,wCAAwC,EAAE,KAAK;QAC/C,mCAAmC,EAAE,KAAK;QAC1C,mDAAmD,EAAE,KAAK;QAC1D,qCAAqC,EAAE,KAAK;QAC5C,2DAA2D,EAAE,KAAK;QAClE,6CAA6C,EAAE,KAAK;QACpD,6CAA6C,EAAE,KAAK;QACpD,kDAAkD,EAAE,KAAK;QACzD,kDAAkD,EAAE,KAAK;QACzD,uCAAuC,EAAE,KAAK;QAC9C,yCAAyC,EAAE,KAAK;QAChD,mCAAmC,EAAE,KAAK;QAC1C,8CAA8C,EAAE,KAAK;QACrD,4CAA4C,EAAE,KAAK;QACnD,qCAAqC,EAAE,KAAK;QAC5C,0CAA0C,EAAE,KAAK;QACjD,iDAAiD,EAAE,KAAK;QACxD,sDAAsD,EAAE,KAAK;QAC7D,yCAAyC,EAAE,KAAK;QAChD,gCAAgC,EAAE,KAAK;QACvC,oCAAoC,EAAE,KAAK;QAC3C,8CAA8C,EAAE,KAAK;QACrD,0CAA0C,EAAE,KAAK;QACjD,iDAAiD,EAAE,KAAK;QACxD,oCAAoC,EAAE,KAAK;QAC3C,oDAAoD,EAAE,KAAK;QAC3D,iDAAiD,EAAE,KAAK;QACxD,uCAAuC,EAAE,KAAK;QAC9C,4CAA4C,EAAE,KAAK;QACnD,mDAAmD,EAAE,KAAK;QAC1D,2CAA2C,EAAE,KAAK;QAClD,+CAA+C,EAAE,KAAK;QACtD,kCAAkC,EAAE,KAAK;QACzC,2CAA2C,EAAE,KAAK;QAClD,kDAAkD,EAAE,KAAK;QACzD,iCAAiC,EAAE,KAAK;QACxC,+CAA+C,EAAE,KAAK;QACtD,gDAAgD,EAAE,KAAK;QACvD,mCAAmC,EAAE,KAAK;KAC3C;CAC6B,CAAC"}
|
{"version":3,"file":"disable-type-checked.js","sourceRoot":"","sources":["../../src/configs/disable-type-checked.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,aAAa,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;IAChD,KAAK,EAAE;QACL,mCAAmC,EAAE,KAAK;QAC1C,sCAAsC,EAAE,KAAK;QAC7C,4CAA4C,EAAE,KAAK;QACnD,iCAAiC,EAAE,KAAK;QACxC,sCAAsC,EAAE,KAAK;QAC7C,oCAAoC,EAAE,KAAK;QAC3C,sCAAsC,EAAE,KAAK;QAC7C,iDAAiD,EAAE,KAAK;QACxD,mDAAmD,EAAE,KAAK;QAC1D,yCAAyC,EAAE,KAAK;QAChD,oCAAoC,EAAE,KAAK;QAC3C,oCAAoC,EAAE,KAAK;QAC3C,iDAAiD,EAAE,KAAK;QACxD,wCAAwC,EAAE,KAAK;QAC/C,mCAAmC,EAAE,KAAK;QAC1C,mDAAmD,EAAE,KAAK;QAC1D,qCAAqC,EAAE,KAAK;QAC5C,2DAA2D,EAAE,KAAK;QAClE,6CAA6C,EAAE,KAAK;QACpD,6CAA6C,EAAE,KAAK;QACpD,kDAAkD,EAAE,KAAK;QACzD,kDAAkD,EAAE,KAAK;QACzD,uCAAuC,EAAE,KAAK;QAC9C,yCAAyC,EAAE,KAAK;QAChD,mCAAmC,EAAE,KAAK;QAC1C,8CAA8C,EAAE,KAAK;QACrD,4CAA4C,EAAE,KAAK;QACnD,qCAAqC,EAAE,KAAK;QAC5C,0CAA0C,EAAE,KAAK;QACjD,iDAAiD,EAAE,KAAK;QACxD,sDAAsD,EAAE,KAAK;QAC7D,qCAAqC,EAAE,KAAK;QAC5C,yCAAyC,EAAE,KAAK;QAChD,gCAAgC,EAAE,KAAK;QACvC,oCAAoC,EAAE,KAAK;QAC3C,8CAA8C,EAAE,KAAK;QACrD,0CAA0C,EAAE,KAAK;QACjD,iDAAiD,EAAE,KAAK;QACxD,oCAAoC,EAAE,KAAK;QAC3C,oDAAoD,EAAE,KAAK;QAC3D,iDAAiD,EAAE,KAAK;QACxD,uCAAuC,EAAE,KAAK;QAC9C,4CAA4C,EAAE,KAAK;QACnD,mDAAmD,EAAE,KAAK;QAC1D,2CAA2C,EAAE,KAAK;QAClD,+CAA+C,EAAE,KAAK;QACtD,kCAAkC,EAAE,KAAK;QACzC,2CAA2C,EAAE,KAAK;QAClD,kDAAkD,EAAE,KAAK;QACzD,iCAAiC,EAAE,KAAK;QACxC,+CAA+C,EAAE,KAAK;QACtD,gDAAgD,EAAE,KAAK;QACvD,mCAAmC,EAAE,KAAK;QAC1C,2DAA2D,EAAE,KAAK;KACnE;CAC6B,CAAC"}
|
||||||
28
node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict-type-checked-only.js
generated
vendored
28
node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict-type-checked-only.js
generated
vendored
@@ -21,8 +21,6 @@ module.exports = {
|
|||||||
'@typescript-eslint/no-misused-promises': 'error',
|
'@typescript-eslint/no-misused-promises': 'error',
|
||||||
'@typescript-eslint/no-mixed-enums': 'error',
|
'@typescript-eslint/no-mixed-enums': 'error',
|
||||||
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
||||||
'no-throw-literal': 'off',
|
|
||||||
'@typescript-eslint/no-throw-literal': 'error',
|
|
||||||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
||||||
'@typescript-eslint/no-unnecessary-condition': 'error',
|
'@typescript-eslint/no-unnecessary-condition': 'error',
|
||||||
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
|
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
|
||||||
@@ -34,6 +32,8 @@ module.exports = {
|
|||||||
'@typescript-eslint/no-unsafe-member-access': 'error',
|
'@typescript-eslint/no-unsafe-member-access': 'error',
|
||||||
'@typescript-eslint/no-unsafe-return': 'error',
|
'@typescript-eslint/no-unsafe-return': 'error',
|
||||||
'@typescript-eslint/no-useless-template-literals': 'error',
|
'@typescript-eslint/no-useless-template-literals': 'error',
|
||||||
|
'no-throw-literal': 'off',
|
||||||
|
'@typescript-eslint/only-throw-error': 'error',
|
||||||
'@typescript-eslint/prefer-includes': 'error',
|
'@typescript-eslint/prefer-includes': 'error',
|
||||||
'prefer-promise-reject-errors': 'off',
|
'prefer-promise-reject-errors': 'off',
|
||||||
'@typescript-eslint/prefer-promise-reject-errors': 'error',
|
'@typescript-eslint/prefer-promise-reject-errors': 'error',
|
||||||
@@ -41,9 +41,29 @@ module.exports = {
|
|||||||
'@typescript-eslint/prefer-return-this-type': 'error',
|
'@typescript-eslint/prefer-return-this-type': 'error',
|
||||||
'require-await': 'off',
|
'require-await': 'off',
|
||||||
'@typescript-eslint/require-await': 'error',
|
'@typescript-eslint/require-await': 'error',
|
||||||
'@typescript-eslint/restrict-plus-operands': 'error',
|
'@typescript-eslint/restrict-plus-operands': [
|
||||||
'@typescript-eslint/restrict-template-expressions': 'error',
|
'error',
|
||||||
|
{
|
||||||
|
allowAny: false,
|
||||||
|
allowBoolean: false,
|
||||||
|
allowNullish: false,
|
||||||
|
allowNumberAndString: false,
|
||||||
|
allowRegExp: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'@typescript-eslint/restrict-template-expressions': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
allowAny: false,
|
||||||
|
allowBoolean: false,
|
||||||
|
allowNullish: false,
|
||||||
|
allowNumber: false,
|
||||||
|
allowRegExp: false,
|
||||||
|
allowNever: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
'@typescript-eslint/unbound-method': 'error',
|
'@typescript-eslint/unbound-method': 'error',
|
||||||
|
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=strict-type-checked-only.js.map
|
//# sourceMappingURL=strict-type-checked-only.js.map
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"strict-type-checked-only.js","sourceRoot":"","sources":["../../src/configs/strict-type-checked-only.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,mCAAmC,EAAE,OAAO;QAC5C,oCAAoC,EAAE,OAAO;QAC7C,sCAAsC,EAAE,OAAO;QAC/C,iDAAiD,EAAE,OAAO;QAC1D,mDAAmD,EAAE,OAAO;QAC5D,yCAAyC,EAAE,OAAO;QAClD,oCAAoC,EAAE,OAAO;QAC7C,iBAAiB,EAAE,KAAK;QACxB,oCAAoC,EAAE,OAAO;QAC7C,iDAAiD,EAAE,OAAO;QAC1D,wCAAwC,EAAE,OAAO;QACjD,mCAAmC,EAAE,OAAO;QAC5C,mDAAmD,EAAE,OAAO;QAC5D,kBAAkB,EAAE,KAAK;QACzB,qCAAqC,EAAE,OAAO;QAC9C,2DAA2D,EAAE,OAAO;QACpE,6CAA6C,EAAE,OAAO;QACtD,kDAAkD,EAAE,OAAO;QAC3D,kDAAkD,EAAE,OAAO;QAC3D,uCAAuC,EAAE,OAAO;QAChD,yCAAyC,EAAE,OAAO;QAClD,mCAAmC,EAAE,OAAO;QAC5C,8CAA8C,EAAE,OAAO;QACvD,4CAA4C,EAAE,OAAO;QACrD,qCAAqC,EAAE,OAAO;QAC9C,iDAAiD,EAAE,OAAO;QAC1D,oCAAoC,EAAE,OAAO;QAC7C,8BAA8B,EAAE,KAAK;QACrC,iDAAiD,EAAE,OAAO;QAC1D,iDAAiD,EAAE,OAAO;QAC1D,4CAA4C,EAAE,OAAO;QACrD,eAAe,EAAE,KAAK;QACtB,kCAAkC,EAAE,OAAO;QAC3C,2CAA2C,EAAE,OAAO;QACpD,kDAAkD,EAAE,OAAO;QAC3D,mCAAmC,EAAE,OAAO;KAC7C;CAC6B,CAAC"}
|
{"version":3,"file":"strict-type-checked-only.js","sourceRoot":"","sources":["../../src/configs/strict-type-checked-only.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,mCAAmC,EAAE,OAAO;QAC5C,oCAAoC,EAAE,OAAO;QAC7C,sCAAsC,EAAE,OAAO;QAC/C,iDAAiD,EAAE,OAAO;QAC1D,mDAAmD,EAAE,OAAO;QAC5D,yCAAyC,EAAE,OAAO;QAClD,oCAAoC,EAAE,OAAO;QAC7C,iBAAiB,EAAE,KAAK;QACxB,oCAAoC,EAAE,OAAO;QAC7C,iDAAiD,EAAE,OAAO;QAC1D,wCAAwC,EAAE,OAAO;QACjD,mCAAmC,EAAE,OAAO;QAC5C,mDAAmD,EAAE,OAAO;QAC5D,2DAA2D,EAAE,OAAO;QACpE,6CAA6C,EAAE,OAAO;QACtD,kDAAkD,EAAE,OAAO;QAC3D,kDAAkD,EAAE,OAAO;QAC3D,uCAAuC,EAAE,OAAO;QAChD,yCAAyC,EAAE,OAAO;QAClD,mCAAmC,EAAE,OAAO;QAC5C,8CAA8C,EAAE,OAAO;QACvD,4CAA4C,EAAE,OAAO;QACrD,qCAAqC,EAAE,OAAO;QAC9C,iDAAiD,EAAE,OAAO;QAC1D,kBAAkB,EAAE,KAAK;QACzB,qCAAqC,EAAE,OAAO;QAC9C,oCAAoC,EAAE,OAAO;QAC7C,8BAA8B,EAAE,KAAK;QACrC,iDAAiD,EAAE,OAAO;QAC1D,iDAAiD,EAAE,OAAO;QAC1D,4CAA4C,EAAE,OAAO;QACrD,eAAe,EAAE,KAAK;QACtB,kCAAkC,EAAE,OAAO;QAC3C,2CAA2C,EAAE;YAC3C,OAAO;YACP;gBACE,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,KAAK;gBACnB,oBAAoB,EAAE,KAAK;gBAC3B,WAAW,EAAE,KAAK;aACnB;SACF;QACD,kDAAkD,EAAE;YAClD,OAAO;YACP;gBACE,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,KAAK;gBACnB,WAAW,EAAE,KAAK;gBAClB,WAAW,EAAE,KAAK;gBAClB,UAAU,EAAE,KAAK;aAClB;SACF;QACD,mCAAmC,EAAE,OAAO;QAC5C,2DAA2D,EAAE,OAAO;KACrE;CAC6B,CAAC"}
|
||||||
33
node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict-type-checked.js
generated
vendored
33
node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict-type-checked.js
generated
vendored
@@ -9,7 +9,10 @@ module.exports = {
|
|||||||
extends: ['./configs/base', './configs/eslint-recommended'],
|
extends: ['./configs/base', './configs/eslint-recommended'],
|
||||||
rules: {
|
rules: {
|
||||||
'@typescript-eslint/await-thenable': 'error',
|
'@typescript-eslint/await-thenable': 'error',
|
||||||
'@typescript-eslint/ban-ts-comment': 'error',
|
'@typescript-eslint/ban-ts-comment': [
|
||||||
|
'error',
|
||||||
|
{ minimumDescriptionLength: 10 },
|
||||||
|
],
|
||||||
'@typescript-eslint/ban-types': 'error',
|
'@typescript-eslint/ban-types': 'error',
|
||||||
'no-array-constructor': 'off',
|
'no-array-constructor': 'off',
|
||||||
'@typescript-eslint/no-array-constructor': 'error',
|
'@typescript-eslint/no-array-constructor': 'error',
|
||||||
@@ -39,8 +42,6 @@ module.exports = {
|
|||||||
'@typescript-eslint/no-non-null-assertion': 'error',
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
||||||
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
||||||
'@typescript-eslint/no-this-alias': 'error',
|
'@typescript-eslint/no-this-alias': 'error',
|
||||||
'no-throw-literal': 'off',
|
|
||||||
'@typescript-eslint/no-throw-literal': 'error',
|
|
||||||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
||||||
'@typescript-eslint/no-unnecessary-condition': 'error',
|
'@typescript-eslint/no-unnecessary-condition': 'error',
|
||||||
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
|
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
|
||||||
@@ -59,6 +60,8 @@ module.exports = {
|
|||||||
'@typescript-eslint/no-useless-constructor': 'error',
|
'@typescript-eslint/no-useless-constructor': 'error',
|
||||||
'@typescript-eslint/no-useless-template-literals': 'error',
|
'@typescript-eslint/no-useless-template-literals': 'error',
|
||||||
'@typescript-eslint/no-var-requires': 'error',
|
'@typescript-eslint/no-var-requires': 'error',
|
||||||
|
'no-throw-literal': 'off',
|
||||||
|
'@typescript-eslint/only-throw-error': 'error',
|
||||||
'@typescript-eslint/prefer-as-const': 'error',
|
'@typescript-eslint/prefer-as-const': 'error',
|
||||||
'@typescript-eslint/prefer-includes': 'error',
|
'@typescript-eslint/prefer-includes': 'error',
|
||||||
'@typescript-eslint/prefer-literal-enum-member': 'error',
|
'@typescript-eslint/prefer-literal-enum-member': 'error',
|
||||||
@@ -69,11 +72,31 @@ module.exports = {
|
|||||||
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
||||||
'require-await': 'off',
|
'require-await': 'off',
|
||||||
'@typescript-eslint/require-await': 'error',
|
'@typescript-eslint/require-await': 'error',
|
||||||
'@typescript-eslint/restrict-plus-operands': 'error',
|
'@typescript-eslint/restrict-plus-operands': [
|
||||||
'@typescript-eslint/restrict-template-expressions': 'error',
|
'error',
|
||||||
|
{
|
||||||
|
allowAny: false,
|
||||||
|
allowBoolean: false,
|
||||||
|
allowNullish: false,
|
||||||
|
allowNumberAndString: false,
|
||||||
|
allowRegExp: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'@typescript-eslint/restrict-template-expressions': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
allowAny: false,
|
||||||
|
allowBoolean: false,
|
||||||
|
allowNullish: false,
|
||||||
|
allowNumber: false,
|
||||||
|
allowRegExp: false,
|
||||||
|
allowNever: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
'@typescript-eslint/triple-slash-reference': 'error',
|
'@typescript-eslint/triple-slash-reference': 'error',
|
||||||
'@typescript-eslint/unbound-method': 'error',
|
'@typescript-eslint/unbound-method': 'error',
|
||||||
'@typescript-eslint/unified-signatures': 'error',
|
'@typescript-eslint/unified-signatures': 'error',
|
||||||
|
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=strict-type-checked.js.map
|
//# sourceMappingURL=strict-type-checked.js.map
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"strict-type-checked.js","sourceRoot":"","sources":["../../src/configs/strict-type-checked.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,mCAAmC,EAAE,OAAO;QAC5C,mCAAmC,EAAE,OAAO;QAC5C,8BAA8B,EAAE,OAAO;QACvC,sBAAsB,EAAE,KAAK;QAC7B,yCAAyC,EAAE,OAAO;QAClD,oCAAoC,EAAE,OAAO;QAC7C,sCAAsC,EAAE,OAAO;QAC/C,iDAAiD,EAAE,OAAO;QAC1D,6CAA6C,EAAE,OAAO;QACtD,mDAAmD,EAAE,OAAO;QAC5D,sCAAsC,EAAE,OAAO;QAC/C,oCAAoC,EAAE,OAAO;QAC7C,gDAAgD,EAAE,OAAO;QACzD,wCAAwC,EAAE,OAAO;QACjD,yCAAyC,EAAE,OAAO;QAClD,oCAAoC,EAAE,OAAO;QAC7C,iBAAiB,EAAE,KAAK;QACxB,oCAAoC,EAAE,OAAO;QAC7C,yCAAyC,EAAE,OAAO;QAClD,sBAAsB,EAAE,KAAK;QAC7B,yCAAyC,EAAE,OAAO;QAClD,iDAAiD,EAAE,OAAO;QAC1D,mCAAmC,EAAE,OAAO;QAC5C,wCAAwC,EAAE,OAAO;QACjD,mCAAmC,EAAE,OAAO;QAC5C,iCAAiC,EAAE,OAAO;QAC1C,4DAA4D,EAAE,OAAO;QACrE,wDAAwD,EAAE,OAAO;QACjE,0CAA0C,EAAE,OAAO;QACnD,mDAAmD,EAAE,OAAO;QAC5D,kCAAkC,EAAE,OAAO;QAC3C,kBAAkB,EAAE,KAAK;QACzB,qCAAqC,EAAE,OAAO;QAC9C,2DAA2D,EAAE,OAAO;QACpE,6CAA6C,EAAE,OAAO;QACtD,kDAAkD,EAAE,OAAO;QAC3D,kDAAkD,EAAE,OAAO;QAC3D,mDAAmD,EAAE,OAAO;QAC5D,uCAAuC,EAAE,OAAO;QAChD,yCAAyC,EAAE,OAAO;QAClD,mCAAmC,EAAE,OAAO;QAC5C,kDAAkD,EAAE,OAAO;QAC3D,8CAA8C,EAAE,OAAO;QACvD,4CAA4C,EAAE,OAAO;QACrD,qCAAqC,EAAE,OAAO;QAC9C,gBAAgB,EAAE,KAAK;QACvB,mCAAmC,EAAE,OAAO;QAC5C,wBAAwB,EAAE,KAAK;QAC/B,2CAA2C,EAAE,OAAO;QACpD,iDAAiD,EAAE,OAAO;QAC1D,oCAAoC,EAAE,OAAO;QAC7C,oCAAoC,EAAE,OAAO;QAC7C,oCAAoC,EAAE,OAAO;QAC7C,+CAA+C,EAAE,OAAO;QACxD,8BAA8B,EAAE,KAAK;QACrC,iDAAiD,EAAE,OAAO;QAC1D,iDAAiD,EAAE,OAAO;QAC1D,4CAA4C,EAAE,OAAO;QACrD,2CAA2C,EAAE,OAAO;QACpD,eAAe,EAAE,KAAK;QACtB,kCAAkC,EAAE,OAAO;QAC3C,2CAA2C,EAAE,OAAO;QACpD,kDAAkD,EAAE,OAAO;QAC3D,2CAA2C,EAAE,OAAO;QACpD,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;KACjD;CAC6B,CAAC"}
|
{"version":3,"file":"strict-type-checked.js","sourceRoot":"","sources":["../../src/configs/strict-type-checked.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,mCAAmC,EAAE,OAAO;QAC5C,mCAAmC,EAAE;YACnC,OAAO;YACP,EAAE,wBAAwB,EAAE,EAAE,EAAE;SACjC;QACD,8BAA8B,EAA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1D,oCAAoC,EAAE,OAAO;QAC7C,kBAAkB,EAAE,KAAK;QACzB,qCAAqC,EAAE,OAAO;QAC9C,oCAAoC,EAAE,OAAO;QAC7C,oCAAoC,EAAE,OAAO;QAC7C,+CAA+C,EAAE,OAAO;QACxD,8BAA8B,EAAE,KAAK;QACrC,iDAAiD,EAAE,OAAO;QAC1D,iDAAiD,EAAE,OAAO;QAC1D,4CAA4C,EAAE,OAAO;QACrD,2CAA2C,EAAE,OAAO;QACpD,eAAe,EAAE,KAAK;QACtB,kCAAkC,EAAE,OAAO;QAC3C,2CAA2C,EAAE;YAC3C,OAAO;YACP;gBACE,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,KAAK;gBACnB,oBAAoB,EAAE,KAAK;gBAC3B,WAAW,EAAE,KAAK;aACnB;SACF;QACD,kDAAkD,EAAE;YAClD,OAAO;YACP;gBACE,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,KAAK;gBACnB,WAAW,EAAE,KAAK;gBAClB,WAAW,EAAE,KAAK;gBAClB,UAAU,EAAE,KAAK;aAClB;SACF;QACD,2CAA2C,EAAE,OAAO;QACpD,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;QAChD,2DAA2D,EAAE,OAAO;KACrE;CAC6B,CAAC"}
|
||||||
5
node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js
generated
vendored
5
node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js
generated
vendored
@@ -8,7 +8,10 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ['./configs/base', './configs/eslint-recommended'],
|
extends: ['./configs/base', './configs/eslint-recommended'],
|
||||||
rules: {
|
rules: {
|
||||||
'@typescript-eslint/ban-ts-comment': 'error',
|
'@typescript-eslint/ban-ts-comment': [
|
||||||
|
'error',
|
||||||
|
{ minimumDescriptionLength: 10 },
|
||||||
|
],
|
||||||
'@typescript-eslint/ban-types': 'error',
|
'@typescript-eslint/ban-types': 'error',
|
||||||
'no-array-constructor': 'off',
|
'no-array-constructor': 'off',
|
||||||
'@typescript-eslint/no-array-constructor': 'error',
|
'@typescript-eslint/no-array-constructor': 'error',
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"strict.js","sourceRoot":"","sources":["../../src/configs/strict.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,iDAAiD;AACjD,EAAE;AACF,4DAA4D;AAC5D,sDAAsD;AAItD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,mCAAmC,EAAE,OAAO;QAC5C,8BAA8B,EAAE,OAAO;QACvC,sBAAsB,EAAE,KAAK;QAC7B,yCAAyC,EAAE,OAAO;QAClD,6CAA6C,EAAE,OAAO;QACtD,sCAAsC,EAAE,OAAO;QAC/C,oCAAoC,EAAE,OAAO;QAC7C,gDAAgD,EAAE,OAAO;QACzD,wCAAwC,EAAE,OAAO;QACjD,yCAAyC,EAAE,OAAO;QAClD,sBAAsB,EAAE,KAAK;QAC7B,yCAAyC,EAAE,OAAO;QAClD,mCAAmC,EAAE,OAAO;QAC5C,iCAAiC,EAAE,OAAO;QAC1C,4DAA4D,EAAE,OAAO;QACrE,wDAAwD,EAAE,OAAO;QACjE,0CAA0C,EAAE,OAAO;QACnD,kCAAkC,EAAE,OAAO;QAC3C,mDAAmD,EAAE,OAAO;QAC5D,kDAAkD,EAAE,OAAO;QAC3D,gBAAgB,EAAE,KAAK;QACvB,mCAAmC,EAAE,OAAO;QAC5C,wBAAwB,EAAE,KAAK;QAC/B,2CAA2C,EAAE,OAAO;QACpD,oCAAoC,EAAE,OAAO;QAC7C,oCAAoC,EAAE,OAAO;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,CAAC"}
|
||||||
6
node_modules/@typescript-eslint/eslint-plugin/dist/index.js
generated
vendored
6
node_modules/@typescript-eslint/eslint-plugin/dist/index.js
generated
vendored
@@ -8,10 +8,13 @@ const disable_type_checked_1 = __importDefault(require("./configs/disable-type-c
|
|||||||
const eslint_recommended_1 = __importDefault(require("./configs/eslint-recommended"));
|
const eslint_recommended_1 = __importDefault(require("./configs/eslint-recommended"));
|
||||||
const recommended_1 = __importDefault(require("./configs/recommended"));
|
const recommended_1 = __importDefault(require("./configs/recommended"));
|
||||||
const recommended_type_checked_1 = __importDefault(require("./configs/recommended-type-checked"));
|
const recommended_type_checked_1 = __importDefault(require("./configs/recommended-type-checked"));
|
||||||
|
const recommended_type_checked_only_1 = __importDefault(require("./configs/recommended-type-checked-only"));
|
||||||
const strict_1 = __importDefault(require("./configs/strict"));
|
const strict_1 = __importDefault(require("./configs/strict"));
|
||||||
const strict_type_checked_1 = __importDefault(require("./configs/strict-type-checked"));
|
const strict_type_checked_1 = __importDefault(require("./configs/strict-type-checked"));
|
||||||
|
const strict_type_checked_only_1 = __importDefault(require("./configs/strict-type-checked-only"));
|
||||||
const stylistic_1 = __importDefault(require("./configs/stylistic"));
|
const stylistic_1 = __importDefault(require("./configs/stylistic"));
|
||||||
const stylistic_type_checked_1 = __importDefault(require("./configs/stylistic-type-checked"));
|
const stylistic_type_checked_1 = __importDefault(require("./configs/stylistic-type-checked"));
|
||||||
|
const stylistic_type_checked_only_1 = __importDefault(require("./configs/stylistic-type-checked-only"));
|
||||||
const rules_1 = __importDefault(require("./rules"));
|
const rules_1 = __importDefault(require("./rules"));
|
||||||
// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
|
// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
|
||||||
const { name, version } = require('../package.json');
|
const { name, version } = require('../package.json');
|
||||||
@@ -25,10 +28,13 @@ module.exports = {
|
|||||||
/** @deprecated - please use "recommended-type-checked" instead. */
|
/** @deprecated - please use "recommended-type-checked" instead. */
|
||||||
'recommended-requiring-type-checking': recommended_type_checked_1.default,
|
'recommended-requiring-type-checking': recommended_type_checked_1.default,
|
||||||
'recommended-type-checked': recommended_type_checked_1.default,
|
'recommended-type-checked': recommended_type_checked_1.default,
|
||||||
|
'recommended-type-checked-only': recommended_type_checked_only_1.default,
|
||||||
strict: strict_1.default,
|
strict: strict_1.default,
|
||||||
'strict-type-checked': strict_type_checked_1.default,
|
'strict-type-checked': strict_type_checked_1.default,
|
||||||
|
'strict-type-checked-only': strict_type_checked_only_1.default,
|
||||||
stylistic: stylistic_1.default,
|
stylistic: stylistic_1.default,
|
||||||
'stylistic-type-checked': stylistic_type_checked_1.default,
|
'stylistic-type-checked': stylistic_type_checked_1.default,
|
||||||
|
'stylistic-type-checked-only': stylistic_type_checked_only_1.default,
|
||||||
},
|
},
|
||||||
meta: {
|
meta: {
|
||||||
name,
|
name,
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/index.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/index.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAEA,wDAAgC;AAChC,0DAAkC;AAClC,0FAAgE;AAChE,sFAA6D;AAC7D,wEAAgD;AAChD,kGAAwE;AACxE,8DAAsC;AACtC,wFAA8D;AAC9D,oEAA4C;AAC5C,8FAAoE;AACpE,oDAA4B;AAE5B,sHAAsH;AACtH,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAGlD,CAAC;AAEF,iBAAS;IACP,OAAO,EAAE;QACP,GAAG,EAAH,aAAG;QACH,IAAI,EAAJ,cAAI;QACJ,sBAAsB,EAAE,8BAAkB;QAC1C,oBAAoB,EAAE,4BAAiB;QACvC,WAAW,EAAX,qBAAW;QACX,mEAAmE;QACnE,qCAAqC,EAAE,kCAAsB;QAC7D,0BAA0B,EAAE,kCAAsB;QAClD,MAAM,EAAN,gBAAM;QACN,qBAAqB,EAAE,6BAAiB;QACxC,SAAS,EAAT,mBAAS;QACT,wBAAwB,EAAE,gCAAoB;KAC/C;IACD,IAAI,EAAE;QACJ,IAAI;QACJ,OAAO;KACR;IACD,KAAK,EAAL,eAAK;CACkB,CAAC"}
|
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAEA,wDAAgC;AAChC,0DAAkC;AAClC,0FAAgE;AAChE,sFAA6D;AAC7D,wEAAgD;AAChD,kGAAwE;AACxE,4GAAiF;AACjF,8DAAsC;AACtC,wFAA8D;AAC9D,kGAAuE;AACvE,oEAA4C;AAC5C,8FAAoE;AACpE,wGAA6E;AAC7E,oDAA4B;AAE5B,sHAAsH;AACtH,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAGlD,CAAC;AAEF,iBAAS;IACP,OAAO,EAAE;QACP,GAAG,EAAH,aAAG;QACH,IAAI,EAAJ,cAAI;QACJ,sBAAsB,EAAE,8BAAkB;QAC1C,oBAAoB,EAAE,4BAAiB;QACvC,WAAW,EAAX,qBAAW;QACX,mEAAmE;QACnE,qCAAqC,EAAE,kCAAsB;QAC7D,0BAA0B,EAAE,kCAAsB;QAClD,+BAA+B,EAAE,uCAA0B;QAC3D,MAAM,EAAN,gBAAM;QACN,qBAAqB,EAAE,6BAAiB;QACxC,0BAA0B,EAAE,kCAAqB;QACjD,SAAS,EAAT,mBAAS;QACT,wBAAwB,EAAE,gCAAoB;QAC9C,6BAA6B,EAAE,qCAAwB;KACxD;IACD,IAAI,EAAE;QACJ,IAAI;QACJ,OAAO;KACR;IACD,KAAK,EAAL,eAAK;CACkB,CAAC"}
|
||||||
@@ -95,10 +95,6 @@ exports.default = (0, util_1.createRule)({
|
|||||||
return node.members;
|
return node.members;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Check the body for overload methods.
|
|
||||||
* @param node the body to be inspected.
|
|
||||||
*/
|
|
||||||
function checkBodyForOverloadMethods(node) {
|
function checkBodyForOverloadMethods(node) {
|
||||||
const members = getMembers(node);
|
const members = getMembers(node);
|
||||||
let lastMethod = null;
|
let lastMethod = null;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"adjacent-overload-signatures.js","sourceRoot":"","sources":["../../src/rules/adjacent-overload-signatures.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAE1D,kCAAwE;AAcxE,kBAAe,IAAA,iBAAU,EAAC;IACxB,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,0DAA0D;YACvE,WAAW,EAAE,WAAW;SACzB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,iBAAiB,EAAE,6CAA6C;SACjE;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QAQZ;;;;WAIG;QACH,SAAS,eAAe,CAAC,MAAqB;YAC5C,MAAM,QAAQ,GAAG,QAAQ,IAAI,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;YAEvD,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;gBACpB,KAAK,sBAAc,CAAC,wBAAwB,CAAC;gBAC7C,KAAK,sBAAc,CAAC,sBAAsB,CAAC,CAAC,CAAC;oBAC3C,yCAAyC;oBACzC,uCAAuC;oBACvC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;wBACxB,OAAO,IAAI,CAAC;oBACd,CAAC;oBAED,OAAO,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;gBAC7C,CAAC;gBACD,KAAK,sBAAc,CAAC,iBAAiB,CAAC;gBACtC,KAAK,sBAAc,CAAC,mBAAmB,CAAC,CAAC,CAAC;oBACxC,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,EAAE,IAAI,IAA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,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE;yBACxD;qBACF,CAAC,CAAC;gBACL,CAAC;qBAAM,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;oBACxB,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC3B,CAAC;gBAED,UAAU,GAAG,MAAM,CAAC;YACtB,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,SAAS,EAAE,2BAA2B;YACtC,OAAO,EAAE,2BAA2B;YACpC,aAAa,EAAE,2BAA2B;YAC1C,aAAa,EAAE,2BAA2B;YAC1C,eAAe,EAAE,2BAA2B;YAC5C,cAAc,EAAE,2BAA2B;SAC5C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
{"version":3,"file":"adjacent-overload-signatures.js","sourceRoot":"","sources":["../../src/rules/adjacent-overload-signatures.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAE1D,kCAAwE;AAcxE,kBAAe,IAAA,iBAAU,EAAC;IACxB,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,0DAA0D;YACvE,WAAW,EAAE,WAAW;SACzB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,iBAAiB,EAAE,6CAA6C;SACjE;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QAQZ;;;;WAIG;QACH,SAAS,eAAe,CAAC,MAAqB;YAC5C,MAAM,QAAQ,GAAG,QAAQ,IAAI,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;YAEvD,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;gBACpB,KAAK,sBAAc,CAAC,wBAAwB,CAAC;gBAC7C,KAAK,sBAAc,CAAC,sBAAsB,CAAC,CAAC,CAAC;oBAC3C,yCAAyC;oBACzC,uCAAuC;oBACvC,IAAI,CAAC,MAA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BACF,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC;oBACpD,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAE,MAAM;wBACZ,SAAS,EAAE,mBAAmB;wBAC9B,IAAI,EAAE;4BACJ,IAAI,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE;yBACxD;qBACF,CAAC,CAAC;gBACL,CAAC;qBAAM,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;oBACxB,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC3B,CAAC;gBAED,UAAU,GAAG,MAAM,CAAC;YACtB,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,SAAS,EAAE,2BAA2B;YACtC,OAAO,EAAE,2BAA2B;YACpC,aAAa,EAAE,2BAA2B;YAC1C,aAAa,EAAE,2BAA2B;YAC1C,eAAe,EAAE,2BAA2B;YAC5C,cAAc,EAAE,2BAA2B;SAC5C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
||||||
54
node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js
generated
vendored
54
node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js
generated
vendored
@@ -1,16 +1,18 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.defaultMinimumDescriptionLength = void 0;
|
|
||||||
const utils_1 = require("@typescript-eslint/utils");
|
const utils_1 = require("@typescript-eslint/utils");
|
||||||
const util_1 = require("../util");
|
const util_1 = require("../util");
|
||||||
exports.defaultMinimumDescriptionLength = 3;
|
const defaultMinimumDescriptionLength = 3;
|
||||||
exports.default = (0, util_1.createRule)({
|
exports.default = (0, util_1.createRule)({
|
||||||
name: 'ban-ts-comment',
|
name: 'ban-ts-comment',
|
||||||
meta: {
|
meta: {
|
||||||
type: 'problem',
|
type: 'problem',
|
||||||
docs: {
|
docs: {
|
||||||
description: 'Disallow `@ts-<directive>` comments or require descriptions after directives',
|
description: 'Disallow `@ts-<directive>` comments or require descriptions after directives',
|
||||||
recommended: 'recommended',
|
recommended: {
|
||||||
|
recommended: true,
|
||||||
|
strict: [{ minimumDescriptionLength: 10 }],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
messages: {
|
messages: {
|
||||||
tsDirectiveComment: 'Do not use "@ts-{{directive}}" because it alters compilation errors.',
|
tsDirectiveComment: 'Do not use "@ts-{{directive}}" because it alters compilation errors.',
|
||||||
@@ -50,7 +52,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
'ts-check': { $ref: '#/items/0/$defs/directiveConfigSchema' },
|
'ts-check': { $ref: '#/items/0/$defs/directiveConfigSchema' },
|
||||||
minimumDescriptionLength: {
|
minimumDescriptionLength: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
default: exports.defaultMinimumDescriptionLength,
|
default: defaultMinimumDescriptionLength,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
type: 'object',
|
type: 'object',
|
||||||
@@ -64,16 +66,18 @@ exports.default = (0, util_1.createRule)({
|
|||||||
'ts-ignore': true,
|
'ts-ignore': true,
|
||||||
'ts-nocheck': true,
|
'ts-nocheck': true,
|
||||||
'ts-check': false,
|
'ts-check': false,
|
||||||
minimumDescriptionLength: exports.defaultMinimumDescriptionLength,
|
minimumDescriptionLength: defaultMinimumDescriptionLength,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
create(context, [options]) {
|
create(context, [options]) {
|
||||||
|
// https://github.com/microsoft/TypeScript/blob/6f1ad5ad8bec5671f7e951a3524b62d82ec4be68/src/compiler/parser.ts#L10591
|
||||||
|
const singleLinePragmaRegEx = /^\/\/\/?\s*@ts-(?<directive>check|nocheck)(?<description>.*)$/;
|
||||||
/*
|
/*
|
||||||
The regex used are taken from the ones used in the official TypeScript repo -
|
The regex used are taken from the ones used in the official TypeScript repo -
|
||||||
https://github.com/microsoft/TypeScript/blob/408c760fae66080104bc85c449282c2d207dfe8e/src/compiler/scanner.ts#L288-L296
|
https://github.com/microsoft/TypeScript/blob/6f1ad5ad8bec5671f7e951a3524b62d82ec4be68/src/compiler/scanner.ts#L340-L348
|
||||||
*/
|
*/
|
||||||
const commentDirectiveRegExSingleLine = /^\/*\s*@ts-(?<directive>expect-error|ignore|check|nocheck)(?<description>.*)/;
|
const commentDirectiveRegExSingleLine = /^\/*\s*@ts-(?<directive>expect-error|ignore)(?<description>.*)/;
|
||||||
const commentDirectiveRegExMultiLine = /^\s*(?:\/|\*)*\s*@ts-(?<directive>expect-error|ignore|check|nocheck)(?<description>.*)/;
|
const commentDirectiveRegExMultiLine = /^\s*(?:\/|\*)*\s*@ts-(?<directive>expect-error|ignore)(?<description>.*)/;
|
||||||
const descriptionFormats = new Map();
|
const descriptionFormats = new Map();
|
||||||
for (const directive of [
|
for (const directive of [
|
||||||
'ts-expect-error',
|
'ts-expect-error',
|
||||||
@@ -86,18 +90,37 @@ exports.default = (0, util_1.createRule)({
|
|||||||
descriptionFormats.set(directive, new RegExp(option.descriptionFormat));
|
descriptionFormats.set(directive, new RegExp(option.descriptionFormat));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function execDirectiveRegEx(regex, str) {
|
||||||
|
const match = regex.exec(str);
|
||||||
|
if (!match) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const { directive, description } = (0, util_1.nullThrows)(match.groups, 'RegExp should contain groups');
|
||||||
|
return {
|
||||||
|
directive: (0, util_1.nullThrows)(directive, 'RegExp should contain "directive" group'),
|
||||||
|
description: (0, util_1.nullThrows)(description, 'RegExp should contain "description" group'),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function findDirectiveInComment(comment) {
|
||||||
|
if (comment.type === utils_1.AST_TOKEN_TYPES.Line) {
|
||||||
|
const matchedPragma = execDirectiveRegEx(singleLinePragmaRegEx, `//${comment.value}`);
|
||||||
|
if (matchedPragma) {
|
||||||
|
return matchedPragma;
|
||||||
|
}
|
||||||
|
return execDirectiveRegEx(commentDirectiveRegExSingleLine, comment.value);
|
||||||
|
}
|
||||||
|
const commentLines = comment.value.split('\n');
|
||||||
|
return execDirectiveRegEx(commentDirectiveRegExMultiLine, commentLines[commentLines.length - 1]);
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
Program() {
|
Program() {
|
||||||
const comments = context.sourceCode.getAllComments();
|
const comments = context.sourceCode.getAllComments();
|
||||||
comments.forEach(comment => {
|
comments.forEach(comment => {
|
||||||
const regExp = comment.type === utils_1.AST_TOKEN_TYPES.Line
|
const match = findDirectiveInComment(comment);
|
||||||
? commentDirectiveRegExSingleLine
|
|
||||||
: commentDirectiveRegExMultiLine;
|
|
||||||
const match = regExp.exec(comment.value);
|
|
||||||
if (!match) {
|
if (!match) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { directive, description } = match.groups;
|
const { directive, description } = match;
|
||||||
const fullDirective = `ts-${directive}`;
|
const fullDirective = `ts-${directive}`;
|
||||||
const option = options[fullDirective];
|
const option = options[fullDirective];
|
||||||
if (option === true) {
|
if (option === true) {
|
||||||
@@ -129,9 +152,10 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
if (option === 'allow-with-description' ||
|
if (option === 'allow-with-description' ||
|
||||||
(typeof option === 'object' && option.descriptionFormat)) {
|
(typeof option === 'object' && option.descriptionFormat)) {
|
||||||
const { minimumDescriptionLength = exports.defaultMinimumDescriptionLength, } = options;
|
const { minimumDescriptionLength } = options;
|
||||||
const format = descriptionFormats.get(fullDirective);
|
const format = descriptionFormats.get(fullDirective);
|
||||||
if ((0, util_1.getStringLength)(description.trim()) < minimumDescriptionLength) {
|
if ((0, util_1.getStringLength)(description.trim()) <
|
||||||
|
(0, util_1.nullThrows)(minimumDescriptionLength, 'Expected minimumDescriptionLength to be set')) {
|
||||||
context.report({
|
context.report({
|
||||||
data: { directive, minimumDescriptionLength },
|
data: { directive, minimumDescriptionLength },
|
||||||
node: comment,
|
node: comment,
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"ban-ts-comment.js","sourceRoot":"","sources":["../../src/rules/ban-ts-comment.ts"],"names":[],"mappings":";;;AACA,oDAA2D;AAE3D,kCAAsD;AAezC,QAAA,+BAA+B,GAAG,CAAC,CAAC;AASjD,kBAAe,IAAA,iBAAU,EAAwB;IAC/C,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,8EAA8E;YAChF,WAAW,EAAE,aAAa;SAC3B;QACD,QAAQ,EAAE;YACR,kBAAkB,EAChB,sEAAsE;YACxE,4BAA4B,EAC1B,sHAAsH;YACxH,qCAAqC,EACnC,6LAA6L;YAC/L,4CAA4C,EAC1C,yFAAyF;YAC3F,gCAAgC,EAC9B,+CAA+C;SAClD;QACD,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE;YACN;gBACE,KAAK,EAAE;oBACL,qBAAqB,EAAE;wBACrB,KAAK,EAAE;4BACL;gCACE,IAAI,EAAE,SAAS;gCACf,OAAO,EAAE,IAAI;6BACd;4BACD;gCACE,IAAI,EAAE,QAAQ;gCACd,IAAI,EAAE,CAAC,wBAAwB,CAAC;6BACjC;4BACD;gCACE,IAAI,EAAE,QAAQ;gCACd,oBAAoB,EAAE,KAAK;gCAC3B,UAAU,EAAE;oCACV,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iCACtC;6BACF;yBACF;qBACF;iBACF;gBACD,UAAU,EAAE;oBACV,iBAAiB,EAAE,EAAE,IAAI,EAA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,CAAC,CAAC;wBACL,CAAC;6BAAM,CAAC;4BACN,OAAO,CAAC,MAAM,CAAC;gCACb,IAAI,EAAE,EAAE,SAAS,EAAE;gCACnB,IAAI,EAAE,OAAO;gCACb,SAAS,EAAE,oBAAoB;6BAChC,CAAC,CAAC;wBACL,CAAC;oBACH,CAAC;oBAED,IACE,MAAM,KAAK,wBAAwB;wBACnC,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,iBAAiB,CAAC,EACxD,CAAC;wBACD,MAAM,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAC;wBAC7C,MAAM,MAAM,GAAG,kBAAkB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;wBACrD,IACE,IAAA,sBAAe,EAAC,WAAW,CAAC,IAAI,EAAE,CAAC;4BACnC,IAAA,iBAAU,EACR,wBAAwB,EACxB,6CAA6C,CAC9C,EACD,CAAC;4BACD,OAAO,CAAC,MAAM,CAAC;gCACb,IAAI,EAAE,EAAE,SAAS,EAAE,wBAAwB,EAAE;gCAC7C,IAAI,EAAE,OAAO;gCACb,SAAS,EAAE,uCAAuC;6BACnD,CAAC,CAAC;wBACL,CAAC;6BAAM,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;4BAC/C,OAAO,CAAC,MAAM,CAAC;gCACb,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;gCAC1C,IAAI,EAAE,OAAO;gCACb,SAAS,EAAE,8CAA8C;6BAC1D,CAAC,CAAC;wBACL,CAAC;oBACH,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"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;qBACxB;oBACD,GAAG,CAAC,KAAK;wBACP,IAAI,MAAM,EAAE,CAAC;4BACX,OAAO,KAAK,CAAC,eAAe,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;wBAC/C,CAAC;wBAED,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACtE,CAAC;iBACF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,OAAO;YACL,GAAG,SAAS;YAEZ,mEAAmE;YACnE,mIAAmI;YACnI,wFAAwF;YACxF,sEAAsE;YACtE,eAAe,EAAE,SAAS,CAAC,cAAuB;YAClD,aAAa,EAAE,SAAS,CAAC,cAAuB;YAChD,iBAAiB,EAAE,wBAAwB;SAC5C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"brace-style.js","sourceRoot":"","sources":["../../src/rules/brace-style.ts"],"names":[],"mappings":";;AAMA,kCAAwD;AACxD,iEAA8D;AAE9D,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAAC,aAAa,CAAC,CAAC;AAKlD,kBAAe,IAAA,iBAAU,EAAsB;IAC7C,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE;QACJ,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,CAAC,2BAA2B,CAAC;QACzC,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE;YACJ,WAAW,EAAE,2CAA2C;YACxD,eAAe,EAAE,IAAI;SACtB;QACD,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ;QAChC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO;QAC9B,cAAc,EAAE,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AG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAE,CAAC;gBAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAE,CAAC;gBAE5D,iBAAiB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YAChD,CAAC;YACD,iBAAiB,CAAC,IAAI;gBACpB,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAE,CAAC;gBAC5D,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CACpD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CACpD,CAAC;gBAEH,iBAAiB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
||||||
92
node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js
generated
vendored
92
node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js
generated
vendored
@@ -37,8 +37,55 @@ exports.default = (0, util_1.createRule)({
|
|||||||
},
|
},
|
||||||
defaultOptions: ['fields'],
|
defaultOptions: ['fields'],
|
||||||
create(context, [style]) {
|
create(context, [style]) {
|
||||||
function getMethodName(node) {
|
const propertiesInfoStack = [];
|
||||||
return ((0, util_1.getStaticStringValue)(node.key) ?? context.sourceCode.getText(node.key));
|
function getStringValue(node) {
|
||||||
|
return (0, util_1.getStaticStringValue)(node) ?? context.sourceCode.getText(node);
|
||||||
|
}
|
||||||
|
function enterClassBody() {
|
||||||
|
propertiesInfoStack.push({
|
||||||
|
properties: [],
|
||||||
|
excludeSet: new Set(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function exitClassBody() {
|
||||||
|
const { properties, excludeSet } = (0, util_1.nullThrows)(propertiesInfoStack.pop(), 'Stack should exist on class exit');
|
||||||
|
properties.forEach(node => {
|
||||||
|
const { value } = node;
|
||||||
|
if (!value || !isSupportedLiteral(value)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const name = getStringValue(node.key);
|
||||||
|
if (excludeSet.has(name)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
context.report({
|
||||||
|
node: node.key,
|
||||||
|
messageId: 'preferGetterStyle',
|
||||||
|
suggest: [
|
||||||
|
{
|
||||||
|
messageId: 'preferGetterStyleSuggestion',
|
||||||
|
fix(fixer) {
|
||||||
|
const name = context.sourceCode.getText(node.key);
|
||||||
|
let text = '';
|
||||||
|
text += printNodeModifiers(node, 'get');
|
||||||
|
text += node.computed ? `[${name}]` : name;
|
||||||
|
text += `() { return ${context.sourceCode.getText(value)}; }`;
|
||||||
|
return fixer.replaceText(node, text);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function excludeAssignedProperty(node) {
|
||||||
|
if ((0, util_1.isAssignee)(node)) {
|
||||||
|
const { excludeSet } = propertiesInfoStack[propertiesInfoStack.length - 1];
|
||||||
|
const name = (0, util_1.getStaticStringValue)(node.property) ??
|
||||||
|
context.sourceCode.getText(node.property);
|
||||||
|
if (name) {
|
||||||
|
excludeSet.add(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...(style === 'fields' && {
|
...(style === 'fields' && {
|
||||||
@@ -56,12 +103,12 @@ exports.default = (0, util_1.createRule)({
|
|||||||
if (!argument || !isSupportedLiteral(argument)) {
|
if (!argument || !isSupportedLiteral(argument)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const name = getMethodName(node);
|
const name = getStringValue(node.key);
|
||||||
if (node.parent.type === utils_1.AST_NODE_TYPES.ClassBody) {
|
if (node.parent.type === utils_1.AST_NODE_TYPES.ClassBody) {
|
||||||
const hasDuplicateKeySetter = node.parent.body.some(element => {
|
const hasDuplicateKeySetter = node.parent.body.some(element => {
|
||||||
return (element.type === utils_1.AST_NODE_TYPES.MethodDefinition &&
|
return (element.type === utils_1.AST_NODE_TYPES.MethodDefinition &&
|
||||||
element.kind === 'set' &&
|
element.kind === 'set' &&
|
||||||
getMethodName(element) === name);
|
getStringValue(element.key) === name);
|
||||||
});
|
});
|
||||||
if (hasDuplicateKeySetter) {
|
if (hasDuplicateKeySetter) {
|
||||||
return;
|
return;
|
||||||
@@ -87,31 +134,26 @@ exports.default = (0, util_1.createRule)({
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
...(style === 'getters' && {
|
...(style === 'getters' && {
|
||||||
|
ClassBody: enterClassBody,
|
||||||
|
'ClassBody:exit': exitClassBody,
|
||||||
|
'MethodDefinition[kind="constructor"] ThisExpression'(node) {
|
||||||
|
if (node.parent.type === utils_1.AST_NODE_TYPES.MemberExpression) {
|
||||||
|
let parent = node.parent;
|
||||||
|
while (!(0, util_1.isFunction)(parent)) {
|
||||||
|
parent = parent.parent;
|
||||||
|
}
|
||||||
|
if (parent.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition &&
|
||||||
|
parent.parent.kind === 'constructor') {
|
||||||
|
excludeAssignedProperty(node.parent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
PropertyDefinition(node) {
|
PropertyDefinition(node) {
|
||||||
if (!node.readonly || node.declare) {
|
if (!node.readonly || node.declare) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { value } = node;
|
const { properties } = propertiesInfoStack[propertiesInfoStack.length - 1];
|
||||||
if (!value || !isSupportedLiteral(value)) {
|
properties.push(node);
|
||||||
return;
|
|
||||||
}
|
|
||||||
context.report({
|
|
||||||
node: node.key,
|
|
||||||
messageId: 'preferGetterStyle',
|
|
||||||
suggest: [
|
|
||||||
{
|
|
||||||
messageId: 'preferGetterStyleSuggestion',
|
|
||||||
fix(fixer) {
|
|
||||||
const name = context.sourceCode.getText(node.key);
|
|
||||||
let text = '';
|
|
||||||
text += printNodeModifiers(node, 'get');
|
|
||||||
text += node.computed ? `[${name}]` : name;
|
|
||||||
text += `() { return ${context.sourceCode.getText(value)}; }`;
|
|
||||||
return fixer.replaceText(node, text);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js
generated
vendored
1
node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js
generated
vendored
@@ -52,6 +52,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
for (const element of node.elements) {
|
for (const element of node.elements) {
|
||||||
let token;
|
let token;
|
||||||
if (element == null) {
|
if (element == null) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
token = context.sourceCode.getTokenAfter(previousToken);
|
token = context.sourceCode.getTokenAfter(previousToken);
|
||||||
if (token && (0, util_1.isCommaToken)(token)) {
|
if (token && (0, util_1.isCommaToken)(token)) {
|
||||||
ignoredTokens.add(token);
|
ignoredTokens.add(token);
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"comma-spacing.js","sourceRoot":"","sources":["../../src/rules/comma-spacing.ts"],"names":[],"mappings":";;AACA,oDAA2D;AAE3D,kCAOiB;AAUjB,kBAAe,IAAA,iBAAU,EAAsB;IAC7C,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE;QACJ,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,CAAC,6BAA6B,CAAC;QAC3C,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE;YACJ,WAAW,EAAE,oDAAoD;YACjE,eAAe,EAAE,IAAI;SACtB;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,IAAI;wBACN,CAAC,CAAC,SAAS,EACb,CAAC,SAAS,IAAI,IAAA,mBAAY,EAAC,SAAS,CAAC,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC;wBAChE,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,SAAS,IAAI,IAAI,CACtB,CAAC;gBACJ,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
||||||
@@ -69,7 +69,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
// If the property's computed, we have to attach the
|
// If the property's computed, we have to attach the
|
||||||
// annotation after the square bracket, not the enclosed expression
|
// annotation after the square bracket, not the enclosed expression
|
||||||
return context.sourceCode.getTokenAfter(node.key);
|
return (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node.key), util_1.NullThrowsReasons.MissingToken(']', 'key'));
|
||||||
}
|
}
|
||||||
return [
|
return [
|
||||||
fixer.remove(typeArguments),
|
fixer.remove(typeArguments),
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"consistent-generic-constructors.js","sourceRoot":"","sources":["../../src/rules/consistent-generic-constructors.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAE1D,kCAAqC;AAKrC,kBAAe,IAAA,iBAAU,EAAsB;IAC7C,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,wGAAwG;YAC1G,WAAW,EAAE,WAAW;SACzB;QACD,QAAQ,EAAE;YACR,oBAAoB,EAClB,gFAAgF;YAClF,iBAAiB,EACf,2FAA2F;SAC9F;QACD,OAAO,EAAE,MAAM;QACf,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,iBAAiB,EAAE,aAAa,CAAC;aACzC;SACF;KACF;IACD,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/B,MAA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AC;yBACpC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;oBACzC,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,mBAAmB;wBAC9B,CAAC,GAAG,CAAC,KAAK;4BACR,MAAM,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;4BAC/B,KAAK,MAAM,OAAO,IAAI,aAAa,EAAE,CAAC;gCACpC,MAAM,KAAK,CAAC,eAAe,CACzB,GAAG,CAAC,MAAM,EACV,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CACpC,CAAC;4BACJ,CAAC;4BACD,MAAM,KAAK,CAAC,eAAe,CACzB,GAAG,CAAC,MAAM,EACV,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAC9C,CAAC;4BACF,IAAI,CAAC,SAAS,EAAE,CAAC;gCACf,MAAM,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;4BAChD,CAAC;wBACH,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
{"version":3,"file":"consistent-generic-constructors.js","sourceRoot":"","sources":["../../src/rules/consistent-generic-constructors.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAE1D,kCAAoE;AAKpE,kBAAe,IAAA,iBAAU,EAAsB;IAC7C,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,wGAAwG;YAC1G,WAAW,EAAE,WAAW;SACzB;QACD,QAAQ,EAAE;YACR,oBAAoB,EAClB,gFAAgF;YAClF,iBAAiB,EACf,2FAA2F;SAC9F;QACD,OAAO,EAAE,MAAM;QACf,MAAM,EAAE;YACN;gBACE,IA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E,KAAK,KAAK,GAAG,CAAC;oBAC9D,MAAM,aAAa,GAAG,IAAI,GAAG,CAC3B,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CACjD,CAAC;oBACF,OAAO,CAAC,UAAU;yBACf,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC;yBACpC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;oBACzC,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,mBAAmB;wBAC9B,CAAC,GAAG,CAAC,KAAK;4BACR,MAAM,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;4BAC/B,KAAK,MAAM,OAAO,IAAI,aAAa,EAAE,CAAC;gCACpC,MAAM,KAAK,CAAC,eAAe,CACzB,GAAG,CAAC,MAAM,EACV,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CACpC,CAAC;4BACJ,CAAC;4BACD,MAAM,KAAK,CAAC,eAAe,CACzB,GAAG,CAAC,MAAM,EACV,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAC9C,CAAC;4BACF,IAAI,CAAC,SAAS,EAAE,CAAC;gCACf,MAAM,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;4BAChD,CAAC;wBACH,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
||||||
@@ -98,8 +98,8 @@ exports.default = (0, util_1.createRule)({
|
|||||||
let beforeCount = 0;
|
let beforeCount = 0;
|
||||||
let afterCount = 0;
|
let afterCount = 0;
|
||||||
if ((0, util_1.isParenthesized)(node, context.sourceCode)) {
|
if ((0, util_1.isParenthesized)(node, context.sourceCode)) {
|
||||||
const bodyOpeningParen = context.sourceCode.getTokenBefore(node, util_1.isOpeningParenToken);
|
const bodyOpeningParen = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(node, util_1.isOpeningParenToken), util_1.NullThrowsReasons.MissingToken('(', 'node'));
|
||||||
const bodyClosingParen = context.sourceCode.getTokenAfter(node, util_1.isClosingParenToken);
|
const bodyClosingParen = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(node, util_1.isClosingParenToken), util_1.NullThrowsReasons.MissingToken(')', 'node'));
|
||||||
beforeCount = node.range[0] - bodyOpeningParen.range[0];
|
beforeCount = node.range[0] - bodyOpeningParen.range[0];
|
||||||
afterCount = bodyClosingParen.range[1] - node.range[1];
|
afterCount = bodyClosingParen.range[1] - node.range[1];
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
231
node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js
generated
vendored
231
node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js
generated
vendored
@@ -11,21 +11,14 @@ exports.default = (0, util_1.createRule)({
|
|||||||
},
|
},
|
||||||
messages: {
|
messages: {
|
||||||
typeOverValue: 'All imports in the declaration are only used as types. Use `import type`.',
|
typeOverValue: 'All imports in the declaration are only used as types. Use `import type`.',
|
||||||
someImportsAreOnlyTypes: 'Imports {{typeImports}} are only used as types.',
|
someImportsAreOnlyTypes: 'Imports {{typeImports}} are only used as type.',
|
||||||
aImportIsOnlyTypes: 'Import {{typeImports}} is only used as types.',
|
avoidImportType: 'Use an `import` instead of an `import type`.',
|
||||||
someImportsInDecoMeta: 'Type imports {{typeImports}} are used by decorator metadata.',
|
|
||||||
aImportInDecoMeta: 'Type import {{typeImports}} is used by decorator metadata.',
|
|
||||||
valueOverType: 'Use an `import` instead of an `import type`.',
|
|
||||||
noImportTypeAnnotations: '`import()` type annotations are forbidden.',
|
noImportTypeAnnotations: '`import()` type annotations are forbidden.',
|
||||||
},
|
},
|
||||||
schema: [
|
schema: [
|
||||||
{
|
{
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
prefer: {
|
|
||||||
type: 'string',
|
|
||||||
enum: ['type-imports', 'no-type-imports'],
|
|
||||||
},
|
|
||||||
disallowTypeAnnotations: {
|
disallowTypeAnnotations: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
},
|
},
|
||||||
@@ -33,6 +26,10 @@ exports.default = (0, util_1.createRule)({
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
enum: ['separate-type-imports', 'inline-type-imports'],
|
enum: ['separate-type-imports', 'inline-type-imports'],
|
||||||
},
|
},
|
||||||
|
prefer: {
|
||||||
|
type: 'string',
|
||||||
|
enum: ['type-imports', 'no-type-imports'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
additionalProperties: false,
|
additionalProperties: false,
|
||||||
},
|
},
|
||||||
@@ -49,12 +46,51 @@ exports.default = (0, util_1.createRule)({
|
|||||||
create(context, [option]) {
|
create(context, [option]) {
|
||||||
const prefer = option.prefer ?? 'type-imports';
|
const prefer = option.prefer ?? 'type-imports';
|
||||||
const disallowTypeAnnotations = option.disallowTypeAnnotations !== false;
|
const disallowTypeAnnotations = option.disallowTypeAnnotations !== false;
|
||||||
const fixStyle = option.fixStyle ?? 'separate-type-imports';
|
const selectors = {};
|
||||||
const sourceImportsMap = {};
|
if (disallowTypeAnnotations) {
|
||||||
|
selectors.TSImportType = (node) => {
|
||||||
|
context.report({
|
||||||
|
node,
|
||||||
|
messageId: 'noImportTypeAnnotations',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (prefer === 'no-type-imports') {
|
||||||
return {
|
return {
|
||||||
...(prefer === 'type-imports'
|
...selectors,
|
||||||
? {
|
'ImportDeclaration[importKind = "type"]'(node) {
|
||||||
|
context.report({
|
||||||
|
node,
|
||||||
|
messageId: 'avoidImportType',
|
||||||
|
fix(fixer) {
|
||||||
|
return fixRemoveTypeSpecifierFromImportDeclaration(fixer, node);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
'ImportSpecifier[importKind = "type"]'(node) {
|
||||||
|
context.report({
|
||||||
|
node,
|
||||||
|
messageId: 'avoidImportType',
|
||||||
|
fix(fixer) {
|
||||||
|
return fixRemoveTypeSpecifierFromImportSpecifier(fixer, node);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
// prefer type imports
|
// prefer type imports
|
||||||
|
const fixStyle = option.fixStyle ?? 'separate-type-imports';
|
||||||
|
let hasDecoratorMetadata = false;
|
||||||
|
const sourceImportsMap = {};
|
||||||
|
const emitDecoratorMetadata = (0, util_1.getParserServices)(context, true).emitDecoratorMetadata ?? false;
|
||||||
|
const experimentalDecorators = (0, util_1.getParserServices)(context, true).experimentalDecorators ?? false;
|
||||||
|
if (experimentalDecorators && emitDecoratorMetadata) {
|
||||||
|
selectors.Decorator = () => {
|
||||||
|
hasDecoratorMetadata = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...selectors,
|
||||||
ImportDeclaration(node) {
|
ImportDeclaration(node) {
|
||||||
const source = node.source.value;
|
const source = node.source.value;
|
||||||
// sourceImports is the object containing all the specifics for a particular import source, type or value
|
// sourceImports is the object containing all the specifics for a particular import source, type or value
|
||||||
@@ -75,6 +111,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!sourceImports.valueOnlyNamedImport &&
|
if (!sourceImports.valueOnlyNamedImport &&
|
||||||
|
node.specifiers.length &&
|
||||||
node.specifiers.every(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier)) {
|
node.specifiers.every(specifier => specifier.type === utils_1.AST_NODE_TYPES.ImportSpecifier)) {
|
||||||
sourceImports.valueOnlyNamedImport = node;
|
sourceImports.valueOnlyNamedImport = node;
|
||||||
sourceImports.valueImport = node;
|
sourceImports.valueImport = node;
|
||||||
@@ -106,12 +143,10 @@ exports.default = (0, util_1.createRule)({
|
|||||||
* export default Type;
|
* export default Type;
|
||||||
* export = Type;
|
* export = Type;
|
||||||
*/
|
*/
|
||||||
if (ref.identifier.parent.type ===
|
if (ref.identifier.parent.type === utils_1.AST_NODE_TYPES.ExportSpecifier ||
|
||||||
utils_1.AST_NODE_TYPES.ExportSpecifier ||
|
|
||||||
ref.identifier.parent.type ===
|
ref.identifier.parent.type ===
|
||||||
utils_1.AST_NODE_TYPES.ExportDefaultDeclaration ||
|
utils_1.AST_NODE_TYPES.ExportDefaultDeclaration ||
|
||||||
ref.identifier.parent.type ===
|
ref.identifier.parent.type === utils_1.AST_NODE_TYPES.TSExportAssignment) {
|
||||||
utils_1.AST_NODE_TYPES.TSExportAssignment) {
|
|
||||||
if (ref.isValueReference && ref.isTypeReference) {
|
if (ref.isValueReference && ref.isTypeReference) {
|
||||||
return node.importKind === 'type';
|
return node.importKind === 'type';
|
||||||
}
|
}
|
||||||
@@ -165,8 +200,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((node.importKind === 'value' && typeSpecifiers.length) ||
|
if (node.importKind === 'value' && typeSpecifiers.length) {
|
||||||
(node.importKind === 'type' && valueSpecifiers.length)) {
|
|
||||||
sourceImports.reportValueImports.push({
|
sourceImports.reportValueImports.push({
|
||||||
node,
|
node,
|
||||||
typeSpecifiers,
|
typeSpecifiers,
|
||||||
@@ -177,6 +211,42 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'Program:exit'() {
|
'Program:exit'() {
|
||||||
|
if (hasDecoratorMetadata) {
|
||||||
|
// Experimental decorator metadata is bowl of poop that cannot be
|
||||||
|
// supported based on pure syntactic analysis.
|
||||||
|
//
|
||||||
|
// So we can do one of two things:
|
||||||
|
// 1) add type-information to the rule in a breaking change and
|
||||||
|
// prevent users from using it so that we can fully support this
|
||||||
|
// case.
|
||||||
|
// 2) make the rule ignore all imports that are used in a file that
|
||||||
|
// might have decorator metadata.
|
||||||
|
//
|
||||||
|
// (1) is has huge impact and prevents the rule from being used by 99%
|
||||||
|
// of users Frankly - it's a straight-up bad option. So instead we
|
||||||
|
// choose with option (2) and just avoid reporting on any imports in a
|
||||||
|
// file with both emitDecoratorMetadata AND decorators
|
||||||
|
//
|
||||||
|
// For more context see the discussion in this issue and its linked
|
||||||
|
// issues:
|
||||||
|
// https://github.com/typescript-eslint/typescript-eslint/issues/5468
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// NOTE - in TS 5.0 `experimentalDecorators` became the legacy option,
|
||||||
|
// replaced with un-flagged, stable decorators and thus the type-aware
|
||||||
|
// emitDecoratorMetadata implementation also became legacy. in TS 5.2
|
||||||
|
// support for the new, stable decorator metadata proposal was added -
|
||||||
|
// however this proposal does not include type information
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// PHEW. So TL;DR what does all this mean?
|
||||||
|
// - if you use experimentalDecorators:true,
|
||||||
|
// emitDecoratorMetadata:true, and have a decorator in the file -
|
||||||
|
// the rule will do nothing in the file out of an abundance of
|
||||||
|
// caution.
|
||||||
|
// - else the rule will work as normal.
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (const sourceImports of Object.values(sourceImportsMap)) {
|
for (const sourceImports of Object.values(sourceImportsMap)) {
|
||||||
if (sourceImports.reportValueImports.length === 0) {
|
if (sourceImports.reportValueImports.length === 0) {
|
||||||
// nothing to fix. value specifiers and type specifiers are correctly written
|
// nothing to fix. value specifiers and type specifiers are correctly written
|
||||||
@@ -204,88 +274,37 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const isTypeImport = report.node.importKind === 'type';
|
|
||||||
// we have a mixed type/value import or just value imports, so we need to split them out into multiple imports if separate-type-imports is configured
|
// we have a mixed type/value import or just value imports, so we need to split them out into multiple imports if separate-type-imports is configured
|
||||||
const importNames = (isTypeImport
|
const importNames = report.typeSpecifiers.map(specifier => `"${specifier.local.name}"`);
|
||||||
? report.valueSpecifiers // import type { A } from 'roo'; // WHERE A is used in value position
|
|
||||||
: report.typeSpecifiers) // import { A, B } from 'roo'; // WHERE A is used in type position and B is in value position
|
|
||||||
.map(specifier => `"${specifier.local.name}"`);
|
|
||||||
const message = (() => {
|
const message = (() => {
|
||||||
const typeImports = (0, util_1.formatWordList)(importNames);
|
const typeImports = (0, util_1.formatWordList)(importNames);
|
||||||
if (importNames.length === 1) {
|
if (importNames.length === 1) {
|
||||||
if (isTypeImport) {
|
|
||||||
return {
|
return {
|
||||||
messageId: 'aImportInDecoMeta',
|
messageId: 'someImportsAreOnlyTypes',
|
||||||
data: { typeImports },
|
data: {
|
||||||
};
|
typeImports,
|
||||||
}
|
},
|
||||||
return {
|
|
||||||
messageId: 'aImportIsOnlyTypes',
|
|
||||||
data: { typeImports },
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if (isTypeImport) {
|
|
||||||
return {
|
|
||||||
messageId: 'someImportsInDecoMeta',
|
|
||||||
data: { typeImports }, // typeImports are all the value specifiers that are in the type position
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
messageId: 'someImportsAreOnlyTypes',
|
messageId: 'someImportsAreOnlyTypes',
|
||||||
data: { typeImports }, // typeImports are all the type specifiers in the value position
|
data: {
|
||||||
|
typeImports,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
context.report({
|
context.report({
|
||||||
node: report.node,
|
node: report.node,
|
||||||
...message,
|
...message,
|
||||||
*fix(fixer) {
|
*fix(fixer) {
|
||||||
if (isTypeImport) {
|
|
||||||
// take all the valueSpecifiers and put them on a new line
|
|
||||||
yield* fixToValueImportDeclaration(fixer, report, sourceImports);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// take all the typeSpecifiers and put them on a new line
|
// take all the typeSpecifiers and put them on a new line
|
||||||
yield* fixToTypeImportDeclaration(fixer, report, sourceImports);
|
yield* fixToTypeImportDeclaration(fixer, report, sourceImports);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
|
||||||
: {
|
|
||||||
// prefer no type imports
|
|
||||||
'ImportDeclaration[importKind = "type"]'(node) {
|
|
||||||
context.report({
|
|
||||||
node,
|
|
||||||
messageId: 'valueOverType',
|
|
||||||
fix(fixer) {
|
|
||||||
return fixRemoveTypeSpecifierFromImportDeclaration(fixer, node);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
'ImportSpecifier[importKind = "type"]'(node) {
|
|
||||||
context.report({
|
|
||||||
node,
|
|
||||||
messageId: 'valueOverType',
|
|
||||||
fix(fixer) {
|
|
||||||
return fixRemoveTypeSpecifierFromImportSpecifier(fixer, node);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
...(disallowTypeAnnotations
|
|
||||||
? {
|
|
||||||
// disallow `import()` type
|
|
||||||
TSImportType(node) {
|
|
||||||
context.report({
|
|
||||||
node,
|
|
||||||
messageId: 'noImportTypeAnnotations',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
|
||||||
: {}),
|
|
||||||
};
|
};
|
||||||
function classifySpecifier(node) {
|
function classifySpecifier(node) {
|
||||||
const defaultSpecifier = node.specifiers[0].type === utils_1.AST_NODE_TYPES.ImportDefaultSpecifier
|
const defaultSpecifier = node.specifiers[0].type === utils_1.AST_NODE_TYPES.ImportDefaultSpecifier
|
||||||
@@ -356,7 +375,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
const last = namedSpecifierGroup[namedSpecifierGroup.length - 1];
|
const last = namedSpecifierGroup[namedSpecifierGroup.length - 1];
|
||||||
const removeRange = [first.range[0], last.range[1]];
|
const removeRange = [first.range[0], last.range[1]];
|
||||||
const textRange = [...removeRange];
|
const textRange = [...removeRange];
|
||||||
const before = context.sourceCode.getTokenBefore(first);
|
const before = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(first), util_1.NullThrowsReasons.MissingToken('token', 'first specifier'));
|
||||||
textRange[0] = before.range[1];
|
textRange[0] = before.range[1];
|
||||||
if ((0, util_1.isCommaToken)(before)) {
|
if ((0, util_1.isCommaToken)(before)) {
|
||||||
removeRange[0] = before.range[0];
|
removeRange[0] = before.range[0];
|
||||||
@@ -366,7 +385,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
const isFirst = allNamedSpecifiers[0] === first;
|
const isFirst = allNamedSpecifiers[0] === first;
|
||||||
const isLast = allNamedSpecifiers[allNamedSpecifiers.length - 1] === last;
|
const isLast = allNamedSpecifiers[allNamedSpecifiers.length - 1] === last;
|
||||||
const after = context.sourceCode.getTokenAfter(last);
|
const after = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(last), util_1.NullThrowsReasons.MissingToken('token', 'last specifier'));
|
||||||
textRange[1] = after.range[0];
|
textRange[1] = after.range[0];
|
||||||
if (isFirst || isLast) {
|
if (isFirst || isLast) {
|
||||||
if ((0, util_1.isCommaToken)(after)) {
|
if ((0, util_1.isCommaToken)(after)) {
|
||||||
@@ -385,8 +404,8 @@ exports.default = (0, util_1.createRule)({
|
|||||||
* ^^^^^^^^^^^^^ insert
|
* ^^^^^^^^^^^^^ insert
|
||||||
*/
|
*/
|
||||||
function fixInsertNamedSpecifiersInNamedSpecifierList(fixer, target, insertText) {
|
function fixInsertNamedSpecifiersInNamedSpecifierList(fixer, target, insertText) {
|
||||||
const closingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween(context.sourceCode.getFirstToken(target), target.source, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', target.type));
|
const closingBraceToken = (0, util_1.nullThrows)(context.sourceCode.getFirstTokenBetween((0, util_1.nullThrows)(context.sourceCode.getFirstToken(target), util_1.NullThrowsReasons.MissingToken('token before', 'import')), target.source, util_1.isClosingBraceToken), util_1.NullThrowsReasons.MissingToken('}', target.type));
|
||||||
const before = context.sourceCode.getTokenBefore(closingBraceToken);
|
const before = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(closingBraceToken), util_1.NullThrowsReasons.MissingToken('token before', 'closing brace'));
|
||||||
if (!(0, util_1.isCommaToken)(before) && !(0, util_1.isOpeningBraceToken)(before)) {
|
if (!(0, util_1.isCommaToken)(before) && !(0, util_1.isOpeningBraceToken)(before)) {
|
||||||
insertText = `,${insertText}`;
|
insertText = `,${insertText}`;
|
||||||
}
|
}
|
||||||
@@ -567,54 +586,6 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function* fixToValueImportDeclaration(fixer, report, sourceImports) {
|
|
||||||
const { node } = report;
|
|
||||||
const { defaultSpecifier, namespaceSpecifier, namedSpecifiers } = classifySpecifier(node);
|
|
||||||
if (namespaceSpecifier) {
|
|
||||||
// import type * as types from 'foo'
|
|
||||||
yield* fixRemoveTypeSpecifierFromImportDeclaration(fixer, node);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (defaultSpecifier) {
|
|
||||||
if (report.valueSpecifiers.includes(defaultSpecifier) &&
|
|
||||||
namedSpecifiers.length === 0) {
|
|
||||||
// import type Type from 'foo'
|
|
||||||
yield* fixRemoveTypeSpecifierFromImportDeclaration(fixer, node);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (namedSpecifiers.every(specifier => report.valueSpecifiers.includes(specifier))) {
|
|
||||||
// import type {Type1, Type2} from 'foo'
|
|
||||||
yield* fixRemoveTypeSpecifierFromImportDeclaration(fixer, node);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// we have some valueSpecifiers intermixed in types that need to be put on their own line
|
|
||||||
// import type { Type1, A } from 'foo'
|
|
||||||
// import type { A } from 'foo'
|
|
||||||
const valueNamedSpecifiers = namedSpecifiers.filter(specifier => report.valueSpecifiers.includes(specifier));
|
|
||||||
const fixesNamedSpecifiers = getFixesNamedSpecifiers(fixer, node, valueNamedSpecifiers, namedSpecifiers);
|
|
||||||
const afterFixes = [];
|
|
||||||
if (valueNamedSpecifiers.length) {
|
|
||||||
if (sourceImports.valueOnlyNamedImport) {
|
|
||||||
const insertTypeNamedSpecifiers = fixInsertNamedSpecifiersInNamedSpecifierList(fixer, sourceImports.valueOnlyNamedImport, fixesNamedSpecifiers.typeNamedSpecifiersText);
|
|
||||||
if (sourceImports.valueOnlyNamedImport.range[1] <= node.range[0]) {
|
|
||||||
yield insertTypeNamedSpecifiers;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
afterFixes.push(insertTypeNamedSpecifiers);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// some are types.
|
|
||||||
// Add new value import and later remove those value specifiers from import type
|
|
||||||
yield fixer.insertTextBefore(node, `import {${fixesNamedSpecifiers.typeNamedSpecifiersText}} from ${context.sourceCode.getText(node.source)};\n`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
yield* fixesNamedSpecifiers.removeTypeNamedSpecifiers;
|
|
||||||
yield* afterFixes;
|
|
||||||
}
|
|
||||||
function* fixRemoveTypeSpecifierFromImportDeclaration(fixer, node) {
|
function* fixRemoveTypeSpecifierFromImportDeclaration(fixer, node) {
|
||||||
// import type Foo from 'foo'
|
// import type Foo from 'foo'
|
||||||
// ^^^^ remove
|
// ^^^^ remove
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js
generated
vendored
1
node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js
generated
vendored
@@ -36,6 +36,7 @@ const util_1 = require("../../util");
|
|||||||
* - `Fruit.Apple` --> `Fruit`
|
* - `Fruit.Apple` --> `Fruit`
|
||||||
*/
|
*/
|
||||||
function getBaseEnumType(typeChecker, type) {
|
function getBaseEnumType(typeChecker, type) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
const symbol = type.getSymbol();
|
const symbol = type.getSymbol();
|
||||||
if (!tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.EnumMember)) {
|
if (!tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.EnumMember)) {
|
||||||
return type;
|
return type;
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/rules/enum-utils/shared.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,+CAAiC;AAEjC,qCAA2C;AAE3C;;;;;;;GAOG;AACH,SAAS,eAAe,CAAC,WAA2B,EAAE,IAAa;IACjE,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAG,CAAC;IACjC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,gBAAiB,CAAC,MAAM,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAAC,IAAa;IAC3C,OAAO,OAAO;SACX,cAAc,CAAC,IAAI,CAAC;SACpB,MAAM,CAAC,CAAC,OAAO,EAA6B,EAAE,CAC7C,IAAA,oBAAa,EAAC,OAAO,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CACjD,CAAC;AACN,CAAC;AAND,0CAMC;AAED;;;;;;;;GAQG;AACH,SAAgB,YAAY,CAC1B,WAA2B,EAC3B,IAAa;IAEb,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,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,oBAAoB,GAAG,iBAAiB,CAAC,IAAI,CAAC;YACpD,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YAE3C,QAAQ,oBAAoB,CAAC,IAAI,EAAE,CAAC;gBAClC,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU;oBAC3B,OAAO,GAAG,QAAQ,IAAI,oBAAoB,CAAC,IAAI,EAAE,CAAC;gBAEpD,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;oBACjC,MAAM,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;oBAElE,OAAO,GAAG,QAAQ,KAAK,UAAU,IAAI,CAAC;gBACxC,CAAC;gBAED,KAAK,EAAE,CAAC,UAAU,CAAC,oBAAoB;oBACrC,OAAO,GAAG,QAAQ,IAAI,oBAAoB,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC;gBAErE;oBACE,MAAM;YACV,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAlCD,oDAkCC"}
|
||||||
@@ -70,6 +70,16 @@ exports.default = (0, util_1.createRule)({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
create(context, [options]) {
|
create(context, [options]) {
|
||||||
|
const functionInfoStack = [];
|
||||||
|
function enterFunction(node) {
|
||||||
|
functionInfoStack.push({
|
||||||
|
node,
|
||||||
|
returns: [],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function popFunctionInfo(exitNodeType) {
|
||||||
|
return (0, util_1.nullThrows)(functionInfoStack.pop(), `Stack should exist on ${exitNodeType} exit`);
|
||||||
|
}
|
||||||
function isAllowedFunction(node) {
|
function isAllowedFunction(node) {
|
||||||
if (options.allowFunctionsWithoutTypeParameters && !node.typeParameters) {
|
if (options.allowFunctionsWithoutTypeParameters && !node.typeParameters) {
|
||||||
return true;
|
return true;
|
||||||
@@ -120,8 +130,8 @@ exports.default = (0, util_1.createRule)({
|
|||||||
function isIIFE(node) {
|
function isIIFE(node) {
|
||||||
return node.parent.type === utils_1.AST_NODE_TYPES.CallExpression;
|
return node.parent.type === utils_1.AST_NODE_TYPES.CallExpression;
|
||||||
}
|
}
|
||||||
return {
|
function exitFunctionExpression(node) {
|
||||||
'ArrowFunctionExpression, FunctionExpression'(node) {
|
const info = popFunctionInfo('function expression');
|
||||||
if (options.allowConciseArrowFunctionExpressionsStartingWithVoid &&
|
if (options.allowConciseArrowFunctionExpressionsStartingWithVoid &&
|
||||||
node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression &&
|
node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression &&
|
||||||
node.expression &&
|
node.expression &&
|
||||||
@@ -137,25 +147,33 @@ exports.default = (0, util_1.createRule)({
|
|||||||
(0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node))) {
|
(0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(0, explicitReturnTypeUtils_1.checkFunctionReturnType)(node, options, context.sourceCode, loc => context.report({
|
(0, explicitReturnTypeUtils_1.checkFunctionReturnType)(info, options, context.sourceCode, loc => context.report({
|
||||||
node,
|
node,
|
||||||
loc,
|
loc,
|
||||||
messageId: 'missingReturnType',
|
messageId: 'missingReturnType',
|
||||||
}));
|
}));
|
||||||
},
|
}
|
||||||
FunctionDeclaration(node) {
|
return {
|
||||||
|
'ArrowFunctionExpression, FunctionExpression, FunctionDeclaration': enterFunction,
|
||||||
|
'ArrowFunctionExpression:exit': exitFunctionExpression,
|
||||||
|
'FunctionExpression:exit': exitFunctionExpression,
|
||||||
|
'FunctionDeclaration:exit'(node) {
|
||||||
|
const info = popFunctionInfo('function declaration');
|
||||||
if (isAllowedFunction(node)) {
|
if (isAllowedFunction(node)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (options.allowTypedFunctionExpressions && node.returnType) {
|
if (options.allowTypedFunctionExpressions && node.returnType) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(0, explicitReturnTypeUtils_1.checkFunctionReturnType)(node, options, context.sourceCode, loc => context.report({
|
(0, explicitReturnTypeUtils_1.checkFunctionReturnType)(info, options, context.sourceCode, loc => context.report({
|
||||||
node,
|
node,
|
||||||
loc,
|
loc,
|
||||||
messageId: 'missingReturnType',
|
messageId: 'missingReturnType',
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
ReturnStatement(node) {
|
||||||
|
functionInfoStack.at(-1)?.returns.push(node);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"explicit-function-return-type.js","sourceRoot":"","sources":["../../src/rules/explicit-function-return-type.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAE1D,kCAAqC;AACrC,6EAIyC;AAgBzC,kBAAe,IAAA,iBAAU,EAAsB;IAC7C,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,8DAA8D;SACjE;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,kCAAkC;SACtD;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,oDAAoD,EAAE;wBACpD,WAAW,EACT,sEAAsE;wBACxE,IAAI,EAAE,SAAS;qBAChB;oBACD,gBAAgB,EAAE;wBAChB,WAAW,EACT,yFAAyF;wBAC3F,IAAI,EAAE,SAAS;qBAChB;oBACD,yBAAyB,EAAE;wBACzB,WAAW,EACT,gFAAgF;wBAClF,IAAI,EAAE,SAAS;qBAChB;oBACD,6BAA6B,EAAE;wBAC7B,WAAW,EACT,6EAA6E;wBAC/E,IAAI,EAAE,SAAS;qBAChB;oBACD,yCAAyC,EAAE;wBACzC,WAAW,EACT,6EAA6E;wBAC/E,IAA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AAC,CAAC"}
|
{"version":3,"file":"explicit-function-return-type.js","sourceRoot":"","sources":["../../src/rules/explicit-function-return-type.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAE1D,kCAAiD;AAEjD,6EAIyC;AAqBzC,kBAAe,IAAA,iBAAU,EAAsB;IAC7C,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,8DAA8D;SACjE;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,kCAAkC;SACtD;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,oDAAoD,EAAE;wBACpD,WAAW,EACT,sEAAsE;wBACxE,IAAI,EAAE,SAAS;qBAChB;oBACD,gBAAgB,EAAE;wBAChB,WAAW,EACT,yFAAyF;wBAC3F,IAAI,EAAE,SAAS;qBAChB;oBACD,yBAAyB,EAAE;wBACzB,WAAW,EACT,gFAAgF;wBAClF,IAAI,EAAE,SAAS;qBAChB;oBACD,6BAA6B,EAAE;wBAC7B,WAAW,EACT,6EAA6E;wBAC/E,IAAI,EAAE,SAAS;qBAChB;oBACD,yCAAyC,EAAE;wBACzC,WAAW,EACT,6EAA6E;wBAC/E,IAAI,EAAE,SAAS;qBAChB;oBACD,mCAAmC,EAAE;wBACnC,WAAW,EACT,sEAAsE;wBACxE,IAAI,EAAE,SAAS;qBAChB;oBACD,YAAY,EAAE;wBACZ,WAAW,EACT,gGAAgG;wBAClG,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;yBACf;wBACD,IAAI,EAAE,OAAO;qBACd;oBACD,UAAU,EAAE;wBACV,WAAW,EACT,qEAAqE;wBACvE,IAAI,EAAE,SAAS;qBAChB;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;KACF;IACD,cAAc,EAAE;QACd;YACE,gBAAgB,EAAE,KAAK;YACvB,6BAA6B,EAAE,IAAI;YACnC,yBAAyB,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;iBAC/B,CAAC,CACH,CAAC;YACJ,CAAC;YACD,eAAe,CAAC,IAAI;gBAClB,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/C,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
||||||
@@ -167,7 +167,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
function fix(accessibility, fixer) {
|
function fix(accessibility, fixer) {
|
||||||
if (node.decorators.length) {
|
if (node.decorators.length) {
|
||||||
const lastDecorator = node.decorators[node.decorators.length - 1];
|
const lastDecorator = node.decorators[node.decorators.length - 1];
|
||||||
const nextToken = context.sourceCode.getTokenAfter(lastDecorator);
|
const nextToken = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(lastDecorator), util_1.NullThrowsReasons.MissingToken('token', 'last decorator'));
|
||||||
return fixer.insertTextBefore(nextToken, `${accessibility} `);
|
return fixer.insertTextBefore(nextToken, `${accessibility} `);
|
||||||
}
|
}
|
||||||
return fixer.insertTextBefore(node, `${accessibility} `);
|
return fixer.insertTextBefore(node, `${accessibility} `);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -68,11 +68,21 @@ exports.default = (0, util_1.createRule)({
|
|||||||
create(context, [options]) {
|
create(context, [options]) {
|
||||||
// tracks all of the functions we've already checked
|
// tracks all of the functions we've already checked
|
||||||
const checkedFunctions = new Set();
|
const checkedFunctions = new Set();
|
||||||
// tracks functions that were found whilst traversing
|
const functionStack = [];
|
||||||
const foundFunctions = [];
|
const functionReturnsMap = new Map();
|
||||||
// all nodes visited, avoids infinite recursion for cyclic references
|
// all nodes visited, avoids infinite recursion for cyclic references
|
||||||
// (such as class member referring to itself)
|
// (such as class member referring to itself)
|
||||||
const alreadyVisited = new Set();
|
const alreadyVisited = new Set();
|
||||||
|
function getReturnsInFunction(node) {
|
||||||
|
return functionReturnsMap.get(node) ?? [];
|
||||||
|
}
|
||||||
|
function enterFunction(node) {
|
||||||
|
functionStack.push(node);
|
||||||
|
functionReturnsMap.set(node, []);
|
||||||
|
}
|
||||||
|
function exitFunction() {
|
||||||
|
functionStack.pop();
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
# How the rule works:
|
# How the rule works:
|
||||||
|
|
||||||
@@ -84,10 +94,10 @@ exports.default = (0, util_1.createRule)({
|
|||||||
any of them are part of a higher-order function
|
any of them are part of a higher-order function
|
||||||
*/
|
*/
|
||||||
return {
|
return {
|
||||||
ExportDefaultDeclaration(node) {
|
'ExportDefaultDeclaration:exit'(node) {
|
||||||
checkNode(node.declaration);
|
checkNode(node.declaration);
|
||||||
},
|
},
|
||||||
'ExportNamedDeclaration:not([source])'(node) {
|
'ExportNamedDeclaration:not([source]):exit'(node) {
|
||||||
if (node.declaration) {
|
if (node.declaration) {
|
||||||
checkNode(node.declaration);
|
checkNode(node.declaration);
|
||||||
}
|
}
|
||||||
@@ -97,19 +107,24 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
TSExportAssignment(node) {
|
'TSExportAssignment:exit'(node) {
|
||||||
checkNode(node.expression);
|
checkNode(node.expression);
|
||||||
},
|
},
|
||||||
'ArrowFunctionExpression, FunctionDeclaration, FunctionExpression'(node) {
|
'ArrowFunctionExpression, FunctionDeclaration, FunctionExpression': enterFunction,
|
||||||
foundFunctions.push(node);
|
'ArrowFunctionExpression:exit': exitFunction,
|
||||||
},
|
'FunctionDeclaration:exit': exitFunction,
|
||||||
|
'FunctionExpression:exit': exitFunction,
|
||||||
'Program:exit'() {
|
'Program:exit'() {
|
||||||
for (const func of foundFunctions) {
|
for (const [node, returns] of functionReturnsMap) {
|
||||||
if (isExportedHigherOrderFunction(func)) {
|
if (isExportedHigherOrderFunction({ node, returns })) {
|
||||||
checkNode(func);
|
checkNode(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ReturnStatement(node) {
|
||||||
|
const current = functionStack[functionStack.length - 1];
|
||||||
|
functionReturnsMap.get(current)?.push(node);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
function checkParameters(node) {
|
function checkParameters(node) {
|
||||||
function checkParameter(param) {
|
function checkParameter(param) {
|
||||||
@@ -206,7 +221,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function isExportedHigherOrderFunction(node) {
|
function isExportedHigherOrderFunction({ node, }) {
|
||||||
let current = node.parent;
|
let current = node.parent;
|
||||||
while (current) {
|
while (current) {
|
||||||
if (current.type === utils_1.AST_NODE_TYPES.ReturnStatement) {
|
if (current.type === utils_1.AST_NODE_TYPES.ReturnStatement) {
|
||||||
@@ -214,8 +229,11 @@ exports.default = (0, util_1.createRule)({
|
|||||||
current = current.parent.parent;
|
current = current.parent.parent;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!(0, util_1.isFunction)(current) ||
|
if (!(0, util_1.isFunction)(current)) {
|
||||||
!(0, explicitReturnTypeUtils_1.doesImmediatelyReturnFunctionExpression)(current)) {
|
return false;
|
||||||
|
}
|
||||||
|
const returns = getReturnsInFunction(current);
|
||||||
|
if (!(0, explicitReturnTypeUtils_1.doesImmediatelyReturnFunctionExpression)({ node: current, returns })) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (checkedFunctions.has(current)) {
|
if (checkedFunctions.has(current)) {
|
||||||
@@ -261,8 +279,10 @@ exports.default = (0, util_1.createRule)({
|
|||||||
alreadyVisited.add(node);
|
alreadyVisited.add(node);
|
||||||
switch (node.type) {
|
switch (node.type) {
|
||||||
case utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
|
case utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
|
||||||
case utils_1.AST_NODE_TYPES.FunctionExpression:
|
case utils_1.AST_NODE_TYPES.FunctionExpression: {
|
||||||
return checkFunctionExpression(node);
|
const returns = getReturnsInFunction(node);
|
||||||
|
return checkFunctionExpression({ node, returns });
|
||||||
|
}
|
||||||
case utils_1.AST_NODE_TYPES.ArrayExpression:
|
case utils_1.AST_NODE_TYPES.ArrayExpression:
|
||||||
for (const element of node.elements) {
|
for (const element of node.elements) {
|
||||||
checkNode(element);
|
checkNode(element);
|
||||||
@@ -280,8 +300,10 @@ exports.default = (0, util_1.createRule)({
|
|||||||
checkNode(element);
|
checkNode(element);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case utils_1.AST_NODE_TYPES.FunctionDeclaration:
|
case utils_1.AST_NODE_TYPES.FunctionDeclaration: {
|
||||||
return checkFunction(node);
|
const returns = getReturnsInFunction(node);
|
||||||
|
return checkFunction({ node, returns });
|
||||||
|
}
|
||||||
case utils_1.AST_NODE_TYPES.MethodDefinition:
|
case utils_1.AST_NODE_TYPES.MethodDefinition:
|
||||||
case utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition:
|
case utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition:
|
||||||
if (node.accessibility === 'private' ||
|
if (node.accessibility === 'private' ||
|
||||||
@@ -323,7 +345,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
checkParameters(node);
|
checkParameters(node);
|
||||||
}
|
}
|
||||||
function checkFunctionExpression(node) {
|
function checkFunctionExpression({ node, returns, }) {
|
||||||
if (checkedFunctions.has(node)) {
|
if (checkedFunctions.has(node)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -333,7 +355,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
(0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node)) {
|
(0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(0, explicitReturnTypeUtils_1.checkFunctionExpressionReturnType)(node, options, context.sourceCode, loc => {
|
(0, explicitReturnTypeUtils_1.checkFunctionExpressionReturnType)({ node, returns }, options, context.sourceCode, loc => {
|
||||||
context.report({
|
context.report({
|
||||||
node,
|
node,
|
||||||
loc,
|
loc,
|
||||||
@@ -342,7 +364,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
});
|
});
|
||||||
checkParameters(node);
|
checkParameters(node);
|
||||||
}
|
}
|
||||||
function checkFunction(node) {
|
function checkFunction({ node, returns, }) {
|
||||||
if (checkedFunctions.has(node)) {
|
if (checkedFunctions.has(node)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -350,7 +372,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
if (isAllowedName(node) || (0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node)) {
|
if (isAllowedName(node) || (0, explicitReturnTypeUtils_1.ancestorHasReturnType)(node)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(0, explicitReturnTypeUtils_1.checkFunctionReturnType)(node, options, context.sourceCode, loc => {
|
(0, explicitReturnTypeUtils_1.checkFunctionReturnType)({ node, returns }, options, context.sourceCode, loc => {
|
||||||
context.report({
|
context.report({
|
||||||
node,
|
node,
|
||||||
loc,
|
loc,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"func-call-spacing.js","sourceRoot":"","sources":["../../src/rules/func-call-spacing.ts"],"names":[],"mappings":";;AAEA,kCAMiB;AAajB,kBAAe,IAAA,iBAAU,EAAsB;IAC7C,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE;QACJ,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,CAAC,iCAAiC,CAAC;QAC/C,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE;YACJ,WAAW,EACT,gFAAgF;YAClF,eAAe,EAAE,IAAI;SACtB;QACD,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE;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E,YAAY;SAC5B,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
||||||
1
node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js
generated
vendored
1
node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js
generated
vendored
@@ -316,6 +316,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
TSMappedType(node) {
|
TSMappedType(node) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
const squareBracketStart = context.sourceCode.getTokenBefore(node.typeParameter);
|
const squareBracketStart = context.sourceCode.getTokenBefore(node.typeParameter);
|
||||||
// transform it to an ObjectExpression
|
// transform it to an ObjectExpression
|
||||||
return rules['ObjectExpression, ObjectPattern']({
|
return rules['ObjectExpression, ObjectPattern']({
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js.map
generated
vendored
File diff suppressed because one or more lines are too long
4
node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
generated
vendored
4
node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
generated
vendored
@@ -104,6 +104,7 @@ const no_useless_template_literals_1 = __importDefault(require("./no-useless-tem
|
|||||||
const no_var_requires_1 = __importDefault(require("./no-var-requires"));
|
const no_var_requires_1 = __importDefault(require("./no-var-requires"));
|
||||||
const non_nullable_type_assertion_style_1 = __importDefault(require("./non-nullable-type-assertion-style"));
|
const non_nullable_type_assertion_style_1 = __importDefault(require("./non-nullable-type-assertion-style"));
|
||||||
const object_curly_spacing_1 = __importDefault(require("./object-curly-spacing"));
|
const object_curly_spacing_1 = __importDefault(require("./object-curly-spacing"));
|
||||||
|
const only_throw_error_1 = __importDefault(require("./only-throw-error"));
|
||||||
const padding_line_between_statements_1 = __importDefault(require("./padding-line-between-statements"));
|
const padding_line_between_statements_1 = __importDefault(require("./padding-line-between-statements"));
|
||||||
const parameter_properties_1 = __importDefault(require("./parameter-properties"));
|
const parameter_properties_1 = __importDefault(require("./parameter-properties"));
|
||||||
const prefer_as_const_1 = __importDefault(require("./prefer-as-const"));
|
const prefer_as_const_1 = __importDefault(require("./prefer-as-const"));
|
||||||
@@ -144,6 +145,7 @@ const type_annotation_spacing_1 = __importDefault(require("./type-annotation-spa
|
|||||||
const typedef_1 = __importDefault(require("./typedef"));
|
const typedef_1 = __importDefault(require("./typedef"));
|
||||||
const unbound_method_1 = __importDefault(require("./unbound-method"));
|
const unbound_method_1 = __importDefault(require("./unbound-method"));
|
||||||
const unified_signatures_1 = __importDefault(require("./unified-signatures"));
|
const unified_signatures_1 = __importDefault(require("./unified-signatures"));
|
||||||
|
const use_unknown_in_catch_callback_variable_1 = __importDefault(require("./use-unknown-in-catch-callback-variable"));
|
||||||
exports.default = {
|
exports.default = {
|
||||||
'adjacent-overload-signatures': adjacent_overload_signatures_1.default,
|
'adjacent-overload-signatures': adjacent_overload_signatures_1.default,
|
||||||
'array-type': array_type_1.default,
|
'array-type': array_type_1.default,
|
||||||
@@ -246,6 +248,7 @@ exports.default = {
|
|||||||
'no-var-requires': no_var_requires_1.default,
|
'no-var-requires': no_var_requires_1.default,
|
||||||
'non-nullable-type-assertion-style': non_nullable_type_assertion_style_1.default,
|
'non-nullable-type-assertion-style': non_nullable_type_assertion_style_1.default,
|
||||||
'object-curly-spacing': object_curly_spacing_1.default,
|
'object-curly-spacing': object_curly_spacing_1.default,
|
||||||
|
'only-throw-error': only_throw_error_1.default,
|
||||||
'padding-line-between-statements': padding_line_between_statements_1.default,
|
'padding-line-between-statements': padding_line_between_statements_1.default,
|
||||||
'parameter-properties': parameter_properties_1.default,
|
'parameter-properties': parameter_properties_1.default,
|
||||||
'prefer-as-const': prefer_as_const_1.default,
|
'prefer-as-const': prefer_as_const_1.default,
|
||||||
@@ -286,5 +289,6 @@ exports.default = {
|
|||||||
typedef: typedef_1.default,
|
typedef: typedef_1.default,
|
||||||
'unbound-method': unbound_method_1.default,
|
'unbound-method': unbound_method_1.default,
|
||||||
'unified-signatures': unified_signatures_1.default,
|
'unified-signatures': unified_signatures_1.default,
|
||||||
|
'use-unknown-in-catch-callback-variable': use_unknown_in_catch_callback_variable_1.default,
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.js.map
|
||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"keyword-spacing.js","sourceRoot":"","sources":["../../src/rules/keyword-spacing.ts"],"names":[],"mappings":";;AACA,oDAA2E;AAO3E,kCAA+E;AAC/E,iEAA8D;AAE9D,MAAM,QAAQ,GAAG,IAAA,qCAAiB,EAAC,iBAAiB,CAAC,CAAC;AAKtD,mEAAmE;AACnE,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;IACpD,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;AACzB,MAAM,MAAM,GAAG,IAAA,gBAAS;AACtB,yHAAyH;AACzH,UAAU,EACV;IACE,UAAU,EAAE;QACV,SAAS,EAAE;YACT,UAAU,EAAE;gBACV,+GAA+G;gBAC/G,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,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E,IAAI,KAAK,sBAAc,CAAC,sBAAsB,EAClE,CAAC;oBACD,OAAO;gBACT,CAAC;gBACD,MAAM,8BAA8B,GAClC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAChD,IACE,CAAC,kBAAkB,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI;oBAC5C,8BAA8B,KAAK,CAAC,EACpC,CAAC;oBACD,OAAO,CAAC,MAAM,CAAC;wBACb,GAAG,EAAE,SAAS,CAAC,GAAG;wBAClB,SAAS,EAAE,eAAe;wBAC1B,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;wBACvB,GAAG,CAAC,KAAK;4BACP,OAAO,KAAK,CAAC,eAAe,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;wBAC/C,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;gBACD,IACE,CAAC,kBAAkB,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK;oBAC7C,8BAA8B,GAAG,CAAC,EAClC,CAAC;oBACD,OAAO,CAAC,MAAM,CAAC;wBACb,GAAG,EAAE,SAAS,CAAC,GAAG;wBAClB,SAAS,EAAE,iBAAiB;wBAC5B,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;wBACvB,GAAG,CAAC,KAAK;4BACP,OAAO,KAAK,CAAC,WAAW,CAAC;gCACvB,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;gCAClB,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,8BAA8B;6BACpD,CAAC,CAAC;wBACL,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js.map
generated
vendored
File diff suppressed because one or more lines are too long
70
node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js
generated
vendored
70
node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js
generated
vendored
@@ -340,6 +340,7 @@ function getRankOrder(memberGroups, orderConfig) {
|
|||||||
let rank = -1;
|
let rank = -1;
|
||||||
const stack = memberGroups.slice(); // Get a copy of the member groups
|
const stack = memberGroups.slice(); // Get a copy of the member groups
|
||||||
while (stack.length > 0 && rank === -1) {
|
while (stack.length > 0 && rank === -1) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
const memberGroup = stack.shift();
|
const memberGroup = stack.shift();
|
||||||
rank = orderConfig.findIndex(memberType => Array.isArray(memberType)
|
rank = orderConfig.findIndex(memberType => Array.isArray(memberType)
|
||||||
? memberType.includes(memberGroup)
|
? memberType.includes(memberGroup)
|
||||||
@@ -422,6 +423,53 @@ function getRank(node, orderConfig, supportsModifiers) {
|
|||||||
// ...then get the rank order for those member groups based on the node
|
// ...then get the rank order for those member groups based on the node
|
||||||
return getRankOrder(memberGroups, orderConfig);
|
return getRankOrder(memberGroups, orderConfig);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Groups members into arrays of consecutive members with the same rank.
|
||||||
|
* If, for example, the memberSet parameter looks like the following...
|
||||||
|
* @example
|
||||||
|
* ```
|
||||||
|
* interface Foo {
|
||||||
|
* [a: string]: number;
|
||||||
|
*
|
||||||
|
* a: x;
|
||||||
|
* B: x;
|
||||||
|
* c: x;
|
||||||
|
*
|
||||||
|
* c(): void;
|
||||||
|
* B(): void;
|
||||||
|
* a(): void;
|
||||||
|
*
|
||||||
|
* (): Baz;
|
||||||
|
*
|
||||||
|
* new (): Bar;
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
* ...the resulting array will look like: [[a, B, c], [c, B, a]].
|
||||||
|
* @param memberSet The members to be grouped.
|
||||||
|
* @param memberType The configured order of member types.
|
||||||
|
* @param supportsModifiers It'll get passed to getRank().
|
||||||
|
* @returns The array of groups of members.
|
||||||
|
*/
|
||||||
|
function groupMembersByType(members, memberTypes, supportsModifiers) {
|
||||||
|
const groupedMembers = [];
|
||||||
|
const memberRanks = members.map(member => getRank(member, memberTypes, supportsModifiers));
|
||||||
|
let previousRank = undefined;
|
||||||
|
members.forEach((member, index) => {
|
||||||
|
if (index === members.length - 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const rankOfCurrentMember = memberRanks[index];
|
||||||
|
const rankOfNextMember = memberRanks[index + 1];
|
||||||
|
if (rankOfCurrentMember === previousRank) {
|
||||||
|
groupedMembers.at(-1)?.push(member);
|
||||||
|
}
|
||||||
|
else if (rankOfCurrentMember === rankOfNextMember) {
|
||||||
|
groupedMembers.push([member]);
|
||||||
|
previousRank = rankOfCurrentMember;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return groupedMembers;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Gets the lowest possible rank(s) higher than target.
|
* Gets the lowest possible rank(s) higher than target.
|
||||||
* e.g. given the following order:
|
* e.g. given the following order:
|
||||||
@@ -438,7 +486,7 @@ function getRank(node, orderConfig, supportsModifiers) {
|
|||||||
* public-instance-method.
|
* public-instance-method.
|
||||||
* If a lowest possible rank is a member group, a comma separated list of ranks is returned.
|
* If a lowest possible rank is a member group, a comma separated list of ranks is returned.
|
||||||
* @param ranks the existing ranks in the object.
|
* @param ranks the existing ranks in the object.
|
||||||
* @param target the target rank.
|
* @param target the minimum target rank to filter on.
|
||||||
* @param order the current order to be validated.
|
* @param order the current order to be validated.
|
||||||
* @returns the name(s) of the lowest possible rank without dashes (-).
|
* @returns the name(s) of the lowest possible rank without dashes (-).
|
||||||
*/
|
*/
|
||||||
@@ -685,6 +733,18 @@ exports.default = (0, util_1.createRule)({
|
|||||||
let order;
|
let order;
|
||||||
let memberTypes;
|
let memberTypes;
|
||||||
let optionalityOrder;
|
let optionalityOrder;
|
||||||
|
/**
|
||||||
|
* It runs an alphabetic sort on the groups of the members of the class in the source code.
|
||||||
|
* @param memberSet The members in the class of the source code on which the grouping operation will be performed.
|
||||||
|
*/
|
||||||
|
const checkAlphaSortForAllMembers = (memberSet) => {
|
||||||
|
const hasAlphaSort = !!(order && order !== 'as-written');
|
||||||
|
if (hasAlphaSort && Array.isArray(memberTypes)) {
|
||||||
|
groupMembersByType(memberSet, memberTypes, supportsModifiers).forEach(members => {
|
||||||
|
checkAlphaSort(members, order);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
// returns true if everything is good and false if an error was reported
|
// returns true if everything is good and false if an error was reported
|
||||||
const checkOrder = (memberSet) => {
|
const checkOrder = (memberSet) => {
|
||||||
const hasAlphaSort = !!(order && order !== 'as-written');
|
const hasAlphaSort = !!(order && order !== 'as-written');
|
||||||
@@ -692,16 +752,17 @@ exports.default = (0, util_1.createRule)({
|
|||||||
if (Array.isArray(memberTypes)) {
|
if (Array.isArray(memberTypes)) {
|
||||||
const grouped = checkGroupSort(memberSet, memberTypes, supportsModifiers);
|
const grouped = checkGroupSort(memberSet, memberTypes, supportsModifiers);
|
||||||
if (grouped == null) {
|
if (grouped == null) {
|
||||||
|
checkAlphaSortForAllMembers(members);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (hasAlphaSort) {
|
if (hasAlphaSort) {
|
||||||
return !grouped.some(groupMember => !checkAlphaSort(groupMember, order));
|
grouped.map(groupMember => checkAlphaSort(groupMember, order));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (hasAlphaSort) {
|
else if (hasAlphaSort) {
|
||||||
return checkAlphaSort(memberSet, order);
|
return checkAlphaSort(memberSet, order);
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
};
|
};
|
||||||
if (Array.isArray(orderConfig)) {
|
if (Array.isArray(orderConfig)) {
|
||||||
memberTypes = orderConfig;
|
memberTypes = orderConfig;
|
||||||
@@ -727,6 +788,8 @@ exports.default = (0, util_1.createRule)({
|
|||||||
checkOrder(members);
|
checkOrder(members);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// https://github.com/typescript-eslint/typescript-eslint/issues/5439
|
||||||
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||||
return {
|
return {
|
||||||
ClassDeclaration(node) {
|
ClassDeclaration(node) {
|
||||||
validateMembersOrder(node.body.body, options.classes ?? options.default, true);
|
validateMembersOrder(node.body.body, options.classes ?? options.default, true);
|
||||||
@@ -741,6 +804,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
validateMembersOrder(node.members, options.typeLiterals ?? options.default, false);
|
validateMembersOrder(node.members, options.typeLiterals ?? options.default, false);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
/* eslint-enable @typescript-eslint/no-non-null-assertion */
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
//# sourceMappingURL=member-ordering.js.map
|
//# sourceMappingURL=member-ordering.js.map
|
||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map
generated
vendored
File diff suppressed because one or more lines are too long
22
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js
generated
vendored
22
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js
generated
vendored
@@ -110,8 +110,8 @@ exports.default = (0, util_1.createRule)({
|
|||||||
const arrowBodyText = context.sourceCode.getText(arrowBody);
|
const arrowBodyText = context.sourceCode.getText(arrowBody);
|
||||||
const newArrowBodyText = `{ ${arrowBodyText}; }`;
|
const newArrowBodyText = `{ ${arrowBodyText}; }`;
|
||||||
if ((0, util_1.isParenthesized)(arrowBody, context.sourceCode)) {
|
if ((0, util_1.isParenthesized)(arrowBody, context.sourceCode)) {
|
||||||
const bodyOpeningParen = context.sourceCode.getTokenBefore(arrowBody, util_1.isOpeningParenToken);
|
const bodyOpeningParen = (0, util_1.nullThrows)(context.sourceCode.getTokenBefore(arrowBody, util_1.isOpeningParenToken), util_1.NullThrowsReasons.MissingToken('opening parenthesis', 'arrow body'));
|
||||||
const bodyClosingParen = context.sourceCode.getTokenAfter(arrowBody, util_1.isClosingParenToken);
|
const bodyClosingParen = (0, util_1.nullThrows)(context.sourceCode.getTokenAfter(arrowBody, util_1.isClosingParenToken), util_1.NullThrowsReasons.MissingToken('closing parenthesis', 'arrow body'));
|
||||||
return fixer.replaceTextRange([bodyOpeningParen.range[0], bodyClosingParen.range[1]], newArrowBodyText);
|
return fixer.replaceTextRange([bodyOpeningParen.range[0], bodyClosingParen.range[1]], newArrowBodyText);
|
||||||
}
|
}
|
||||||
return fixer.replaceText(arrowBody, newArrowBodyText);
|
return fixer.replaceText(arrowBody, newArrowBodyText);
|
||||||
@@ -128,24 +128,23 @@ exports.default = (0, util_1.createRule)({
|
|||||||
fix: wrapVoidFix,
|
fix: wrapVoidFix,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const returnStmt = invalidAncestor;
|
if (isFinalReturn(invalidAncestor)) {
|
||||||
if (isFinalReturn(returnStmt)) {
|
|
||||||
// remove the `return` keyword
|
// remove the `return` keyword
|
||||||
return context.report({
|
return context.report({
|
||||||
node,
|
node,
|
||||||
messageId: 'invalidVoidExprReturnLast',
|
messageId: 'invalidVoidExprReturnLast',
|
||||||
fix(fixer) {
|
fix(fixer) {
|
||||||
if (!canFix(returnStmt)) {
|
if (!canFix(invalidAncestor)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const returnValue = returnStmt.argument;
|
const returnValue = invalidAncestor.argument;
|
||||||
const returnValueText = context.sourceCode.getText(returnValue);
|
const returnValueText = context.sourceCode.getText(returnValue);
|
||||||
let newReturnStmtText = `${returnValueText};`;
|
let newReturnStmtText = `${returnValueText};`;
|
||||||
if (isPreventingASI(returnValue)) {
|
if (isPreventingASI(returnValue)) {
|
||||||
// put a semicolon at the beginning of the line
|
// put a semicolon at the beginning of the line
|
||||||
newReturnStmtText = `;${newReturnStmtText}`;
|
newReturnStmtText = `;${newReturnStmtText}`;
|
||||||
}
|
}
|
||||||
return fixer.replaceText(returnStmt, newReturnStmtText);
|
return fixer.replaceText(invalidAncestor, newReturnStmtText);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -154,19 +153,19 @@ exports.default = (0, util_1.createRule)({
|
|||||||
node,
|
node,
|
||||||
messageId: 'invalidVoidExprReturn',
|
messageId: 'invalidVoidExprReturn',
|
||||||
fix(fixer) {
|
fix(fixer) {
|
||||||
const returnValue = returnStmt.argument;
|
const returnValue = invalidAncestor.argument;
|
||||||
const returnValueText = context.sourceCode.getText(returnValue);
|
const returnValueText = context.sourceCode.getText(returnValue);
|
||||||
let newReturnStmtText = `${returnValueText}; return;`;
|
let newReturnStmtText = `${returnValueText}; return;`;
|
||||||
if (isPreventingASI(returnValue)) {
|
if (isPreventingASI(returnValue)) {
|
||||||
// put a semicolon at the beginning of the line
|
// put a semicolon at the beginning of the line
|
||||||
newReturnStmtText = `;${newReturnStmtText}`;
|
newReturnStmtText = `;${newReturnStmtText}`;
|
||||||
}
|
}
|
||||||
if (returnStmt.parent.type !== utils_1.AST_NODE_TYPES.BlockStatement) {
|
if (invalidAncestor.parent.type !== utils_1.AST_NODE_TYPES.BlockStatement) {
|
||||||
// e.g. `if (cond) return console.error();`
|
// e.g. `if (cond) return console.error();`
|
||||||
// add braces if not inside a block
|
// add braces if not inside a block
|
||||||
newReturnStmtText = `{ ${newReturnStmtText} }`;
|
newReturnStmtText = `{ ${newReturnStmtText} }`;
|
||||||
}
|
}
|
||||||
return fixer.replaceText(returnStmt, newReturnStmtText);
|
return fixer.replaceText(invalidAncestor, newReturnStmtText);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -239,7 +238,8 @@ exports.default = (0, util_1.createRule)({
|
|||||||
// e.g. `console?.log('foo')`
|
// e.g. `console?.log('foo')`
|
||||||
return findInvalidAncestor(parent);
|
return findInvalidAncestor(parent);
|
||||||
}
|
}
|
||||||
// any other parent is invalid
|
// Any other parent is invalid.
|
||||||
|
// We can assume a return statement will have an argument.
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
/** Checks whether the return statement is the last statement in a function body. */
|
/** Checks whether the return statement is the last statement in a function body. */
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
4
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js
generated
vendored
4
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js
generated
vendored
@@ -68,8 +68,8 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
function getTokenRange(property) {
|
function getTokenRange(property) {
|
||||||
return [
|
return [
|
||||||
context.sourceCode.getTokenBefore(property).range[0],
|
(0, util_1.nullThrows)(context.sourceCode.getTokenBefore(property), util_1.NullThrowsReasons.MissingToken('token before', 'property')).range[0],
|
||||||
context.sourceCode.getTokenAfter(property).range[1],
|
(0, util_1.nullThrows)(context.sourceCode.getTokenAfter(property), util_1.NullThrowsReasons.MissingToken('token after', 'property')).range[1],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"no-dynamic-delete.js","sourceRoot":"","sources":["../../src/rules/no-dynamic-delete.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAC1D,sDAAwC;AAExC,kCAAqC;AAErC,kBAAe,IAAA,iBAAU,EAAC;IACxB,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EACT,kEAAkE;YACpE,WAAW,EAAE,QAAQ;SACtB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR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C,QAAQ,CAAC,EAC1C,wBAAiB,CAAC,YAAY,CAAC,aAAa,EAAE,UAAU,CAAC,CAC1D,CAAC,KAAK,CAAC,CAAC,CAAC;aACX,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,0BAA0B,CACjC,IAAyB;IAEzB,IAAI,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe,EAAE,CAAC;QACjD,OAAO,0BAA0B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,wBAAwB,CAAC,QAA6B;IAC7D,IAAI,QAAQ,CAAC,IAAI,KAAK,sBAAc,CAAC,OAAO,EAAE,CAAC;QAC7C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ;QAClC,CAAC,OAAO,CAAC,qBAAqB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC/C,CAAC;AACJ,CAAC"}
|
||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js
generated
vendored
@@ -139,7 +139,7 @@ exports.default = (0, util_1.createRule)({
|
|||||||
if ((node.type === utils_1.AST_NODE_TYPES.AssignmentPattern &&
|
if ((node.type === utils_1.AST_NODE_TYPES.AssignmentPattern &&
|
||||||
node.left.optional) ||
|
node.left.optional) ||
|
||||||
(node.type === utils_1.AST_NODE_TYPES.PropertyDefinition && node.definite)) {
|
(node.type === utils_1.AST_NODE_TYPES.PropertyDefinition && node.definite)) {
|
||||||
yield fixer.remove(context.sourceCode.getTokenBefore(typeNode));
|
yield fixer.remove((0, util_1.nullThrows)(context.sourceCode.getTokenBefore(typeNode), util_1.NullThrowsReasons.MissingToken('token before', 'type node')));
|
||||||
}
|
}
|
||||||
yield fixer.remove(typeNode);
|
yield fixer.remove(typeNode);
|
||||||
},
|
},
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js
generated
vendored
@@ -155,6 +155,8 @@ exports.default = (0, util_1.createRule)({
|
|||||||
}
|
}
|
||||||
// default cases
|
// default cases
|
||||||
if (validParents.includes(node.parent.type) &&
|
if (validParents.includes(node.parent.type) &&
|
||||||
|
// https://github.com/typescript-eslint/typescript-eslint/issues/6225
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
!invalidGrandParents.includes(node.parent.parent.type)) {
|
!invalidGrandParents.includes(node.parent.parent.type)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"no-invalid-void-type.js","sourceRoot":"","sources":["../../src/rules/no-invalid-void-type.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAE1D,kCAAqC;AAerC,kBAAe,IAAA,iBAAU,EAAwB;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,yDAAyD;YACtE,WAAW,EAAE,QAAQ;SACtB;QACD,QAAQ,EAAE;YACR,qBAAqB,EACnB,qDAAqD;YACvD,6BAA6B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AC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;oBACpD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU;oBACrD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,EAClC,CAAC;oBACD,OAAO;gBACT,CAAC;gBAED,gBAAgB;gBAChB,IACE,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;oBACvC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAO,CAAC,IAAI,CAAC,EACvD,CAAC;oBACD,OAAO;gBACT,CAAC;gBAED,OAAO,CAAC,MAAM,CAAC;oBACb,SAAS,EACP,2BAA2B,IAAI,oBAAoB;wBACjD,CAAC,CAAC,0CAA0C;wBAC5C,CAAC,CAAC,2BAA2B;4BAC3B,CAAC,CAAC,8BAA8B,CAAC,IAAI,CAAC;4BACtC,CAAC,CAAC,oBAAoB;gCACpB,CAAC,CAAC,iCAAiC;gCACnC,CAAC,CAAC,sBAAsB;oBAChC,IAAI;iBACL,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,8BAA8B,CACrC,IAA4B;IAE5B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,WAAW;QACpD,CAAC,CAAC,6BAA6B;QAC/B,CAAC,CAAC,+BAA+B,CAAC;AACtC,CAAC"}
|
{"version":3,"file":"no-invalid-void-type.js","sourceRoot":"","sources":["../../src/rules/no-invalid-void-type.ts"],"names":[],"mappings":";;AACA,oDAA0D;AAE1D,kCAAqC;AAerC,kBAAe,IAAA,iBAAU,EAAwB;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,yDAAyD;YACtE,WAAW,EAAE,QAAQ;SACtB;QAC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mCAAmC;gBACnC,IACE,oBAAoB;oBACpB,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;oBACpD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU;oBACrD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,EAClC,CAAC;oBACD,OAAO;gBACT,CAAC;gBAED,gBAAgB;gBAChB,IACE,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;oBACvC,qEAAqE;oBACrE,oEAAoE;oBACpE,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAO,CAAC,IAAI,CAAC,EACvD,CAAC;oBACD,OAAO;gBACT,CAAC;gBAED,OAAO,CAAC,MAAM,CAAC;oBACb,SAAS,EACP,2BAA2B,IAAI,oBAAoB;wBACjD,CAAC,CAAC,0CAA0C;wBAC5C,CAAC,CAAC,2BAA2B;4BAC3B,CAAC,CAAC,8BAA8B,CAAC,IAAI,CAAC;4BACtC,CAAC,CAAC,oBAAoB;gCACpB,CAAC,CAAC,iCAAiC;gCACnC,CAAC,CAAC,sBAAsB;oBAChC,IAAI;iBACL,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,8BAA8B,CACrC,IAA4B;IAE5B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,WAAW;QACpD,CAAC,CAAC,6BAA6B;QAC/B,CAAC,CAAC,+BAA+B,CAAC;AACtC,CAAC"}
|
||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js
generated
vendored
@@ -437,7 +437,7 @@ function voidFunctionArguments(checker, node) {
|
|||||||
let type = checker.getTypeOfSymbolAtLocation(parameter, node.expression);
|
let type = checker.getTypeOfSymbolAtLocation(parameter, node.expression);
|
||||||
// If this is a array 'rest' parameter, check all of the argument indices
|
// If this is a array 'rest' parameter, check all of the argument indices
|
||||||
// from the current argument to the end.
|
// from the current argument to the end.
|
||||||
if (decl && ts.isParameter(decl) && decl.dotDotDotToken) {
|
if (decl && (0, util_1.isRestParameterDeclaration)(decl)) {
|
||||||
if (checker.isArrayType(type)) {
|
if (checker.isArrayType(type)) {
|
||||||
// Unwrap 'Array<MaybeVoidFunction>' to 'MaybeVoidFunction',
|
// Unwrap 'Array<MaybeVoidFunction>' to 'MaybeVoidFunction',
|
||||||
// so that we'll handle it in the same way as a non-rest
|
// so that we'll handle it in the same way as a non-rest
|
||||||
|
|||||||
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js
generated
vendored
2
node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js
generated
vendored
@@ -140,10 +140,12 @@ exports.default = (0, util_1.createRule)({
|
|||||||
// }
|
// }
|
||||||
if (node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration &&
|
if (node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration &&
|
||||||
node.parent.parent.type === utils_1.AST_NODE_TYPES.TSModuleBlock) {
|
node.parent.parent.type === utils_1.AST_NODE_TYPES.TSModuleBlock) {
|
||||||
|
// https://github.com/typescript-eslint/typescript-eslint/issues/8352
|
||||||
// TODO: We don't need to dip into the TypeScript type checker here!
|
// TODO: We don't need to dip into the TypeScript type checker here!
|
||||||
// Merged namespaces must all exist in the same file.
|
// Merged namespaces must all exist in the same file.
|
||||||
// We could instead compare this file's nodes to find the merges.
|
// We could instead compare this file's nodes to find the merges.
|
||||||
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node.id);
|
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node.id);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
const declarations = typeChecker
|
const declarations = typeChecker
|
||||||
.getSymbolAtLocation(tsNode)
|
.getSymbolAtLocation(tsNode)
|
||||||
.getDeclarations();
|
.getDeclarations();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user