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

eslint_d makes invalid assumptions about the config file location #4

Open
Standard8 opened this issue Oct 16, 2015 · 2 comments
Open

Comments

@Standard8
Copy link

I'm just trying out the new eslint_d with this package, and its nice to get the speed improvement.

One problem I've noticed that unlike SublimeLinter-contrib-eslint, this one is specifying the config file to default to the location that the file is in:

    config_file = ('--config', '.eslintrc', '~')

when it gets run, I see:

SublimeLinter: chdir not set or invalid, using /Users/mark/loop/gecko-dev/browser/components/loop/content/js 
SublimeLinter: eslint_d: roomViews.jsx ['/usr/local/bin/eslint_d', '--no-ignore', '--format', 'compact', '@', '--config', '/Users/mark/loop/gecko-dev/browser/components/loop/content/js/.eslintrc'] 
SublimeLinter: eslint_d output:

However, for us the config file is two directories above. Although I can specify this in the settings for the project, that isn't enough in our case as we currently have several "top-level" configurations throughout the tree. Whilst this needs correcting on our side, we're a little way away from that yet.

Could we either not set the config file location like the normal eslint package, or make it so that setting it is optional?

@Standard8
Copy link
Author

I've taken a bit of a look around, and this isn't quite as easy as removing the current config setting in the linter.py file.

SublimeLinter-contrib-eslint uses --stdin and --stdin-filename to pipe via stdin and set the filename. However, eslint_d doesn't support those options.

It appears that '@' on the command line is some sort of indication to something that stdin is going to be used. Is that correct, I can't find any documentation on it?

I think we need to get eslint_d to support the stdin options, and then we can change the config setup here to do the same as SublimeLinter-contrib-eslint. Does that analysis sound right?

@roadhump
Copy link
Owner

roadhump commented Nov 8, 2015

@Standard8 Here is documentation about linter attributes and @ http://sublimelinter.readthedocs.org/en/latest/linter_attributes.html#cmd .
Yes, it would be great to make eslint_d to support stdin options, it can solve many problems and make plugin work the same way as eslint plugin.

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

No branches or pull requests

2 participants