@stylistic/eslint-plugin-js
Advanced tools
Comparing version 1.4.1 to 1.5.0-beta.0
@@ -71,5 +71,10 @@ 'use strict'; | ||
function createAllConfigs(plugin, name, flat) { | ||
function createAllConfigs(plugin, name, flat, filter) { | ||
const rules = Object.fromEntries( | ||
Object.keys(plugin.rules).map((key) => [`${name}/${key}`, 2]) | ||
Object.entries(plugin.rules).filter( | ||
([key, rule]) => ( | ||
// Only include fixable rules | ||
rule.meta.fixable && !rule.meta.deprecated && key === rule.meta.docs.url.split("/").pop() && (!filter || filter(key, rule)) | ||
) | ||
).map(([key]) => [`${name}/${key}`, 2]) | ||
); | ||
@@ -76,0 +81,0 @@ if (flat) { |
@@ -29,2 +29,6 @@ 'use strict'; | ||
default: false | ||
}, | ||
includeTabs: { | ||
type: "boolean", | ||
default: true | ||
} | ||
@@ -45,2 +49,3 @@ }, | ||
const hasExceptions = Object.keys(exceptions).some((key) => exceptions[key]); | ||
const spacesRe = options.includeTabs === false ? / {2}/ : /[ \t]{2}/; | ||
function formatReportedCommentValue(token) { | ||
@@ -58,3 +63,3 @@ const valueLines = token.value.split("\n"); | ||
const rightToken = tokensAndComments[leftIndex + 1]; | ||
if (!sourceCode.text.slice(leftToken.range[1], rightToken.range[0]).includes(" ") || leftToken.loc.end.line < rightToken.loc.start.line) | ||
if (!spacesRe.test(sourceCode.text.slice(leftToken.range[1], rightToken.range[0])) || leftToken.loc.end.line < rightToken.loc.start.line) | ||
return; | ||
@@ -61,0 +66,0 @@ if (ignoreEOLComments && utils.isCommentToken(rightToken) && (leftIndex === tokensAndComments.length - 2 || rightToken.loc.end.line < tokensAndComments[leftIndex + 2].loc.start.line)) |
@@ -134,2 +134,4 @@ 'use strict'; | ||
return parent.local === node || parent.exported === node; | ||
case "ImportAttribute": | ||
return parent.value === node; | ||
default: | ||
@@ -136,0 +138,0 @@ return false; |
{ | ||
"name": "@stylistic/eslint-plugin-js", | ||
"version": "1.4.1", | ||
"version": "1.5.0-beta.0", | ||
"author": "Anthony Fu <anthonyfu117@hotmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -12,2 +12,3 @@ /* GENERATED, DO NOT EDIT DIRECTLY */ | ||
ignoreEOLComments?: boolean | ||
includeTabs?: boolean | ||
} | ||
@@ -14,0 +15,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
504055
13799
1