Skip to content

Commit f584d1e

Browse files
committed
⚒ solhint rule disables highlighting
1 parent ed0b4ed commit f584d1e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/commands/highlight-unused-imports.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ async function unusedImportsActiveFile(editor) {
3838
editor.setDecorations(decorationType, []);
3939

4040
const text = editor.document.getText();
41+
42+
const solhintRuleString = "solhint-disable no-unused-import"
43+
if (text.includes(solhintRuleString)) return;
44+
4145
const importRegex = /import\s+((?:\{.+?\}\s+from\s+)?(?:\".*?\"|'.*?'));/g;
4246
const imports = text.match(importRegex) || [];
4347
const unusedImportDecorations = [];

0 commit comments

Comments
 (0)