Bump the npm group with 2 updates (#2045)
* Bump the npm group with 2 updates Bumps the npm group with 2 updates: [eslint](https://github.com/eslint/eslint) and [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import). Updates `eslint` from 8.55.0 to 8.56.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.55.0...v8.56.0) Updates `eslint-plugin-import` from 2.29.0 to 2.29.1 - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.29.0...v2.29.1) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm ... Signed-off-by: dependabot[bot] <support@github.com> * Update checked-in dependencies --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
511f073971
commit
144b7d5b16
32 changed files with 618 additions and 251 deletions
25
node_modules/eslint/lib/cli.js
generated
vendored
25
node_modules/eslint/lib/cli.js
generated
vendored
|
|
@ -22,7 +22,8 @@ const fs = require("fs"),
|
|||
{ FlatESLint, shouldUseFlatConfig } = require("./eslint/flat-eslint"),
|
||||
createCLIOptions = require("./options"),
|
||||
log = require("./shared/logging"),
|
||||
RuntimeInfo = require("./shared/runtime-info");
|
||||
RuntimeInfo = require("./shared/runtime-info"),
|
||||
{ normalizeSeverityToString } = require("./shared/severity");
|
||||
const { Legacy: { naming } } = require("@eslint/eslintrc");
|
||||
const { ModuleImporter } = require("@humanwhocodes/module-importer");
|
||||
|
||||
|
|
@ -89,6 +90,7 @@ async function translateOptions({
|
|||
plugin,
|
||||
quiet,
|
||||
reportUnusedDisableDirectives,
|
||||
reportUnusedDisableDirectivesSeverity,
|
||||
resolvePluginsRelativeTo,
|
||||
rule,
|
||||
rulesdir,
|
||||
|
|
@ -125,6 +127,14 @@ async function translateOptions({
|
|||
rules: rule ? rule : {}
|
||||
}];
|
||||
|
||||
if (reportUnusedDisableDirectives || reportUnusedDisableDirectivesSeverity !== void 0) {
|
||||
overrideConfig[0].linterOptions = {
|
||||
reportUnusedDisableDirectives: reportUnusedDisableDirectives
|
||||
? "error"
|
||||
: normalizeSeverityToString(reportUnusedDisableDirectivesSeverity)
|
||||
};
|
||||
}
|
||||
|
||||
if (parser) {
|
||||
overrideConfig[0].languageOptions.parser = await importer.import(parser);
|
||||
}
|
||||
|
|
@ -177,8 +187,7 @@ async function translateOptions({
|
|||
fixTypes: fixType,
|
||||
ignore,
|
||||
overrideConfig,
|
||||
overrideConfigFile,
|
||||
reportUnusedDisableDirectives: reportUnusedDisableDirectives ? "error" : void 0
|
||||
overrideConfigFile
|
||||
};
|
||||
|
||||
if (configType === "flat") {
|
||||
|
|
@ -190,6 +199,11 @@ async function translateOptions({
|
|||
options.useEslintrc = eslintrc;
|
||||
options.extensions = ext;
|
||||
options.ignorePath = ignorePath;
|
||||
if (reportUnusedDisableDirectives || reportUnusedDisableDirectivesSeverity !== void 0) {
|
||||
options.reportUnusedDisableDirectives = reportUnusedDisableDirectives
|
||||
? "error"
|
||||
: normalizeSeverityToString(reportUnusedDisableDirectivesSeverity);
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
|
|
@ -386,6 +400,11 @@ const cli = {
|
|||
return 2;
|
||||
}
|
||||
|
||||
if (options.reportUnusedDisableDirectives && options.reportUnusedDisableDirectivesSeverity !== void 0) {
|
||||
log.error("The --report-unused-disable-directives option and the --report-unused-disable-directives-severity option cannot be used together.");
|
||||
return 2;
|
||||
}
|
||||
|
||||
const ActiveESLint = usingFlatConfig ? FlatESLint : ESLint;
|
||||
|
||||
const engine = new ActiveESLint(await translateOptions(options, usingFlatConfig ? "flat" : "eslintrc"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue