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

Need equivalent to .jshintignore file #484

Closed
ilyavolodin opened this issue Jan 2, 2014 · 6 comments
Closed

Need equivalent to .jshintignore file #484

ilyavolodin opened this issue Jan 2, 2014 · 6 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint

Comments

@ilyavolodin
Copy link
Member

Need to be able to exclude certain files and sub-directories from eslint when feeding it a directory. I though we already have this feature, but looking through the issues and the code, I don't see it. defiantly need this for web-site linting (excluding vendor sub-directory, for example). It should support globs as exclusion patterns. Might also want to support .jshintignore files directly as well, to make it easier for people transitioning from jshint.

@ilyavolodin
Copy link
Member Author

I think I would actually like it to be an option in .eslintrc file instead of a whole new file all together. Thoughts? We can also still support .jshintignore files as well.

@nzakas
Copy link
Member

nzakas commented Jan 3, 2014

Putting it in .eslintrc might complicate things when you have multiple
nested .eslintrc files in several directories. It could be problematic to
get the correct path evaluated in that regard.

Having a top-level .eslintignore seems like a simpler way to handle it, IMO.

@ilyavolodin
Copy link
Member Author

As far as I remember, jshint allows you to put .jshintignore files into any directory, it doesn't have to be at the top level, and if nested each one applies to the directory that it's in and all subdirectories. I think that's probably the right way to do this, however, you are correct, that it does complicate things quite a bit.

@nzakas
Copy link
Member

nzakas commented Jan 3, 2014

Up to you what you'd like to do. If you're passionate about this, we can schedule it for a milestone. If you'd rather backlog it, let me know.

@ilyavolodin
Copy link
Member Author

I'll see what I can do on the weekend. I think I would rather have exclusions in .eslintrc file. No need for extra file, just to exclude stuff from linting.

@ilyavolodin
Copy link
Member Author

After writing all the code for this, I realized that .eslint wouldn't work for this. Ignore file should contain globs based on the directory that it's in, however, config file can be passed to cli from any location. In that case, it's not clear how to resolve globs inside of it. I guess .eslintignore would be the right thing to do.

@nzakas nzakas closed this as completed in cdcba89 Jan 7, 2014
nzakas added a commit that referenced this issue Jan 7, 2014
Adding support for .eslintignore and .jshintignore (Closes #484)
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint
Projects
None yet
Development

No branches or pull requests

2 participants