Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Open
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I haveread the FAQ and my problem is not listed.
Repro
import{logger}from'@charityvest/lambda';consta={};// ["test"] is better written in dot notation. (eslint@typescript-eslint/dot-notation)logger.info(a['test']);functionb(){returntrue;}logger.info(b());
constparsedTsConfig=ts.getParsedCommandLineOfConfigFile('./tsconfig.json',/*compilerOptionsToExtend*/undefined,{ ...ts.sys},);constcompilerHost=ts.createCompilerHost(parsedTsConfig.options,true);constprogram=ts.createProgram(parsedTsConfig.fileNames,parsedTsConfig.options,compilerHost);// the code you're using to do the parse of the aforementioned codemodule.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 theallowAutomaticSingleRunInference
added a workaround for this by checking if a file has been called inside theparserAndGenerateServices
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 |