Uh oh!
There was an error while loading. Please reload this page.
tools: add number-isnan eslint rule - #17556
Conversation
apapirovski
commented
Dec 8, 2017
This might be a bit finicky since it would catch |
Trott
commented
Dec 8, 2017
No objections, but one question and one observation. Question: What's the reason for avoiding the Observation: I think this can probably be implemented using |
maclover7
commented
Dec 9, 2017
For personal reasons, I think it's more clear to use
Interesting -- refactored down to use no-restricted-syntax |
apapirovski
left a comment
There was a problem hiding this comment.
Unfortunately this won't work as it overrides all the no-restricted-syntax rules declared within .eslintrc.yaml in the root directory.
Trott
commented
Dec 10, 2017
Oh, yeah, I assumed it was a lint rule we'd want for the entire code base... |
apapirovski
commented
Dec 10, 2017
Yeah, I think we could do that? I don't see any reason why we would be stricter about this in |
Trott
commented
Dec 10, 2017
Are we sure we want to necessarily encourage people to change isNaN('a string is not a nubmer');//trueNumber.isNaN('a string is not a number');// false |
apapirovski
commented
Dec 10, 2017
|
maclover7
commented
Dec 11, 2017
updated @apapirovski@Trott For context, I was initially hesitant to add the rule to |
Trott
commented
Dec 11, 2017
@maclover7 Sorry to make this tedious, but this is what I'd recommend:
|
Trott
commented
Dec 11, 2017
(And yeah, had I not said anything, first bullet point would have happened and all of this would have been avoided. Sorry!) |
There was a problem hiding this comment.
I think the typeof n !== 'number' check is redundant if Number.isNaN is being used.
There was a problem hiding this comment.
I think the typeof historySize !== 'number' check is redundant if Number.isNaN is being used.
maclover7
commented
Dec 14, 2017
updated @Trott, PTAL |
maclover7
commented
Dec 18, 2017
maclover7
commented
Dec 19, 2017
Will land tomorrow unless any objections |
maclover7
commented
Dec 19, 2017
Landed in e554bc8 |
PR-URL: #17556 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #17556 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #17556 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #17556 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #17556 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
tools, test