Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mizdra committed Nov 6, 2023
1 parent 8a39f77 commit 5a52ca7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export function scanUsedPluginsFromResults(results: ESLint.LintResult[]): string
const parts = ruleId.split('/');
if (parts.length === 1) return undefined; // ex: 'rule-a'
if (parts.length === 2) return parts[0]; // ex: 'plugin/rule-a'
if (parts.length === 3) return `${parts[0]}/${parts[1]}`; // ex: '@scoped/plugin/rule-a'
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
if (parts.length === 3) return `${parts[0]!}/${parts[1]!}`; // ex: '@scoped/plugin/rule-a'
return undefined; // invalid ruleId
}) // plugins: string[]
.filter(notEmpty);
Expand Down

0 comments on commit 5a52ca7

Please sign in to comment.