-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed as not planned
Labels
blocked by external APIBlocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship APIBlocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship APIpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreeIssues related to @typescript-eslint/typescript-estree
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
import { logger } from '@charityvest/lambda';
const a = {};
// ["test"] is better written in dot notation. (eslint@typescript-eslint/dot-notation)
logger.info(a['test']);
function b() {
return true;
}
logger.info(b());const parsedTsConfig = ts.getParsedCommandLineOfConfigFile(
'./tsconfig.json',
/*compilerOptionsToExtend*/ undefined,
{ ...ts.sys },
);
const compilerHost = ts.createCompilerHost(parsedTsConfig.options, true);
const program = ts.createProgram(parsedTsConfig.fileNames, parsedTsConfig.options, compilerHost);
// the code you're using to do the parse of the aforementioned code
module.exports = {
parserOptions: {
programs: [program],
},
}Expected Result
import { logger } from '@charityvest/lambda';
const a = {};
logger.info(a.test);
function b() {
return true;
}
logger.info(b());
Actual Result
import { logger } from '@charityvest/lambda';
const a = {};
logger.info(a.test true;
}
logger.info(b());
Additional Info
I saw that the allowAutomaticSingleRunInference added a workaround for this by checking if a file has been called inside the parserAndGenerateServices more than once, but unfortunately, there's no way for me to access that from the ESLint config file just. This really limits the usage of the custom Programs functionality if someone relies on the --fix flag.
Versions
| package | version |
|---|---|
@typescript-eslint/typescript-estree |
4.29.3 |
TypeScript |
4.3.2 |
node |
4.17.0 |
Metadata
Metadata
Assignees
Labels
blocked by external APIBlocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship APIBlocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship APIpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreeIssues related to @typescript-eslint/typescript-estree