Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2023-07-13 09:09:17 +00:00
parent 4fad06f438
commit 40a500c743
4168 changed files with 298222 additions and 374905 deletions

View file

@ -33,7 +33,7 @@ module.exports = {
docs: {
description: "Disallow irregular whitespace",
recommended: true,
url: "https://eslint.org/docs/rules/no-irregular-whitespace"
url: "https://eslint.org/docs/latest/rules/no-irregular-whitespace"
},
schema: [
@ -55,6 +55,10 @@ module.exports = {
skipRegExps: {
type: "boolean",
default: false
},
skipJSXText: {
type: "boolean",
default: false
}
},
additionalProperties: false
@ -77,8 +81,9 @@ module.exports = {
const skipStrings = options.skipStrings !== false;
const skipRegExps = !!options.skipRegExps;
const skipTemplates = !!options.skipTemplates;
const skipJSXText = !!options.skipJSXText;
const sourceCode = context.getSourceCode();
const sourceCode = context.sourceCode;
const commentNodes = sourceCode.getAllComments();
/**
@ -100,12 +105,12 @@ module.exports = {
}
/**
* Checks identifier or literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors
* Checks literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors
* @param {ASTNode} node to check for matching errors.
* @returns {void}
* @private
*/
function removeInvalidNodeErrorsInIdentifierOrLiteral(node) {
function removeInvalidNodeErrorsInLiteral(node) {
const shouldCheckStrings = skipStrings && (typeof node.value === "string");
const shouldCheckRegExps = skipRegExps && Boolean(node.regex);
@ -144,6 +149,18 @@ module.exports = {
}
}
/**
* Checks JSX nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors
* @param {ASTNode} node to check for matching errors.
* @returns {void}
* @private
*/
function removeInvalidNodeErrorsInJSXText(node) {
if (ALL_IRREGULARS.test(node.raw)) {
removeWhitespaceError(node);
}
}
/**
* Checks the program source for irregular whitespace
* @param {ASTNode} node The program node
@ -237,9 +254,9 @@ module.exports = {
checkForIrregularLineTerminators(node);
};
nodes.Identifier = removeInvalidNodeErrorsInIdentifierOrLiteral;
nodes.Literal = removeInvalidNodeErrorsInIdentifierOrLiteral;
nodes.Literal = removeInvalidNodeErrorsInLiteral;
nodes.TemplateElement = skipTemplates ? removeInvalidNodeErrorsInTemplateLiteral : noop;
nodes.JSXText = skipJSXText ? removeInvalidNodeErrorsInJSXText : noop;
nodes["Program:exit"] = function() {
if (skipComments) {