chore: Eslint ignore unused `_` variables

This commit is contained in:
Leni Aniva 2024-09-28 15:41:04 -07:00
parent 8aaf9bc854
commit b7156d0c93
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
2 changed files with 12 additions and 1 deletions

View File

@ -15,4 +15,15 @@ export default [
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
},
],
},
},
];

View File

@ -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;