-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [strict-boolean-expressions] check array predicate functions' return statements #10106
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
JoshuaKGoldberg
merged 45 commits into
typescript-eslint:main
from
ronami:strict-boolean-expressions-predicates
Dec 26, 2024
Merged
feat(eslint-plugin): [strict-boolean-expressions] check array predicate functions' return statements #10106
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
95525e0
initial implementation
ronami e6dd55c
tests
ronami 1a898fe
refactor
ronami a16f46e
some more tests
ronami 057a68e
update docs
ronami d2ea1ab
update snapshots
ronami 116c80b
merge conflicts
ronami d641dc9
handle implicit or explicit undefined return types
ronami 8d997d1
refactor and update tests
ronami 47c167c
remove unnecessary union check
ronami 90f9ba8
inline check
ronami 42a1336
cover empty return staetments
ronami 655e52c
report a function as returning undefined only if no other isssues wer…
ronami b8643c9
update comments
ronami c665d82
add test
ronami b3dd8be
remove unnecessary test
ronami fc0ea08
Merge branch 'main' into strict-boolean-expressions-predicates
ronami 5691380
update code to match function's inferred return type rather than each…
ronami f718885
update tests to match the implementation changes
ronami dbc4c7a
adjust suggestion message
ronami f6329dc
final adjustments
ronami 3ce22c5
final adjustments #2
ronami 96ef5c0
test additions
ronami 403c011
update snapshots
ronami 339fa3a
Update packages/eslint-plugin/docs/rules/strict-boolean-expressions.mdx
ronami 30b3d1c
initial implementation of deducing the correct signature for non-func…
ronami 690fdbc
comments
ronami d607a00
take type constraints into consideration
ronami f5c7300
only check type constraints on type parameters
ronami 287122e
update tests
ronami 7566d0b
update index tests
ronami d472c86
update snapshot
ronami 00b8424
simplify code a bit
ronami 5e59733
remove overly complex heuristic
ronami d2a254a
use an existing helper rather than implementing one
ronami 6b32e50
update tests
ronami c97d53c
Update packages/eslint-plugin/src/rules/strict-boolean-expressions.ts
ronami ac6be7e
fix codecov
ronami e94c0ee
cleanup old code, support type constraints
ronami 601dfba
refactor fixer
ronami 1994ba6
remove unnecessary tests
ronami c71112b
Merge branch 'main' into strict-boolean-expressions-predicates
ronami 8e54722
revert changes to isParenlessArrowFunction
ronami abfb9f7
Merge branch 'main' into strict-boolean-expressions-predicates
ronami f17a05c
oops
ronami 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
4 changes: 4 additions & 0 deletions
4
packages/eslint-plugin/tests/docs-eslint-output-snapshots/strict-boolean-expressions.shot
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.