Reputation: 3358
I have been given a web project at work that has a .eslintrc file in it and was told to use it.
I gather that this enforces code styles and sounds like a good idea, but I have never done this before.
I just switched to Eclipse Neon. But I can find no tutorials on how to use it. I did find something that says eslint is now the default linter for Eclipse but that was for Orion. Can someone tell me how to use my .eslintrc file for all my .js files in Eclipse?
Upvotes: 7
Views: 13651
Reputation: 19127
I'm using Neon myself, and this is how you configure ESLint:
Create an ESLint JSON configuration file by following these instructions.
Go to Project / Properties / JavaScript / Tern / Validation / ESLint and check "Use config files":
Enter the path to your eslint.json
file (or whatever you named the file you created from step 1) and press OK.
If you want to disable ESLint (or any other module), go to Project / Properties / JavaScript / Tern / Modules and uncheck it.
Upvotes: 2