Bump packages to fix linter
This commit is contained in:
parent
ed9506bbaf
commit
0a11e3fdd9
6063 changed files with 378752 additions and 306784 deletions
30
node_modules/eslint/lib/rules/space-infix-ops.js
generated
vendored
30
node_modules/eslint/lib/rules/space-infix-ops.js
generated
vendored
|
|
@ -4,17 +4,19 @@
|
|||
*/
|
||||
"use strict";
|
||||
|
||||
const { isEqToken } = require("./utils/ast-utils");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../shared/types').Rule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: "layout",
|
||||
|
||||
docs: {
|
||||
description: "require spacing around infix operators",
|
||||
category: "Stylistic Issues",
|
||||
description: "Require spacing around infix operators",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/rules/space-infix-ops"
|
||||
},
|
||||
|
|
@ -164,7 +166,29 @@ module.exports = {
|
|||
BinaryExpression: checkBinary,
|
||||
LogicalExpression: checkBinary,
|
||||
ConditionalExpression: checkConditional,
|
||||
VariableDeclarator: checkVar
|
||||
VariableDeclarator: checkVar,
|
||||
|
||||
PropertyDefinition(node) {
|
||||
if (!node.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Because of computed properties and type annotations, some
|
||||
* tokens may exist between `node.key` and `=`.
|
||||
* Therefore, find the `=` from the right.
|
||||
*/
|
||||
const operatorToken = sourceCode.getTokenBefore(node.value, isEqToken);
|
||||
const leftToken = sourceCode.getTokenBefore(operatorToken);
|
||||
const rightToken = sourceCode.getTokenAfter(operatorToken);
|
||||
|
||||
if (
|
||||
!sourceCode.isSpaceBetweenTokens(leftToken, operatorToken) ||
|
||||
!sourceCode.isSpaceBetweenTokens(operatorToken, rightToken)
|
||||
) {
|
||||
report(node, operatorToken);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue