asi: suppress 'missing semicolon' warning in editor
See original GitHub issue@freeCodeCamp/moderators What does everyone think about suppressing the ‘missing semicolon’ linter warning in the editor?
<image src="https://user-images.githubusercontent.com/18563015/34965503-65eff798-fa22-11e7-889e-1aa7eb127201.png" height="200px" />With asi, manually adding semicolons is rarely needed except in some very specific cases, and the semicolon-less style in ES6/ES7 is becoming more popular (or at least sparking debate) among the JS community (try looking through the lodash codebase, you won’t find a single semicolon! Same with NPM — quick example).
Point being, with this being the case, I don’t think it’s as important that this be stressed so forcefully, even with new developers. This warning pops up so frequently during coding challenge solutions, that it just ends up becoming a pesky problem rather than a helpful linter error, which is what I think the point of the linter should be.
If it’s not going to cause problems in their code, and is not even a stylisitc must like it used to be, why bother warning campers about it every other line of code?
Overall, I think this would be a small, but highly impactful UX improvement (and an easy fix, simply add asi: true
right here and here).
Thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (13 by maintainers)
Top GitHub Comments
I agree with @BerkeleyTrue that everyone should use semicolons, and I think the resistance some developers have to them is a bit strange.
This said, there will be some developers who stubornly refuse to use them, and for those developers, basically all CodeMirror linting errors will lose their meaning because they’ll become desensitized to seeing red circles in the margins. So I agree that it would be nice for those stubborn people to be able to toggle off missing semicolon linting errors. There might be some other linting options that campers would like to have, too.
I’d say this is an extremely low priority, though. There are probably hundreds of things we could do that would have more of an aggregate impact on user experience than this.
@QuincyLarson This is an interesting point:
Anyway, I couldn’t agree more that this is VERY low priority. If we’re not considering suppressing the warning altogether, than offering linter options should, if ever, happen way down the line.
I’d say it’s probably safe to close this at this point, and revisit when and if the time is right.