Add JSON Schema-based validation, default values, and TypeScript type generation for rule options.
Reference ESLint document: https://eslint.org/docs/latest/extend/custom-rules#options-schemas
Steps
- Add JSON Schema support
- Vendor a JSON Schema validation library
- Add a small wrapper for compiling and validating schemas
- Add unit tests
- Implement new schema framework
- Make rules accept a plain options array (aligned with ESLint) instead of the legacy rslint-specific format
- Remove support for the legacy object-style rule configuration
- Update all existing rules (using scripts for now)
- Ensure the full test suite passes
- Validate user configs against each rule's schema with clear error messages
- Populate unspecified options using schema defaults
- Verify the behavior end-to-end with a couple of real rules
- Write a guide describing how to author rule schemas consistently for future rules
- Generate TypeScript types for rule options
- Generate precise TypeScript types for
rslint.config.ts from each rule's schema
- Integrate type generation into the build process
- Migrate existing rule packages
- Migrate rules package by package, remove legacy code in rules one by one.
- Packages:
eslint
typescript-eslint
import
jest
jsx_a11y
promise
react
react_hooks
unicorn
- Remove legacy compatibility code
- Remove the legacy rule configuration format
- Remove compatibility shims and unused code
- Ensure the new implementation is the only supported path
Checklist
Add JSON Schema-based validation, default values, and TypeScript type generation for rule options.
Reference ESLint document: https://eslint.org/docs/latest/extend/custom-rules#options-schemas
Steps
rslint.config.tsfrom each rule's schemaeslinttypescript-eslintimportjestjsx_a11ypromisereactreact_hooksunicornChecklist
eslinttypescript-eslintimportjestjsx_a11ypromisereactreact_hooksunicorn