You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typescript-eslint detects single run mode successfully
Actual Result
typescript-eslint detects single run mode failed
Additional Info
I have found that the cause of the problem lies in the file path detection for enabling single run mode(source).
When running eslint from the command line in a pnpm repository, the eslint bin file path will end with node_modules/eslint/bin/eslint.js so the single run mode detection will fail:
I am currently working on a pnpm monorepo that contains more than 40 TypeScript projects. I would like to use allowAutomaticSingleRunInference to enhance performance and would be happy to submit a PR to fix it. I know that by setting the environment variable TSESTREE_SINGLE_RUN=true, I can force typescript-eslint to run in single run mode. However, relying solely on this approach may not be optimal as it can be easy to forget to set the environment variable when running eslint manually from the command line.
Versions
package
version
@typescript-eslint/eslint-plugin
7.1.0
@typescript-eslint/parser
7.1.0
@typescript-eslint/rule-tester
7.1.0
@typescript-eslint/scope-manager
7.1.0
@typescript-eslint/typescript-estree
7.1.0
@typescript-eslint/type-utils
7.1.0
@typescript-eslint/utils
7.1.0
TypeScript
4.9.5
ESLint
8.57.0
node
18.18.1
pnpm
6.35.1
The text was updated successfully, but these errors were encountered:
Uh oh! @xqxian, the image you shared is missing helpful alt text. Check your issue body.
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
typescript-estree
Playground Link
No response
Repro Code
ESLint Config
tsconfig
Expected Result
typescript-eslint detects single run mode successfully
Actual Result
typescript-eslint detects single run mode failed
Additional Info
I have found that the cause of the problem lies in the file path detection for enabling single run mode(source).
When running eslint from the command line in a pnpm repository, the eslint bin file path will end with
node_modules/eslint/bin/eslint.js
so the single run mode detection will fail:I am currently working on a pnpm monorepo that contains more than 40 TypeScript projects. I would like to use
allowAutomaticSingleRunInference
to enhance performance and would be happy to submit a PR to fix it. I know that by setting the environment variableTSESTREE_SINGLE_RUN=true
, I can force typescript-eslint to run in single run mode. However, relying solely on this approach may not be optimal as it can be easy to forget to set the environment variable when running eslint manually from the command line.Versions
@typescript-eslint/eslint-plugin
7.1.0
@typescript-eslint/parser
7.1.0
@typescript-eslint/rule-tester
7.1.0
@typescript-eslint/scope-manager
7.1.0
@typescript-eslint/typescript-estree
7.1.0
@typescript-eslint/type-utils
7.1.0
@typescript-eslint/utils
7.1.0
TypeScript
4.9.5
ESLint
8.57.0
node
18.18.1
pnpm
6.35.1
The text was updated successfully, but these errors were encountered: