Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

parser.createProgram is not being exported #3514

Closed
Labels
fix: user errorissue was fixed by correcting the configuration / correcting the codepackage: parserIssues related to @typescript-eslint/parser
@rdsedmundo

Description

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

  1. mkdir typescript-eslint-bug-no-createprogram
  2. yarn init -y
  3. yarn add eslint @typescript-eslint/parser
  4. Checknode_modules/@typescript-eslint/parser exports contents.

Attached screenshots at the bottom.

Expected Result

Should be exported.

Actual Result

I tried to use insideeslintrc.js and it threw saying thatparser.createProgram is not defined.

Additional Info

I tried to import from@typescript-eslint/typescript-estree as well and got the same result.

Versions

packageversion
@typescript-eslint/parser4.26.1
TypeScript4.3.2
ESLint7.28.0
node14.17.0

Screen Shot 2021-06-11 at 16 12 22

Notice on this file above how it's missing a third import but still has a trailing comma,for some reasoncreateProgram is getting stripped from there.

export{parse,parseForESLint,ParserOptions}from'./parser';export{ParserServices,clearCaches,}from'@typescript-eslint/typescript-estree';exportdeclareconstversion:string;//# sourceMappingURL=index.d.ts.map

Screen Shot 2021-06-11 at 16 12 40

"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=exports.clearCaches=exports.parseForESLint=exports.parse=void0;varparser_1=require("./parser");Object.defineProperty(exports,"parse",{enumerable:true,get:function(){returnparser_1.parse;}});Object.defineProperty(exports,"parseForESLint",{enumerable:true,get:function(){returnparser_1.parseForESLint;}});vartypescript_estree_1=require("@typescript-eslint/typescript-estree");Object.defineProperty(exports,"clearCaches",{enumerable:true,get:function(){returntypescript_estree_1.clearCaches;}});// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder// eslint-disable-next-line @typescript-eslint/no-unsafe-assignmentexports.version=require('../package.json').version;//# sourceMappingURL=index.js.map

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix: user errorissue was fixed by correcting the configuration / correcting the codepackage: parserIssues related to @typescript-eslint/parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp