@scandipwa/eslint-plugin-scandipwa-guidelines
Advanced tools
Comparing version 1.8.0 to 1.8.1
@@ -18,2 +18,7 @@ /** | ||
const prohibitedInPostfixes = [ | ||
'container', | ||
'component' | ||
]; | ||
module.exports = { | ||
@@ -31,3 +36,15 @@ meta: { | ||
Program(node) { | ||
const filePath = context.getFilename(); | ||
const exploded = filePath.split('/'); | ||
const [fileName, postfix] = exploded[exploded.length - 1].split('.'); | ||
/** | ||
* Skip all non "component" and "container" files | ||
*/ | ||
if (!prohibitedInPostfixes.includes(postfix)) { | ||
return; | ||
} | ||
const { body } = node; | ||
body.forEach((declarationOrExport) => { | ||
@@ -34,0 +51,0 @@ const declaration = extractDeclaration(declarationOrExport); |
{ | ||
"name": "@scandipwa/eslint-plugin-scandipwa-guidelines", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"description": "Eslint rules for ScandiPWA", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
38704
929