@scandipwa/eslint-plugin-scandipwa-guidelines
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@scandipwa/eslint-plugin-scandipwa-guidelines", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Eslint rules for ScandiPWA", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -49,13 +49,2 @@ function keepOrDeleteNode(context, node) { | ||
} | ||
}, | ||
ClassDeclaration(node) { | ||
const { superClass } = node; | ||
const { name, loc } = superClass || {}; | ||
if (name === 'PureComponent' || name === 'Component') { | ||
context.report({ | ||
loc, | ||
message: `${name} is not allowed. Use 'Extensible${name}' instead`, | ||
fix: fixer => fixer.replaceText(superClass, `Extensible${name}`) | ||
}); | ||
} | ||
} | ||
@@ -62,0 +51,0 @@ }) |
@@ -6,5 +6,6 @@ module.exports = { | ||
const { superClass } = node; | ||
const { name } = superClass || {}; | ||
const { name, loc: superClassLoc } = superClass || {}; | ||
const { id: declaration } = node; | ||
const { loc } = declaration; | ||
if (!name) { | ||
@@ -17,2 +18,10 @@ context.report({ | ||
} | ||
if (name === 'PureComponent' || name === 'Component') { | ||
context.report({ | ||
superClassLoc, | ||
message: `${name} is not allowed. Use 'Extensible${name}' instead`, | ||
fix: fixer => fixer.replaceText(superClass, `Extensible${name}`) | ||
}); | ||
} | ||
} | ||
@@ -19,0 +28,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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
14263
9
0
23
333