Skip to content

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

Closed
@dylang

Description

@dylang
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: scope-managerIssues related to @typescript-eslint/scope-manager

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions