Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Relevant Package
typescript-estree
ESLint Config
import tseslint from "typescript-eslint";
export default tseslint.config(tseslint.configs.base, {
files: ["**/*.ts"],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/no-floating-promises": "error",
},
});
Expected Result
Internally, inferSingleRun
should return true
when we're in single-run mode. Executing this config with something like npx eslint .
should be determined to be in single-run mode.
Actual Result
singleRun
is always inferred to be false
right now, because of:
Additional Info
This doesn't generally have any impact on runtime performance right now. The project service doesn't generally use any single-run optimizations in single-run mode. But:
- It's confusing internally to see
singleRun
set tofalse
- There'll likely eventually be some optimizations, such as the caching TS system host mentioned in ⚡ Performance: Project service doesn't cache all fs.statSync microsoft/TypeScript#59338 (comment)
We should also investigate whether the options?.extraFileExtensions?.length
check can be bypassed with options.projectService
per #9504:
Versions
package | version |
---|---|
@typescript-eslint/typescript-estree |
8.2.0 |