quick-lint-js
quick-lint-js copied to clipboard
7$: warn on 'x == a || null' and 'x == a || undefined'
I think we can tweak our existing logic for E0190.
For this task, you can look at the logic for either:
- E0286/E0287 (
parser::error_on_pointless_string_compare
insrc/quick-lint-js/fe/parse.cpp
), introduced in commit 35207e6616267c6c81be63f47ce97ec2452d60df, or - E0190 (
parser::error_on_sketchy_condition
insrc/quick-lint-js/fe/parse.cpp
), introduced in 1634b9808e0785ca75dbf4fb545a40ee403ebc51.
The logic and testing for this lint should be similar to the above lints.
Tests would go in test/test-parse-warning.cpp.
I can work on this issue
@rohitsasi720 Do you need any help?
@strager , Can I take up this issue?
@HarshitAghera I suggest finishing issue #852 first before working on this issue.
@rohitsasi720 Have you made progress on this task?
@strager, can I start working on this?
@HarshitAghera Yes you may!