Socket
Socket
Sign inDemoInstall

@stylistic/eslint-plugin-js

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylistic/eslint-plugin-js - npm Package Compare versions

Comparing version 1.4.1 to 1.5.0-beta.0

9

dist/configs.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc