From b7156d0c932cb423588f64cc6fc5c47320671117 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Sat, 28 Sep 2024 15:41:04 -0700 Subject: [PATCH] chore: Eslint ignore unused `_` variables --- eslint.config.js | 11 +++++++++++ src/lib/markdown.js | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index 593995c..c8f2571 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -15,4 +15,15 @@ export default [ }, pluginJs.configs.recommended, ...tseslint.configs.recommended, + { + rules: { + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + }, + ], + }, + }, ]; diff --git a/src/lib/markdown.js b/src/lib/markdown.js index 8a37276..6b7b55b 100644 --- a/src/lib/markdown.js +++ b/src/lib/markdown.js @@ -12,7 +12,7 @@ const alertRegex = /^:>(NOTE|TIP|IMPORTANT|WARNING|CAUTION)/i; */ function remarkAlert/*: Plugin<[Option?], Root> = */() /*=>*/ { return (tree) => { - visit(tree, "blockquote", (node, index, parent) => { + visit(tree, "blockquote", (node, _index, _parent) => { let alertType = ''; let title = ''; let isNext = true;