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

default to .eslintignore, allow overrides #145

Closed
wants to merge 1 commit into from
Closed

default to .eslintignore, allow overrides #145

wants to merge 1 commit into from

Conversation

ratherblue
Copy link

@ratherblue ratherblue commented Jun 24, 2016

This fixes #144 and #127 .

It defaults to the first .eslintignore it finds, but also allows the path overridden to be set with --ignore-path in the args array (See Inline Overrides documentation

See also SublimeLinter's config_file documentation

Tested it locally and seems to be working nicely.

@ratherblue
Copy link
Author

Actually this doesn't fix the relative path issue completely. Closing to find better fix.

@ratherblue
Copy link
Author

Going to re-open because it fixes the issue for people who have ESLint 2.5.0 and under. Need a separate fix for the issue introduced by eslint/eslint#5694

@ratherblue ratherblue reopened this Jun 24, 2016
@peterkrieg
Copy link

@ratherblue : do you happen to know if there is a fix for this with ESLint 2.5.0 +? (I'm running ESLint 3.1.1)

@ratherblue
Copy link
Author

ratherblue commented Jul 26, 2016

@peterkrieg No... unfortunately it's an issue (feature?) with ESLint. Basically if you have ./src/foo.js in .eslintignore but then you run eslint from the src directory, foo.js will no longer be ignored because it's technically ignoring ./src/src/foo.js.

As far as I can tell, unless ESLint adds a command line option for cwd (there is one in the CLIEngine already), the only way to fix it would be if this plugin can somehow execute eslint from a different folder. (And I'm not sure how to make it do that)

@peterkrieg
Copy link

@ratherblue Thanks a lot for explanation, that's what I was afraid of. I wish I knew where to even start to try to fix the ESLint problem and submit a PR.. I'd really love this fixed hahah!

@ratherblue
Copy link
Author

@peterkrieg I opened an issue with ESLint (eslint/eslint#6759). Hopefully they add a way for us to fix it.

@ratherblue
Copy link
Author

@peterkrieg it looks like the ESLint contributors are going to look into the --ignore-path relative pathing issue.

@peterkrieg
Copy link

@ratherblue thanks a lot for update! I've been following along and your issue sure has created a lot of discussion. Great news!

@kaste
Copy link
Contributor

kaste commented Jan 10, 2018

This plugin has new maintainers. What's the status here? Is it correct that this has been fixed generally with Eslint 4.x?

Would it help if we set the cwd/chdir to the project root path before starting eslint? 👋

@kaste
Copy link
Contributor

kaste commented Feb 14, 2018

This is not compatible with SL4 anymore. In SL4 we set the working dir to the project folder, so generally this should work better by default, right now. Otherwise, anybody can set this using the args setting.

@kaste kaste closed this Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

.eslintignore is not loaded in subdirs
3 participants