ricardofbarros / linter-js-standard

Atom linter plugin for JavaScript, using JavaScript Standard Style
https://atom.io/packages/linter-js-standard
MIT License
99 stars 48 forks source link

[weird] parsing error: illegal 'use strict' directive..... #161

Closed jessevdp closed 7 years ago

jessevdp commented 7 years ago

The following error is shown to me by js-standard:

parsing error: illegal 'use strict' directive in function with non simple parameter list

I googled and the error should be thrown when 'use strict' is used within a function with a non simple parameter list. (such as the function shown in the screenshot)

However, There is no 'use strict' specified in the entire document... As shown by the search.

screen shot 2017-02-07 at 19 13 22
ricardofbarros commented 7 years ago

Can you create a minimal gist file that replicates the same issue?

jessevdp commented 7 years ago

Oh yeah, will do. I think it's basically in any function where you specify the defaults for parameters es6 style like so

function foo (bar = 'bar') {}

ricardofbarros commented 7 years ago

Hey @jessevdp , I've just tested and the linter on my Atom doesn't return any error. What is your standard version ?

jessevdp commented 7 years ago

The error seems to be gone now, I updated the standard-linter package this morning. I'm on v3.9.0 now.

sonicdoe commented 7 years ago

Since it looks like this has been resolved, I’ll close this issue.