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
Parsing error: The keyword 'export' is reserved #1464
Comments
This comment has been minimized.
This comment has been minimized.
@armano2 - our parser doesn't actually respect this parserOption - typescript has its own logic for determining this. could you please run your lint run with the |
after reviewing your source code there is issue in name of your eslint config. eslint . --ext .js,.jsx,.ts,.tsx -c .eslint.js
#or
eslint . --ext .js,.jsx,.ts,.tsx --config .eslint.js ^ @bradzacher you are correct, parser itself does not use this field but its used in rules and scope analysis (i'm keep forgetting about this) |
Oh god, such a stupid mistake. I'm sorry! @armano2 @bradzacher thank you very much! |
What code were you trying to parse?
I'm trying to use
typescript-eslint
, and I followed the Getting Started page. Unfortunately, I'm having problems to make the parser identify very basic TypeScript/JS keywords, likeexport
.Please see https://github.com/flisboac/ts-promise-scheduler for the project in question. The error is:
My
.eslint.js
is configured as such:And here are the first lines of the affected file
What did you expect to happen?
To accept
export
as a keyword, as per named/defaultexport
in TypeScript and the ES6+ standards, in the context of exporting declarations.What actually happened?
export
seems to be identified as a reserved name, regardless of context. Parsing fails.Versions
Disclaimer:I'm using
yarn
.@typescript-eslint/parser
2.16.0
TypeScript
3.7.4
ESLint
6.8.0
node
12.13.0
npm
6.12.0
yarn
1.21.1
Output of
yarn versions`:Output of
yarn list
:The text was updated successfully, but these errors were encountered: