Bump the npm group with 4 updates (#2015)
* Bump the npm group with 4 updates Bumps the npm group with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [eslint](https://github.com/eslint/eslint) and [nock](https://github.com/nock/nock). Updates `@typescript-eslint/eslint-plugin` from 6.13.0 to 6.13.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.2/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 6.13.0 to 6.13.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.2/packages/parser) Updates `eslint` from 8.54.0 to 8.55.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.54.0...v8.55.0) Updates `nock` from 13.3.8 to 13.4.0 - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v13.3.8...v13.4.0) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: nock dependency-type: direct:development update-type: version-update:semver-minor 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
a16ac98583
commit
bc50092bdb
168 changed files with 813 additions and 330 deletions
83
node_modules/eslint/lib/rules/no-restricted-imports.js
generated
vendored
83
node_modules/eslint/lib/rules/no-restricted-imports.js
generated
vendored
|
|
@ -74,6 +74,9 @@ const arrayOfStringsOrObjectPatterns = {
|
|||
minItems: 1,
|
||||
uniqueItems: true
|
||||
},
|
||||
importNamePattern: {
|
||||
type: "string"
|
||||
},
|
||||
message: {
|
||||
type: "string",
|
||||
minLength: 1
|
||||
|
|
@ -115,8 +118,12 @@ module.exports = {
|
|||
patternAndImportNameWithCustomMessage: "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",
|
||||
|
||||
patternAndEverything: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.",
|
||||
|
||||
patternAndEverythingWithRegexImportName: "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.",
|
||||
// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
|
||||
patternAndEverythingWithCustomMessage: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}",
|
||||
// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
|
||||
patternAndEverythingWithRegexImportNameAndCustomMessage: "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}",
|
||||
|
||||
everything: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.",
|
||||
// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
|
||||
|
|
@ -175,10 +182,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
// relative paths are supported for this rule
|
||||
const restrictedPatternGroups = restrictedPatterns.map(({ group, message, caseSensitive, importNames }) => ({
|
||||
const restrictedPatternGroups = restrictedPatterns.map(({ group, message, caseSensitive, importNames, importNamePattern }) => ({
|
||||
matcher: ignore({ allowRelativePaths: true, ignorecase: !caseSensitive }).add(group),
|
||||
customMessage: message,
|
||||
importNames
|
||||
importNames,
|
||||
importNamePattern
|
||||
}));
|
||||
|
||||
// if no imports are restricted we don't need to check
|
||||
|
|
@ -262,12 +270,13 @@ module.exports = {
|
|||
|
||||
const customMessage = group.customMessage;
|
||||
const restrictedImportNames = group.importNames;
|
||||
const restrictedImportNamePattern = group.importNamePattern ? new RegExp(group.importNamePattern, "u") : null;
|
||||
|
||||
/*
|
||||
* If we are not restricting to any specific import names and just the pattern itself,
|
||||
* report the error and move on
|
||||
*/
|
||||
if (!restrictedImportNames) {
|
||||
if (!restrictedImportNames && !restrictedImportNamePattern) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: customMessage ? "patternWithCustomMessage" : "patterns",
|
||||
|
|
@ -279,40 +288,54 @@ module.exports = {
|
|||
return;
|
||||
}
|
||||
|
||||
if (importNames.has("*")) {
|
||||
const specifierData = importNames.get("*")[0];
|
||||
importNames.forEach((specifiers, importName) => {
|
||||
if (importName === "*") {
|
||||
const [specifier] = specifiers;
|
||||
|
||||
context.report({
|
||||
node,
|
||||
messageId: customMessage ? "patternAndEverythingWithCustomMessage" : "patternAndEverything",
|
||||
loc: specifierData.loc,
|
||||
data: {
|
||||
importSource,
|
||||
importNames: restrictedImportNames,
|
||||
customMessage
|
||||
if (restrictedImportNames) {
|
||||
context.report({
|
||||
node,
|
||||
messageId: customMessage ? "patternAndEverythingWithCustomMessage" : "patternAndEverything",
|
||||
loc: specifier.loc,
|
||||
data: {
|
||||
importSource,
|
||||
importNames: restrictedImportNames,
|
||||
customMessage
|
||||
}
|
||||
});
|
||||
} else {
|
||||
context.report({
|
||||
node,
|
||||
messageId: customMessage ? "patternAndEverythingWithRegexImportNameAndCustomMessage" : "patternAndEverythingWithRegexImportName",
|
||||
loc: specifier.loc,
|
||||
data: {
|
||||
importSource,
|
||||
importNames: restrictedImportNamePattern,
|
||||
customMessage
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
restrictedImportNames.forEach(importName => {
|
||||
if (!importNames.has(importName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const specifiers = importNames.get(importName);
|
||||
|
||||
specifiers.forEach(specifier => {
|
||||
context.report({
|
||||
node,
|
||||
messageId: customMessage ? "patternAndImportNameWithCustomMessage" : "patternAndImportName",
|
||||
loc: specifier.loc,
|
||||
data: {
|
||||
importSource,
|
||||
customMessage,
|
||||
importName
|
||||
}
|
||||
if (
|
||||
(restrictedImportNames && restrictedImportNames.includes(importName)) ||
|
||||
(restrictedImportNamePattern && restrictedImportNamePattern.test(importName))
|
||||
) {
|
||||
specifiers.forEach(specifier => {
|
||||
context.report({
|
||||
node,
|
||||
messageId: customMessage ? "patternAndImportNameWithCustomMessage" : "patternAndImportName",
|
||||
loc: specifier.loc,
|
||||
data: {
|
||||
importSource,
|
||||
customMessage,
|
||||
importName
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
10
node_modules/eslint/package.json
generated
vendored
10
node_modules/eslint/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "eslint",
|
||||
"version": "8.54.0",
|
||||
"version": "8.55.0",
|
||||
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
|
||||
"description": "An AST-based pattern checker for JavaScript.",
|
||||
"bin": {
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
"build:readme": "node tools/update-readme.js",
|
||||
"lint": "node Makefile.js lint",
|
||||
"lint:docs:js": "node Makefile.js lintDocsJS",
|
||||
"lint:docs:rule-examples": "node Makefile.js checkRuleExamples",
|
||||
"lint:fix": "node Makefile.js lint -- fix",
|
||||
"lint:fix:docs:js": "node Makefile.js lintDocsJS -- fix",
|
||||
"release:generate:alpha": "node Makefile.js generatePrerelease -- alpha",
|
||||
|
|
@ -42,6 +43,7 @@
|
|||
"git add packages/js/src/configs/eslint-all.js"
|
||||
],
|
||||
"docs/src/rules/*.md": [
|
||||
"node tools/check-rule-examples.js",
|
||||
"node tools/fetch-docs-links.js",
|
||||
"git add docs/src/_data/further_reading_links.json"
|
||||
],
|
||||
|
|
@ -62,8 +64,8 @@
|
|||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.6.1",
|
||||
"@eslint/eslintrc": "^2.1.3",
|
||||
"@eslint/js": "8.54.0",
|
||||
"@eslint/eslintrc": "^2.1.4",
|
||||
"@eslint/js": "8.55.0",
|
||||
"@humanwhocodes/config-array": "^0.11.13",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@nodelib/fs.walk": "^1.2.8",
|
||||
|
|
@ -132,6 +134,8 @@
|
|||
"gray-matter": "^4.0.3",
|
||||
"lint-staged": "^11.0.0",
|
||||
"load-perf": "^0.2.0",
|
||||
"markdown-it": "^12.2.0",
|
||||
"markdown-it-container": "^3.0.0",
|
||||
"markdownlint": "^0.31.1",
|
||||
"markdownlint-cli": "^0.37.0",
|
||||
"marked": "^4.0.8",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue