Skip to content

v9.0.0: Graduated disable flow with custom max-inline-disables rule#4

Merged
shaunburdick merged 1 commit into
mainfrom
001-graduated-disable-flow
Jun 20, 2026
Merged

v9.0.0: Graduated disable flow with custom max-inline-disables rule#4
shaunburdick merged 1 commit into
mainfrom
001-graduated-disable-flow

Conversation

@shaunburdick

Copy link
Copy Markdown
Owner

Summary

Implements the graduated eslint-disable flow with two enforcement mechanisms:

Breaking Changes

  • reportUnusedDisableDirectives: 'error' — stale eslint-disable comments that were previously silently ignored now fail lint. This is ESLint-native and replaces the deprecated @eslint-community/eslint-comments/no-unused-disable plugin rule (which was never activated in this config).

New Features

  • shaunburdick/max-inline-disables: warn — custom rule that warns when a file exceeds 2 inline eslint-disable comments, enforcing the graduated flow:
    1. 0–2 inline disables → clean (default)
    2. 3+ inline disables → warn, suggesting a block-level disable/enable pair
    3. 3+ files with same need → config override instead

Custom Rule Infrastructure

  • New es6/custom-rules.js — inline-defined ESLint rules under the shaunburdick plugin namespace
  • New es6/custom-rules.test.js — co-located tests using RuleTester + Node.js node:test
  • Updated npm test to run both self-lint and rule tests

Documentation

  • Updated AGENTS.md with project structure, custom rules info, graduated disable flow guidance
  • Updated CHANGELOG.md with v9.0.0 entry

Resolves the graduated disable flow enforcement (steps 1-2 of the graduated disable policy).

- 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
@shaunburdick shaunburdick merged commit 0da2bbf into main Jun 20, 2026
7 checks passed
@shaunburdick shaunburdick deleted the 001-graduated-disable-flow branch June 20, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant