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

Adding extra rules for stricter checks? #534

Closed
jzaefferer opened this issue May 30, 2016 · 6 comments

Comments

@jzaefferer
Copy link

commented May 30, 2016

I want to disallow console.log on my project, using the no-console rule: http://eslint.org/docs/rules/no-console

I read the links in #404 that explained how rules was added and removed, but couldn't find a replacement except for "forking". Since I want to make the linter more strict, not less, I'm hoping there is another option here. I tried this suggestion, but the .eslintrc file was ignored - I guess there's more than just adding the file? I didn't find anything related in the docs.

@ifraixedes

This comment has been minimized.

Copy link

commented May 30, 2016

Maybe isn't the right solution, but I did that having .eslintrc.json extending from standardjs and with the rules that I want to apply added in rules property.

Then I run eslint command; I think that standardjs doesn't read any .eslintrc.X configuration file, that is what have you tried?

@dcousens

This comment has been minimized.

Copy link
Member

commented May 31, 2016

Maybe isn't the right solution, but I did that having .eslintrc.json extending from standardjs and with the rules that I want to apply added in rules property.

This is the right way to do this.

@jzaefferer

This comment has been minimized.

Copy link
Author

commented May 31, 2016

This is the right way to do this.

Is there an example somewhere that shows this setup? I still can't tell how to make this work.

@dcousens

This comment has been minimized.

Copy link
Member

commented May 31, 2016

@ifraixedes

This comment has been minimized.

Copy link

commented May 31, 2016

I usually use this .eslintrc.json file

And installing what is said in the eslint-config-standard eslint works fine

@feross

This comment has been minimized.

Copy link
Member

commented May 31, 2016

@jzaefferer You have to use the eslint command directly with a custom .eslintrc file in order for this to work. The standard command is not customizable, by design.

@feross feross closed this May 31, 2016

@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.
4 participants
You can’t perform that action at this time.