Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@scandipwa/eslint-plugin-scandipwa-guidelines

Package Overview
Dependencies
Maintainers
4
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scandipwa/eslint-plugin-scandipwa-guidelines - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

lib/util/get-leading-comments.js

4

lib/rules/use-magic-construct.js

@@ -0,1 +1,3 @@

const getLeadingCommentsForNode = require('../util/get-leading-comments');
/**

@@ -12,3 +14,3 @@ * @fileoverview All components should be extensible.

const leadingComments = context.getSourceCode().getCommentsBefore(nodeToProcess);
const leadingComments = getLeadingCommentsForNode(nodeToProcess, context.getSourceCode());

@@ -15,0 +17,0 @@ const namespaceComment = leadingComments.find(

@@ -9,2 +9,3 @@ /**

const fixNamespaceLack = require('../util/fix-namespace-lack.js');
const getLeadingCommentsForNode = require('../util/get-leading-comments');

@@ -86,5 +87,5 @@ const types = {

);
return getNamespaceFromComments(
sourceCode.getCommentsBefore(getProperParentNode(node))
getLeadingCommentsForNode(getProperParentNode(node), sourceCode)
);

@@ -91,0 +92,0 @@ };

@@ -0,1 +1,3 @@

const getLeadingCommentsForNode = require('./get-leading-comments');
/**

@@ -9,4 +11,4 @@ * Insert namespace decorator comment before the appropriate node

module.exports = (fixer, node, context, namespace) => {
const sourceCode = context.getSourceCode();
const leadingComments = sourceCode.getLeadingComments(node);
const sourceCode = context.getSourceCode();
const leadingComments = getLeadingCommentsForNode(node, sourceCode);

@@ -18,7 +20,5 @@ if (leadingComments.find(comment => comment.value.includes('@namespace'))) {

const blockComment = leadingComments.reverse().find(
comment => comment.type === 'Block' && !['eslint-disable-next-line', '@license'].some(cond => comment.value.includes(cond))
comment => comment.type === 'Block' && !['eslint-disable-next-line', '@license'].some(cond => comment.value.includes(cond))
);
const lineComment = leadingComments.reverse().find(
({ type }) => type === 'Line'
);
const eslintComment = leadingComments.find(

@@ -34,2 +34,3 @@ comment => comment.value.includes('eslint-disable-next-line')

}
if (eslintComment) {

@@ -36,0 +37,0 @@ return fixer.insertTextBefore(eslintComment, `/** @namespace ${namespace} */\n`);

{
"name": "@scandipwa/eslint-plugin-scandipwa-guidelines",
"description": "ESLint plugin used by CSA.",
"version": "2.0.6",
"version": "2.0.7",
"keywords": [

@@ -29,3 +29,3 @@ "eslint",

},
"gitHead": "a77d8ed2ecaf0b0938bce863177e37a596546a2e"
"gitHead": "8405342bb1f56fc23bbd63d06a02f635c57884c4"
}
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