Bump packages to fix linter

This commit is contained in:
Henry Mercer 2023-01-18 20:50:03 +00:00
parent ed9506bbaf
commit 0a11e3fdd9
6063 changed files with 378752 additions and 306784 deletions

View file

@ -15,13 +15,13 @@ const astUtils = require("./utils/ast-utils");
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "layout",
docs: {
description: "require or disallow padding within blocks",
category: "Stylistic Issues",
description: "Require or disallow padding within blocks",
recommended: false,
url: "https://eslint.org/docs/rules/padded-blocks"
},
@ -107,6 +107,12 @@ module.exports = {
if (node.type === "SwitchStatement") {
return sourceCode.getTokenBefore(node.cases[0]);
}
if (node.type === "StaticBlock") {
return sourceCode.getFirstToken(node, { skip: 1 }); // skip the `static` token
}
// `BlockStatement` or `ClassBody`
return sourceCode.getFirstToken(node);
}
@ -167,18 +173,20 @@ module.exports = {
/**
* Checks if a node should be padded, according to the rule config.
* @param {ASTNode} node The AST node to check.
* @throws {Error} (Unreachable)
* @returns {boolean} True if the node should be padded, false otherwise.
*/
function requirePaddingFor(node) {
switch (node.type) {
case "BlockStatement":
case "StaticBlock":
return options.blocks;
case "SwitchStatement":
return options.switches;
case "ClassBody":
return options.classes;
/* istanbul ignore next */
/* c8 ignore next */
default:
throw new Error("unreachable");
}
@ -282,6 +290,7 @@ module.exports = {
}
checkPadding(node);
};
rule.StaticBlock = rule.BlockStatement;
}
if (Object.prototype.hasOwnProperty.call(options, "classes")) {