-
-
Notifications
You must be signed in to change notification settings - Fork 55
Description
shebang rule only check for the bin field in package.json, but with the new Node.js built-in test test runner, it's valid that they are run as standalone executables, with a shebang and an executable bit.
My suggestion is that files that import test or node:test can have a shebang, and if so, check and enforce that they have enabled the executable permission bit. In the other way could not work, importing test built-in and have enabled the executable permission bit is NOT enough to consider it should have a shebang, because Windows don't have permission bits and the file can be importing the test runner but not intended to be used standalone, except is the test script on package.json file is running the test file as if would be an executable, in that case file must have the shebang.