Skip to content
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

TS 3.4: Parsing error: Invalid value for lib provided: es2021.string #3449

Closed
3 tasks done
dylang opened this issue May 27, 2021 · 1 comment · Fixed by #3460
Closed
3 tasks done

TS 3.4: Parsing error: Invalid value for lib provided: es2021.string #3449

dylang opened this issue May 27, 2021 · 1 comment · Fixed by #3460
Labels
bug Something isn't working package: scope-manager Issues related to @typescript-eslint/scope-manager

Comments

@dylang
Copy link

dylang commented May 27, 2021

  • 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

    "lib": [
      "ESNext.String"
    ],

or

    "lib": [
      "ES2021.String"
    ],

Live Repo:
https://stackblitz.com/edit/invalid-es2021-string?devtoolsheight=33&file=tsconfig.json

  • Run turbo lint

Expected Result

No lint errors.

Actual Result

0:0  error  Parsing error: Invalid value for lib provided: es2021.string

Additional Info

eslint:cli-engine Lint /projects/node-shximw/index.ts +0ms
  eslint:linter Linting code for /projects/node-shximw/index.ts (pass 1) +0ms
  eslint:linter Verify +0ms
  eslint:linter With ConfigArray: /projects/node-shximw/index.ts +0ms
  eslint:linter Parsing error: Invalid value for lib provided: es2021.string
  eslint:linter Error: Invalid value for lib provided: es2021.string
    at Referencer.populateGlobalsFromLib (/projects/node-shximw/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js:63:23)
    at Referencer.Program (/projects/node-shximw/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js:390:14)
    at Referencer.visit (/projects/node-shximw/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js:72:21)
    at Object.analyze (/projects/node-shximw/node_modules/@typescript-eslint/scope-manager/dist/analyze.js:48:16)
    at Object.parseForESLint (/projects/node-shximw/node_modules/@typescript-eslint/parser/dist/parser.js:129:42)
    at parse (/projects/node-shximw/node_modules/eslint/lib/linter/linter.js:655:22)
    at Linter._verifyWithoutProcessors (/projects/node-shximw/node_modules/eslint/lib/linter/linter.js:1129:33)
    at Linter._verifyWithConfigArray (/projects/node-shximw/node_modules/eslint/lib/linter/linter.js:1273:21)
    at Linter.verify (/projects/node-shximw/node_modules/eslint/lib/linter/linter.js:1228:25)
    at Linter.verifyAndFix (/projects/node-shximw/node_modules/eslint/lib/linter/linter.js:1420:29) +687ms
  eslint:linter Generating fixed text for /projects/node-shximw/index.ts (pass 1) +0ms
  eslint:source-code-fixer Applying fixes +0ms
  eslint:source-code-fixer shouldFix parameter was false, not attempting fixes +0ms
  eslint:file-enumerator Complete iterating files: ["index.ts"] +1s
  eslint:cli-engine Linting complete in: 1234ms +688ms

/projects/node-shximw/index.ts
  0:0  error  Parsing error: Invalid value for lib provided: es2021.string

✖ 1 problem (1 error, 0 warnings)

Versions

package version
@typescript-eslint/scope-manager 4.25.0
TypeScript 4.3.2
node 14.16.0
@dylang dylang added package: scope-manager Issues related to @typescript-eslint/scope-manager triage Waiting for maintainers to take a look labels May 27, 2021
@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for maintainers to take a look labels May 27, 2021
@karlhorky
Copy link

For anyone looking for a temporary workaround to this, downgrade typescript to version 4.2.4.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: scope-manager Issues related to @typescript-eslint/scope-manager
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants