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.
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
feat(eslint-plugin): [max-params] don't count
this: void
parameter #7696feat(eslint-plugin): [max-params] don't count
this: void
parameter #7696Changes from 2 commits
d542963
59f2f37
f9c5958
23c4ce7
f613530
1f82e3a
9b258f7
ef0a019
80b6fc1
cfc6c29
b69113a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for some reason, I can't get
deepMerge
to work properly here.I've tried adding these lines to add support for array overrides, but I'm not sure why it doesn't work:
seems to work fine when isolated though:
https://tsplay.dev/wX1GLN
Anyway... I should've probably still hard-coded the values here since I don't support passing only a number like the base rule does (maybe I should?)
Base schema:
https://github.com/eslint/eslint/blob/main/lib/rules/max-params.js#L30-L53
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extended rules generally directly go off
context.options
, is that what you're looking for?typescript-eslint/packages/eslint-plugin/src/rules/brace-style.ts
Lines 30 to 32 in ca1abb5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I'm talking about
baseRule.meta.schema
.I had some issues when trying to add an option to the base schema, the deepMerge function seems to break it.
Is it OK to keep it hard-coded instead of extending the original schema in runtime?
typescript-eslint/packages/eslint-plugin/src/rules/brace-style.ts
Lines 25 to 27 in ca1abb5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah got it - yeah this is fine. Base rules don't change often and many others already hard-code it (e.g.
dot-notation
). Thanks for asking!