@stylistic/eslint-plugin
Advanced tools
Comparing version 2.10.0 to 2.10.1
@@ -80,5 +80,2 @@ 'use strict'; | ||
} | ||
function hasExclusivelyCloseBracketOfLine(line) { | ||
return !sourceCode.tokensAndComments.some((token) => token.loc.start.line === line && ![")", "}", "]"].includes(token.value)); | ||
} | ||
function handler(node, right) { | ||
@@ -103,3 +100,3 @@ if (node.loc.start.line === node.loc.end.line) | ||
const needAdditionIndent = firstTokenOfLineLeft?.type === "Keyword" && !["typeof", "instanceof", "this"].includes(firstTokenOfLineLeft.value) || firstTokenOfLineLeft?.type === "Identifier" && firstTokenOfLineLeft.value === "type" && node.parent?.type === "TSTypeAliasDeclaration" || [":", "[", "(", "<", "="].includes(lastTokenOfLineLeft?.value || "") || ["[", "(", "=>", ":"].includes(tokenBeforeAll?.value || "") && firstTokenOfLineLeft?.loc.start.line === tokenBeforeAll?.loc.start.line || ["||", "&&"].includes(lastTokenOfLineLeft?.value || "") && node.loc.start.line === tokenLeft.loc.start.line && node.loc.start.column !== getIndentOfLine(node.loc.start.line).length; | ||
const needSubtractionIndent = lastTokenOfLineLeft?.value === ")" && isGreaterThanCloseBracketOfLine(tokenLeft.loc.start.line) && !hasExclusivelyCloseBracketOfLine(tokenLeft.loc.start.line); | ||
const needSubtractionIndent = lastTokenOfLineLeft?.value === ")" && isGreaterThanCloseBracketOfLine(tokenLeft.loc.start.line) && !["]", ")", "}"].includes(firstTokenOfLineLeft?.value || ""); | ||
const indentLeft = getIndentOfLine(tokenLeft.loc.start.line); | ||
@@ -106,0 +103,0 @@ const indentRight = getIndentOfLine(tokenRight.loc.start.line); |
@@ -448,2 +448,4 @@ 'use strict'; | ||
return; | ||
if (!node.attributes.length) | ||
return; | ||
if (isSingleLineImportAttributes(node, sourceCode)) | ||
@@ -450,0 +452,0 @@ verifyListSpacing(node.attributes, singleLineOptions); |
{ | ||
"name": "@stylistic/eslint-plugin", | ||
"type": "commonjs", | ||
"version": "2.10.0", | ||
"version": "2.10.1", | ||
"author": "Anthony Fu <anthonyfu117@hotmail.com>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
801616
22704
1