v9.0.0: Graduated disable flow with custom max-inline-disables rule#4
Merged
Conversation
- reportUnusedDisableDirectives: error - catches stale eslint-disable comments (BREAKING)
- shaunburdick/max-inline-disables: warn - custom rule enforcing graduated disable flow
- custom-rules.js - inline-defined rule definitions (max-inline-disables)
- custom-rules.test.js - tests alongside source using RuleTester + node:test
- es6/index.js - global linterOptions, plugin registration, js-overrides bypass
- es6/rules.js - rule configuration ('shaunburdick/max-inline-disables': ['warn', { max: 2 }])
- Bumped to v9.0.0 (major for new unused-disable enforcement)
- Updated AGENTS.md and CHANGELOG.md
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
Implements the graduated eslint-disable flow with two enforcement mechanisms:
Breaking Changes
reportUnusedDisableDirectives: 'error'— staleeslint-disablecomments that were previously silently ignored now fail lint. This is ESLint-native and replaces the deprecated@eslint-community/eslint-comments/no-unused-disableplugin rule (which was never activated in this config).New Features
shaunburdick/max-inline-disables: warn— custom rule that warns when a file exceeds 2 inlineeslint-disablecomments, enforcing the graduated flow:Custom Rule Infrastructure
es6/custom-rules.js— inline-defined ESLint rules under theshaunburdickplugin namespacees6/custom-rules.test.js— co-located tests usingRuleTester+ Node.jsnode:testnpm testto run both self-lint and rule testsDocumentation
AGENTS.mdwith project structure, custom rules info, graduated disable flow guidanceCHANGELOG.mdwith v9.0.0 entryResolves the graduated disable flow enforcement (steps 1-2 of the graduated disable policy).