The local plugin lives at src/js/eslint-plugin-clean-code.mjs. These rules cover TypeScript clean-code checks that are not well covered by common ESLint rule sets.
Requires TODO/FIXME/XXX comments to include an issue-like owner by default:
// TODO(BILL-412): remove fallback after migration.Default pattern:
^(TODO|FIXME|XXX)\([A-Z][A-Z0-9]+-\d+\):\s+\S
Corpus: CC-068
Flags comments that look like disabled JavaScript or TypeScript code.
Corpus: CC-083
Flags boolean literals passed at call sites and boolean selector parameters with mode-like names such as dryRun, force, skip, include, or mode.
Corpus: CC-043, CC-208, CC-224
Flags assignments, updates, and common mutator calls that mutate function parameters.
Corpus: CC-050, CC-207
Flags comments whose words heavily overlap the following line of code.
Corpus: CC-071, CC-073
Flags separator comments, author/date byline comments, and comments after closing braces.
Corpus: CC-080, CC-081, CC-082
Flags hard-coded policy-looking literals outside named constants and allowlisted calls. The heuristic catches:
- numbers other than
-1,0, and1 - all-caps string values
- ISO date strings
- common domain statuses such as
active,approved,draft,failed,pending, andrejected
Corpus: CC-002, CC-018, CC-234
Flags deep property chains beyond a configurable maximum depth.
Corpus: CC-106, CC-107, CC-245
The rules are enabled in configs/eslint.clean-code.recommended.mjs.
They are intentionally warnings because each rule is heuristic and should be tuned per repository.