Skip to content

Commit

Permalink
fix(tasks/lint_rules): map prefix node to n (#7397)
Browse files Browse the repository at this point in the history
The `eslint-plugin-n` page is not showing any rules implemented.
  • Loading branch information
Boshen committed Nov 21, 2024
1 parent e91c287 commit 1550ffc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/lint_rules/src/oxlint-rules.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ const readAllImplementedRuleNames = async () => {
}

if (found) {
const prefixedName = line
let prefixedName = line
.replaceAll(',', '')
.replaceAll('::', '/')
.replaceAll('_', '-');

// Ignore no reference rules
if (prefixedName.startsWith('oxc/')) continue;
if (prefixedName.startsWith('node/')) {
prefixedName = prefixedName.replace(/^node/, 'n');
}

rules.add(prefixedName);
}
Expand Down

0 comments on commit 1550ffc

Please sign in to comment.