@stylistic/eslint-plugin-js
Advanced tools
Comparing version 2.2.2 to 2.3.0
@@ -24,2 +24,5 @@ 'use strict'; | ||
properties: { | ||
consistent: { | ||
type: "boolean" | ||
}, | ||
multiline: { | ||
@@ -82,2 +85,3 @@ type: "boolean" | ||
} else { | ||
consistent = Boolean(option.consistent); | ||
multiline = Boolean(option.multiline); | ||
@@ -84,0 +88,0 @@ minItems = option.minItems || Number.POSITIVE_INFINITY; |
@@ -61,7 +61,9 @@ 'use strict'; | ||
ImportDeclaration: normalizeOptionValue(options.ImportDeclaration), | ||
ExportNamedDeclaration: normalizeOptionValue(options.ExportDeclaration) | ||
ExportNamedDeclaration: normalizeOptionValue(options.ExportDeclaration), | ||
TSTypeLiteral: normalizeOptionValue(options.TSTypeLiteral), | ||
TSInterfaceBody: normalizeOptionValue(options.TSInterfaceBody) | ||
}; | ||
} | ||
const value = normalizeOptionValue(options); | ||
return { ObjectExpression: value, ObjectPattern: value, ImportDeclaration: value, ExportNamedDeclaration: value }; | ||
return { ObjectExpression: value, ObjectPattern: value, ImportDeclaration: value, ExportNamedDeclaration: value, TSTypeLiteral: value, TSInterfaceBody: value }; | ||
} | ||
@@ -72,2 +74,6 @@ function areLineBreaksRequired(node, options, first, last) { | ||
objectProperties = node.properties; | ||
} else if (node.type === "TSTypeLiteral") { | ||
objectProperties = node.members; | ||
} else if (node.type === "TSInterfaceBody") { | ||
objectProperties = node.body; | ||
} else { | ||
@@ -96,3 +102,5 @@ objectProperties = node.specifiers.filter((s) => s.type === "ImportSpecifier" || s.type === "ExportSpecifier"); | ||
ImportDeclaration: OPTION_VALUE, | ||
ExportDeclaration: OPTION_VALUE | ||
ExportDeclaration: OPTION_VALUE, | ||
TSTypeLiteral: OPTION_VALUE, | ||
TSInterfaceBody: OPTION_VALUE | ||
}, | ||
@@ -198,3 +206,5 @@ additionalProperties: false, | ||
ImportDeclaration: check, | ||
ExportNamedDeclaration: check | ||
ExportNamedDeclaration: check, | ||
TSTypeLiteral: check, | ||
TSInterfaceBody: check | ||
}; | ||
@@ -201,0 +211,0 @@ } |
{ | ||
"name": "@stylistic/eslint-plugin-js", | ||
"version": "2.2.2", | ||
"version": "2.3.0", | ||
"author": "Anthony Fu <anthonyfu117@hotmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -15,2 +15,3 @@ /* GENERATED, DO NOT EDIT DIRECTLY */ | ||
| { | ||
consistent?: boolean | ||
multiline?: boolean | ||
@@ -17,0 +18,0 @@ minItems?: number | null |
@@ -41,2 +41,16 @@ /* GENERATED, DO NOT EDIT DIRECTLY */ | ||
} | ||
TSTypeLiteral?: | ||
| ('always' | 'never') | ||
| { | ||
multiline?: boolean | ||
minProperties?: number | ||
consistent?: boolean | ||
} | ||
TSInterfaceBody?: | ||
| ('always' | 'never') | ||
| { | ||
multiline?: boolean | ||
minProperties?: number | ||
consistent?: boolean | ||
} | ||
} | ||
@@ -43,0 +57,0 @@ |
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
528025
14413