Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/playground/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
'/* eslint quotes: ["error", "double"] */\nconst a = \'b\';';

const linter = new Linter({ configType: "flat" });
const legacyLinter = new Linter({ configType: "eslintrc" });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, this wouldn't work with ESLint v10 so we have to figure out another way to get rules.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem was discussed in eslint/eslint#18103, and a proposed solution that could do the work is to fetch rules_meta.json from the eslint/eslint repo's latest branch.

const rules = legacyLinter.getRules();

Check failure on line 30 in src/playground/App.js

View workflow job for this annotation

GitHub Actions / Lint

'legacyLinter' is not defined
const ruleNames = Array.from(rules.keys());
const rulesMeta = Array.from(rules.entries()).reduce((result, [key, value]) => {
result[key] = value.meta;
Expand Down
Loading