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

Strategies for different linters across projects #529

Closed
timdp opened this issue May 12, 2015 · 8 comments
Closed

Strategies for different linters across projects #529

timdp opened this issue May 12, 2015 · 8 comments

Comments

@timdp
Copy link

timdp commented May 12, 2015

If I have multiple linters installed for a language, I can already configure them on a per-directory basis using e.g. .eslintrc files. However, can I also configure Linter itself to only allow a certain subset of my installed linters inside a certain directory tree?

A concrete use case would be that I want to use JS Standard Style for project A, but a custom .eslintrc for project B. In this particular instance, I could also just add all files to Standard's ignore list, but I'd rather not run that particular linter altogether.

@alanclarke
Copy link

+1 this!

@steelbrain
Copy link
Owner

@iam4x any thoughts?

@timdp
Copy link
Author

timdp commented May 31, 2015

Personally, I could certainly live with a .linterrc, as suggested in #519. It would certainly be a more scalable approach than a user-specific config.

Of course, it's yet another config file littering the project dir. As an improvement, perhaps there could also be a per-platform way of configuring the linter. For example, in the case of Node.js, package.json could have an extra key for it.

@timdp
Copy link
Author

timdp commented May 31, 2015

Maybe it could even be an EditorConfig thing?

@iam4x
Copy link
Contributor

iam4x commented May 31, 2015

You can already achieve it, just put a .estlinrc in your parent folder of where you want to use this .eslintrc configuration file.

And add a specific one in the folder where you want to.

@iam4x iam4x self-assigned this May 31, 2015
@timdp
Copy link
Author

timdp commented May 31, 2015

That applies to using different ESLint configurations, not different linters altogether.

@iam4x
Copy link
Contributor

iam4x commented May 31, 2015

Humm, you want to have linter package disabled on different folder. Or for instance have lint on change for a project and not for another one?

@timdp
Copy link
Author

timdp commented May 31, 2015

My main request was being able to use linter A for project/folder 1 and linter B for project/folder 2.

Being able to configure linters on a per-project basis would be an extension of that. Another extension would be disabling linting for certain projects.

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

No branches or pull requests

6 participants