Skip to content

Allow shebang in any file #336

Open
Open
@mk-pmb

Description

@mk-pmb

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

#!/usr/bin/env -S nodemjs
import main from 'main.mjs';

main(process.argv.slice(2));

Participation

  • I am willing to submit a pull request to implement this rule.

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."

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