question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 6 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
QuincyLarsoncommented, Jan 19, 2018

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.

1reaction
no-stack-dub-sackcommented, Jan 20, 2018

@QuincyLarson This is an interesting point:

for those developers, basically all CodeMirror linting errors will lose their meaning because they’ll become desensitized to seeing red circles in the margins

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In VSCode, JSHint warns about missing semicolons
JSHint has an option that suppresses warnings about missing semicolons called asi . Open VSCode settings ( Ctrl + , ), search jshint...
Read more >
SyntaxError: missing ; before statement - JavaScript | MDN
The JavaScript exception "missing ; before statement" occurs when there is a semicolon ( ; ) missing somewhere and can't be added by...
Read more >
semi - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Code Inspection: Missing semicolon - PhpStorm - JetBrains
Reports a missing semicolon at the end of a declaration. Suppress an inspection in the editor. Position the caret at the highlighted line ......
Read more >
How do I disable semicolon warning? - Super User
I'm using the JSHint library with YouCompleteMe, but it throws a warning on every line regarding missing semicolons.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found