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.
feat: add no-property-in-node rule #433
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: add no-property-in-node rule #433
Changes from 1 commit
b9d6c28
8cfaf6d
4d163e1
d62539d
3575644
e42c075
2a94dcb
4d5d332
755cc08
d76b08a
5913127
d45695d
532925d
6b60ab0
89aafda
1d570e8
1ec0c2a
de370b0
18b205a
8d68dc9
d8dc1a0
d8cc468
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
From https://github.com/eslint-community/eslint-plugin-eslint-plugin/actions/runs/7794182409/job/21255096639?pr=433:
What would you like to do here? The first ideas that come to mind for me are:
all
& add anall-type-checked
config?no-property-in-node
for specificallyeslint/eslint
, since it's the only one without a TSConfig?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.
I slightly prefer this. just like
recommended
andrecommended-type-checked
. @bmish wdyt?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.
the rule is also
rules-recommended
? So also needrules-recommended-type-checked
...., so many presets doesn't seem like a good idea.😅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.
Yeah 😓 ... another possibility for flat configs specifically could be to make the configs be a function with properties set on it. So you could do either of:
The only prior art I know of this strategy is azat-io/eslint-plugin-perfectionist#90.
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.
recommended
config follows the eslint's semantic-versioning-policy, whileall
,rules-all
,tests-all
does not.maybe just adding
recommended: false
in this PR. let's consider adding the configs in another PR. thoughts?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.
Duplicating every config when we have so many is not great. What about just providing a
type-checked
config with just this single rule that you can mix and match with the others?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.
Heh, that's what we used to do in typescript-eslint. But then we found that most folks only enabled one of the configs. And it was a bit irksome to have to enable two.
typescript-eslint/typescript-eslint#5204 -> https://typescript-eslint.io/blog/announcing-typescript-eslint-v6#reworked-configuration-names is what we ended up with.
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.
Continuing discussion in: