-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [restrict-template-expressions] add allowArray
option
#8389
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
Merged
bradzacher
merged 22 commits into
typescript-eslint:main
from
abrahamguo:restrict-template-expressions
Mar 16, 2024
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
c035774
WIP
abrahamguo 4a41e8f
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo f51c879
finish logic
abrahamguo 0116b14
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo 37cfa52
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo b7217e7
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo 592c036
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo fbd2f30
add doc section
abrahamguo 4ee7087
update snapshot
abrahamguo 035b963
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo bf925e5
refactors and renames
abrahamguo f56d8e9
simplify type flag testers
abrahamguo 8245146
rename
abrahamguo bf1a087
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo a6e0c7b
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo f4bb1e8
write tests
abrahamguo 0a60320
simplify test
abrahamguo d77d075
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo 2b03d56
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo 20994f5
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo 4c375ac
suppress lint error
abrahamguo 9a3c36a
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into r…
abrahamguo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
packages/eslint-plugin/tests/schema-snapshots/restrict-template-expressions.shot
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
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.
@JoshuaKGoldberg - Originally this rule's purpose was to prevent code like
node.type === 'string'
.Given we now have the
no-unsafe-enum-comparison
rule - do you think this internal rule still has value? WDYT about deleting it? (we already have nuec turned on via the recommended config)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 I'd be in favor of that. It wouldn't be the first example of an internal lint rule ending up as a subset of a general good one.