Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
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
mkdir typescript-eslint-bug-no-createprogram
yarn init -y
yarn add eslint @typescript-eslint/parser
- Check
node_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
package | version |
---|---|
@typescript-eslint/parser | 4.26.1 |
TypeScript | 4.3.2 |
ESLint | 7.28.0 |
node | 14.17.0 |
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
"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