-
Notifications
You must be signed in to change notification settings - Fork 16
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
.editorconfig option from dependency not working, even though file exists #30
Comments
Seems that the issue is related to the |
Have you tried to build your path with |
Nope. I can experiment with that. It's not clear exactly what I should be passing in there. But the file is found if I use a path relative to my project root; |
Using |
The problem might be with the |
These lines belong to the editorconfig api. Maybe a security issue in node.js or your OS...? |
Looks like my code ends up calling |
And |
Actually, it seems like this might be related to using an outdated version of the editorconfig core: https://github.com/schorfES/node-lintspaces/blob/master/package.json#L48 |
This version is outdated but currently required. Updating to the latest verison of editorconfig-core will bring breaking changes to the API of lintspaces itself. All in all it won't work synchronous anymore... |
Tracked down my issue specifically to this line; That's mistakenly(?) appending the .editorconfig's path prefix to the match against the linted file's path. Maybe that's how it's supposed to work, so that an .editorconfig file only applies to the files inside of the same directory as it. In the case of node-lintspaces, or gulp-lintspaces, it seems that the .editorconfig rules should be applied to all of the gulp.src files. But maybe that's a misuse of the editorconfig core. Either way, I'm not sure how to go about resolving the issue. Are you planning to update node-lintspaces to use the latest version of editorconfig-core-js at some point in the future, or will everything I'm suggesting require manual forks? |
Yes, I think about updating to the latest version, but as written before it will bring a complete api change to lintspaces which will result in a new major version number. So the new release may take a while... |
Understandable, and no pressure. Just wanted to get an idea of where you see this heading. Thanks for the info, and more importantly, thanks for your work on this project. :) |
Thank you for using this project ❤️ |
I've been having trouble with the
editorconfig
option (see AlbertoElias/gulp-lintspaces#4).When I pass in
editorconfig: '.editorconfig'
the feature works as expected. However, if I try to pass in an.editorconfig
file from one of my dependencies (editorconfig: './node_modules/@myorg/code-standards/.editorconfig'
), I don't get any linting errors reported. I verified that the file exists when node-lintspaces looks for it (if I remove the file from the dependency, I getError: The config file "./node_modules/@myorg/code-standards/.editorconfig" wasn't found.
).I also tried renaming my
.editorconfig
file to.nonstandardname
and passing ineditorconfig: '.nonstandardname'
, and everything works as expected.Any ideas why the file at ./node_modules/@myorg/code-standards/.editorconfig wouldn't work?
The text was updated successfully, but these errors were encountered: