Skip to content

Allow tests for shebang rule #119

@piranna

Description

@piranna

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions