eslint-plugin-node icon indicating copy to clipboard operation
eslint-plugin-node copied to clipboard

[node/no-unpublished-*] Fix ignore-file behavior

Open neurolag opened this issue 4 years ago • 1 comments

Currently the way to determine whether a file is ignored, doesn't work ideally. NPM doesn't load .gitignore as a fallback - however, this plugin checks files against .gitignore, if .npmignore isn't present.

Also, I'm working with vscode-extensions at the moment, which have their own ignore-file: .vscodeignore

I think it'd be best to have an option to choose an own list of ignore-filenames which should be parsed.

As a workaround, I'm maintaining both, a .vscodeignore and a .npmignore file in my vscode-extensions

neurolag avatar Jun 24 '21 01:06 neurolag

I just encountered this issue.

In my use case, I have some code that is being automatically generated before building the app. Because of that, it's not being pushed to the repository (there's no point). Due to the .gitignore fallback, linting errors on node/no-unpublished-import rule (the package is private, so not published but I still use the rule for checking if some dependencies aren't missing).

AndKiel avatar Feb 18 '22 10:02 AndKiel