-
Notifications
You must be signed in to change notification settings - Fork 88
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
Relative stdin-filename breaks my plugin #58
Comments
Hello, see #49 for solution |
Ah, cool. That fixes it, thanks. |
Out of curiosity: is the relative |
ESLint matches ignore patterns by minimatch. |
We are using both an Is this a catch-22, or is there something which can be done to make this work correctly? I also use linter-eslint for Atom, and it can handle these both successfully. |
I think I fixed this in the latest Node resolver. Need to publish still. I will let you know when I have (maybe later today?). --Ben On Dec 8, 2015, at 09:53, Ian VanSchooten <notifications@github.commailto:notifications@github.com> wrote: We are using both an .eslintignore and eslint-plugin-import. If we use "args": ["--stdin-filename", "@"] as suggested in #49#49, the .eslintignore does not work properly, but if we don't use that option, eslint-plugin-import is broken. Is this a catch-22, or is there something which can be done to make this work correctly? I also use linter-eslinthttps://github.com/AtomLinter/linter-eslint for Atom, and it can handle these both successfully. Reply to this email directly or view it on GitHubhttps://github.com//issues/58#issuecomment-162905615. |
I am debugging my attempt at a fix from inside the plugin. No dice so far. Note: could the working directory be set to the base of the |
FWIW, once eslint/eslint#3948 is merged (looks like ESLint 2.0), I think the original full path will support both the plugin and |
Actually, after digging around a bit I've just discovered the Updated my Sublime project to {
"folders":
[
{
"folder_exclude_patterns":
[
"node_modules",
"bower_components",
"private_modules"
],
"follow_symlinks": true,
"path": "code"
}
],
"SublimeLinter":
{
"linters":
{
"eslint":
{
"chdir": "${project}/code"
}
}
}
} ...and that seems to work. I can't speak for Note that my project file is in |
Hello,
I do some relative file path resolution in my plugin (benmosher/eslint-plugin-import) to statically analyze ES2015 import syntax.
Recent changes to send a relative file path via
--stdin-filename
breaks this resolution. I attempted to usepath.join(process.cwd(), context.getFilename())
but the relative path is not relative to theeslint
working directory.It is not clear to me why the relative path change was made in
linter.py
, so I don't know what the next step is. I'd like to be more robust about paths within my plugin, but in general, runningeslint
directly seems to provide the absolute path viacontext.getFilename()
.The text was updated successfully, but these errors were encountered: