Bump packages to fix linter
This commit is contained in:
parent
ed9506bbaf
commit
0a11e3fdd9
6063 changed files with 378752 additions and 306784 deletions
17
node_modules/eslint/lib/rules/block-spacing.js
generated
vendored
17
node_modules/eslint/lib/rules/block-spacing.js
generated
vendored
|
|
@ -11,13 +11,13 @@ const util = require("./utils/ast-utils");
|
|||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../shared/types').Rule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: "layout",
|
||||
|
||||
docs: {
|
||||
description: "disallow or enforce spaces inside of blocks after opening block and before closing block",
|
||||
category: "Stylistic Issues",
|
||||
description: "Disallow or enforce spaces inside of blocks after opening block and before closing block",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/rules/block-spacing"
|
||||
},
|
||||
|
|
@ -41,7 +41,7 @@ module.exports = {
|
|||
|
||||
/**
|
||||
* Gets the open brace token from a given node.
|
||||
* @param {ASTNode} node A BlockStatement/SwitchStatement node to get.
|
||||
* @param {ASTNode} node A BlockStatement/StaticBlock/SwitchStatement node to get.
|
||||
* @returns {Token} The token of the open brace.
|
||||
*/
|
||||
function getOpenBrace(node) {
|
||||
|
|
@ -51,6 +51,12 @@ module.exports = {
|
|||
}
|
||||
return sourceCode.getLastToken(node, 1);
|
||||
}
|
||||
|
||||
if (node.type === "StaticBlock") {
|
||||
return sourceCode.getFirstToken(node, { skip: 1 }); // skip the `static` token
|
||||
}
|
||||
|
||||
// "BlockStatement"
|
||||
return sourceCode.getFirstToken(node);
|
||||
}
|
||||
|
||||
|
|
@ -73,8 +79,8 @@ module.exports = {
|
|||
}
|
||||
|
||||
/**
|
||||
* Reports invalid spacing style inside braces.
|
||||
* @param {ASTNode} node A BlockStatement/SwitchStatement node to get.
|
||||
* Checks and reports invalid spacing style inside braces.
|
||||
* @param {ASTNode} node A BlockStatement/StaticBlock/SwitchStatement node to check.
|
||||
* @returns {void}
|
||||
*/
|
||||
function checkSpacingInsideBraces(node) {
|
||||
|
|
@ -158,6 +164,7 @@ module.exports = {
|
|||
|
||||
return {
|
||||
BlockStatement: checkSpacingInsideBraces,
|
||||
StaticBlock: checkSpacingInsideBraces,
|
||||
SwitchStatement: checkSpacingInsideBraces
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue