From e9f9d5429c03935e31e67fec4128f52d277fd85a Mon Sep 17 00:00:00 2001 From: Gerrit Burger Date: Tue, 2 Apr 2024 12:20:11 +0200 Subject: [PATCH] Use substring check for opticks importPath --- packages/eslint-plugin/lib/rules/toggle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/lib/rules/toggle.js b/packages/eslint-plugin/lib/rules/toggle.js index 307d755..ee9491d 100644 --- a/packages/eslint-plugin/lib/rules/toggle.js +++ b/packages/eslint-plugin/lib/rules/toggle.js @@ -45,7 +45,7 @@ module.exports = { ImportDeclaration: (node) => { const importPath = node.source.value - if (importPath === 'opticks') { + if (importPath.includes('opticks')) { node.specifiers.forEach((specifier) => { if (specifier.imported.name === 'toggle') { settings.isToggleImportedFromOpticks = true