-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repo: Rule [options] parameter should be non-nullable if defaultOptions exists #5439
Comments
We've deleted typescript-eslint/packages/eslint-plugin/src/rules/consistent-type-imports.ts Lines 89 to 98 in e408b93
|
#9025 touches a lot of the same interfaces, so marking as blocked on that one till it's merged. Edit: ready to go 🙂 |
I took a run at this today. It was, as expected, very tricky to try to get to work. Removing from the
On that latter list item, typescript-eslint/packages/utils/src/eslint-utils/RuleCreator.ts Lines 59 to 64 in b1c92d4
Having to add a potential third type parameter for
Marking as blocked on external items. 😞 |
Suggestion
Right now, if a rule is created through
util.createRule
withdefaultOptions
, thecreate
function's second parameter is an array whose first element is stillOptions | undefined
. That means folks have to!
. For example, in #5327:typescript-eslint/packages/eslint-plugin/src/rules/lines-around-comment.ts
Lines 136 to 137 in 7f2661f
Unless I've grossly misinterpreted the rule options, those
!
should be unnecessary, right?Edit: here's a TypeScript playground with an isolated repro.
The text was updated successfully, but these errors were encountered: