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

Comments

Projects
None yet
2 participants
@ilyavolodin
Member

ilyavolodin commented Jan 2, 2014

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

This comment has been minimized.

Show comment
Hide comment
@ilyavolodin

ilyavolodin Jan 2, 2014

Member

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.

Member

ilyavolodin commented Jan 2, 2014

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

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Jan 3, 2014

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@ilyavolodin

ilyavolodin Jan 3, 2014

Member

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.

Member

ilyavolodin commented Jan 3, 2014

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

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Jan 3, 2014

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@ilyavolodin

ilyavolodin Jan 3, 2014

Member

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.

Member

ilyavolodin commented Jan 3, 2014

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

This comment has been minimized.

Show comment
Hide comment
@ilyavolodin

ilyavolodin Jan 5, 2014

Member

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.

Member

ilyavolodin commented Jan 5, 2014

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 in cdcba89 Jan 7, 2014

nzakas added a commit that referenced this issue Jan 7, 2014

Merge pull request #493 from ilyavolodin/exclude
Adding support for .eslintignore and .jshintignore (Closes #484)

@eslint eslint bot locked and limited conversation to collaborators Feb 7, 2018

@eslint eslint bot added the archived due to age label Feb 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.