eslint / config-inspector

A visual tool for inspecting and understanding your ESLint flat configs.
https://www.npmjs.com/package/@eslint/config-inspector
Apache License 2.0
650 stars 18 forks source link

Empty rules shown on configs page (grid layout) #93

Open alexey-koran opened 13 hours ago

alexey-koran commented 13 hours ago

Rules are shown as empty blocks when the layout grid is enabled if there are any unsupported rules (e.g. added by a plugin)

Image

If you add eslint-plugin-prettier which includes eslint-config-prettier rules related to vue, flowtype & etc.

Func getRuleFromName returns undefined as the payload has no such rules

https://github.com/eslint/config-inspector/blob/27654d5f0f24b491b346fb921de25da9e2c3e956/app/components/RuleList.vue#L15-L19

https://github.com/eslint/config-inspector/blob/27654d5f0f24b491b346fb921de25da9e2c3e956/app/composables/payload.ts#L89-L92

Maybe it's worth checking if the rule exists in the payload?