-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow shebang in any file #336
Comments
There is an option in the rule for exactly this, it's called |
Thanks! I assumed that empty array in the example is an array of glob patterns, so I expressed my intention "any" as |
there are 2 options:
|
Neither of those work for me. I have scripts that are meant to be invoked by my node scripts, but would not usually be desirable to invoke from an interactive shell. |
it seems an uncommon case; can you share an example to show how it's invoked in the node scripts? |
This comment was marked as off-topic.
This comment was marked as off-topic.
I salvaged the failed example from above by porting a simplified version of the CGI test from my other project. The test script uses cool node.js features (represented by encodeURIComponent) to construct a request for the CGI which uses cool node.js features (represented by decodeURIComponent) to parse its input. |
I see, thanks! you can safely disable the rule if your |
|
In the original project, the CGI is meant to be published because CGI is the preferred way to use the module. |
The intent of my rules package is to avoid per-project rule definitions, so disabling the rule in every affected package would run counter to that. Disableing the entire rule would also disable all of its beneficial aspects. Could be a stopgap, but I hope we can do better. Edit: I see now that you also wrote |
the |
Yes, that is the field that I deduced you probably meant with If it helps for motivation, I could make a 1:1 example that includes the In my eyes it's now about who wants to take the burden of adding and maintaining a rule for the requested feature. |
Rule details
I'd like to configure the shebang rule to do all of its regular checks, but not complain "This file needs no hashbang."
What type of rule is this?
Suggests an alternate way of doing something
Example code
Participation
Additional comments
Also the message "This file needs no hashbang." should be a bit more helpful, rather than just patronizing. When I first got the error, my first thought was, "Of course it needs one, how else would my shell know how to run it?" So maybe let's change it to something like "This file contains a hashbang but is not listed as a
bin
entry in package.json."The text was updated successfully, but these errors were encountered: