We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9bb763 commit 6d1a76fCopy full SHA for 6d1a76f
packages/eslint-plugin-dialtone/lib/rules/deprecated-component.js
@@ -67,10 +67,16 @@ module.exports = {
67
return {
68
ImportDeclaration(node) {
69
let foundIndex;
70
+ const importPath = node.source.value.toLowerCase();
71
+
72
+ // Skip Dialtone's own component imports to avoid false positives
73
+ if (importPath.includes('@dialpad/dialtone')) {
74
+ return;
75
+ }
76
77
deprecatedComponents.forEach(item => {
78
const regex = new RegExp(`^.*/${item.fileName}(?:\\.vue)?$`, 'g');
- foundIndex = node.source.value.toLowerCase().search(regex);
79
+ foundIndex = importPath.search(regex);
80
81
if (foundIndex !== -1) {
82
context.report({
0 commit comments