Description
Environment
Node version: 20
npm version: π€·π»ββοΈ
ESLint version: 9
eslint-plugin-n version: latest
Operating System: macOS
What rule do you want to report?
n/hashbang
Link to Minimal Reproducible Example
should be clear enough? can provide later if necessary
What did you expect to happen?
I have a file src/cli.ts
that gets transpiled to dist/cli.js
, so I have "bin": "dist/cli.js"
in my package.json
.
n/hashbang
reports the shebang in the src/cli.ts
file as "This file needs no shebang" because I guess it doesn't know it's the file that gets transpiled into dist/cli.js
.
Participation
- I am willing to submit a pull request for this issue.
Additional comments
I've tried looking at convertPath
but don't see how that could solve it. I also saw there's some config related to tsconfig, and thinking based on "outDir": "dist"
in the tsconfig.json
it could actually be able to figure out automatically that src/cli.ts
is the source file for dist/cli.js
?