fix: error on unknown rule names in config#1232
Draft
swwind wants to merge 3 commits into
Draft
Conversation
Deploying rslint with
|
| Latest commit: |
515e5bc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3f940bec.rslint.pages.dev |
| Branch Preview URL: | https://fix-unknown-rule-config-vali.rslint.pages.dev |
swwind
marked this pull request as draft
July 9, 2026 03:43
Contributor
Author
|
We might implement this alongside with the new schema validation system. Hold short. |
swwind
force-pushed
the
fix/unknown-rule-config-validation
branch
from
July 15, 2026 04:04
5295f45 to
515e5bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unknown, misspelled, or unregistered rule names in
rules(e.g.rules: { 'non-existent-rule-name': 'error' }) were silently ignored. The config-time validation step from #1243 now also resolves every enabled rule name, so unknown names are reported alongside rule-options failures. Rules set to"off"are exempt, same as ESLint.internal/config:ValidateRuleOptionsbecomesValidateRules(config, registry, eslintPlugins)— one pass collects unknown-name errors (unknown rule "x",unknown rule "p/x": plugin "p" has no such rule,unknown rule "p/x": plugin "p" is not registered) and options failures, deduplicated and sorted by rule name. Mounted ESLint-plugin rules resolve through the passed plugin entries, not the registry's placeholders — the placeholders may be unregistered yet at validation time, or stale leftovers from an earlier request in a long-lived process. Declaring a prefix underpluginsgrants no exemption: enabling a plugin's rules without supplying that plugin's rule names is an error."off"in the committed snapshot; every other rule keeps running and the config transaction commits normally. When the plugin host is degraded the catalog carries no plugin entries, so mounted plugin rules surface as harmless warnings instead of rejecting a valid config.Breaking Changes
--rulewith an unknown rule name now also fails with exit code 1 (previously silently ignored), matching ESLint's--rulebehavior. Use"off"if you don't want a rule validated.Related Links
Fixes #1228
Checklist