Support pnpm for single run detection #3811
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
enhancement
New feature or request
good first issue
Good for newcomers
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: typescript-estree
Issues related to @typescript-eslint/typescript-estree
Repro
.eslintrc.yml
tsconfig.json
index.ts
// nothing
https://github.com/cherryblossom000/typescript-eslint-single-run-pnpm
Expected Result
typescript-estree should detect that this is a single run of ESLint.
Actual Result
typescript-estree did not detect that this was a single run.
Additional Info
Instead of copying the Node.js CLI script, pnpm creates a shell script that invokes the direct path to the script (e.g.
node node_modules/eslint/bin/eslint.js
) innode_modules/.bin/eslint
:This means that
process.argv[1]
ends withnode_modules/eslint/bin/eslint.js
instead ofnode_modules/.bin/eslint
.I know that I can just use
TSESTREE_SINGLE_RUN=true
, that ESLint could change the path to the bin file at any time, and that pnpm isn't as popular as npm and yarn, so I understand if this isn't actionable.Versions
@typescript-eslint/typescript-estree
4.29.3
TypeScript
4.3.5
node
16.8.0
The text was updated successfully, but these errors were encountered: