-
Notifications
You must be signed in to change notification settings - Fork 624
[eslint-plugin-packlets] Linting TypeError with typescript version >=4.2.0 #2591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
IS the issue just that the |
@iclanton The problem is that
And that API doesn't exist in TS 4.2. Lemme investigate it real quick. |
It was removed in microsoft/TypeScript#40011 |
Seems like |
|
Here is a PR: #2603 |
@sheetalkamat Maybe the compiler could provide a public supported version of this API? There doesn't seem to be an easy way to implement this analysis without relying on the internal API. |
This fix was released with |
Uh oh!
There was an error while loading. Please reload this page.
Summary
I'm getting a typescript error from eslint-plugin-packlets while linting after upgrading TypeScript version to any equal or above 4.2.0
Error contents:
TypeError: program.getRefFileMap is not a function
It's from DependencyAnalizer file from checkEntryPointForCircularImport function.
Eslint exits with error code 2.
Repro steps
Details
eslint script: eslint 'packages//{src,tests}/**/.{js,ts,tsx}' '/*.json' 'cypress//.{js,ts,tsx}' --fix && stylelint --fix 'packages/**/.scss'
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"eslint": "^7.15.0",
An Error occurs also when upgrading above packages to the newest ones.
"webpack": "^5.17.0",
.eslintrc.json
{
"extends": ["../../.eslintrc.json", "plugin:@rushstack/eslint-plugin-packlets/recommended"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": ["./tsconfig.json"],
"tsconfigRootDir": "./packages/client"
},
"ignorePatterns": ["*.json"],
"rules": {
"@rushstack/packlets/mechanics": "error"
}
}
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@rushstack/eslint-plugin-packlets
version?node -v
)?The text was updated successfully, but these errors were encountered: