Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wont disable check on one line #1001

Closed
hovancik opened this issue Oct 13, 2017 · 4 comments

Comments

@hovancik
Copy link

commented Oct 13, 2017

Hi, how can I disable one line? Adding stuff from readme is not working for me.

test.js:

/*eslint-disable*/
return // eslint-disable-line
/*eslint-enable*/

./node_modules/.bin/standard test.js:

standard: Use JavaScript Standard Style (https://standardjs.com)
test.js:2:1: Parsing error: 'return' outside of function
@bcomnes

This comment has been minimized.

Copy link
Member

commented Oct 13, 2017

Thats a syntax parsing error so disabling style rules won't have any effect there.

@hovancik

This comment has been minimized.

Copy link
Author

commented Oct 14, 2017

Ah, ok. Is there way to ignore it then?

@Flet

This comment has been minimized.

Copy link
Member

commented Nov 7, 2017

The error is happening when eslint attempts to parse the code itself. Unfortunately there is no way to disable this type of error. If I get an error like this, usually it means I have a return statement in the wrong place.

I'm closing this issue as don't think we can fix it, but feel free to reply with questions.

@Flet Flet closed this Nov 7, 2017

@hovancik

This comment has been minimized.

Copy link
Author

commented Nov 8, 2017

I added "babel-eslint": "^8.0.1", and I am not getting it anymore.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.