Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Semicolon checking stops working after running beautify #403

Closed
elewin opened this issue May 17, 2017 · 5 comments
Closed

Semicolon checking stops working after running beautify #403

elewin opened this issue May 17, 2017 · 5 comments

Comments

@elewin
Copy link

elewin commented May 17, 2017

Using linter-jslint 3.1.2 and atom-beautify 0.29.24 on Atom 1.17.0, if I have a block of code containing a line without a semicolon, the linter will correctly point out the missing semicolon on let abc = 123:

let a = b => {
  let abc = 123
}

however, running atom-beautify (with its default settings), the same block of code will be unchanged, yet the missing semicolon warning on 'let abc = 123' goes away.

Any ideas?

my. jshintrc is:

{
  "esversion": 6
}

Before beautifying (correctly identifying the missing semicolon):
before

After beautifying, ignoring the missing semicolon:
after

@elewin
Copy link
Author

elewin commented May 17, 2017

It looks like it may be ignoring the missing semicolon if it uses tabs to indent rather than spaces (which I believe is what the beautify tool is doing), is this intended behavior? If so can it be set to not ignore the missing semicolon in such a case?

@Arcanemagus
Copy link
Member

If that's the case it's (yet another) bug in JSHint, do you see the same thing when running jshint in the CLI?

@elewin
Copy link
Author

elewin commented May 17, 2017

I've never used the CLI before to be honest; is it a known issue in jshint or should I open an issue on their repo?

@Arcanemagus
Copy link
Member

I have no idea 😛, I don't use JSHint myself.

You can try searching here: https://github.com/jshint/jshint/issues, otherwise I will try to reproduce later.

@Arcanemagus
Copy link
Member

Just tried reproducing this, turns out this is a combination of a JSHint bug where it reports invalid points for lines that start with tabs, and there was a bug in linter-jshint that caused the message stating that to be hidden. I've fixed this in v3.1.3.

You should follow jshint/jshint#3151 for updates on getting the JSHint bug fixed.

(Marking as a duplicate of #416, even though yours was filed first.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants