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

Support typescript new syntax override #3447

Closed
3 tasks done
Innei opened this issue May 25, 2021 · 7 comments
Closed
3 tasks done

Support typescript new syntax override #3447

Innei opened this issue May 25, 2021 · 7 comments
Labels
fix: out of date packages user was on an old version of our tooling or ESLint, updating fixed it package: parser Issues related to @typescript-eslint/parser

Comments

@Innei
Copy link

Innei commented May 25, 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

Can't parse override syntax. Like this.

image

Expected Result

parse override syntax.

Actual Result

Parsing error: ';' expected. eslint

Additional Info

Parsing error: ';' expected. eslint

Versions

package version
@typescript-eslint/parser 4.25.0
TypeScript 4.4-dev
ESLint 7.26.0
node 14
@Innei Innei added package: parser Issues related to @typescript-eslint/parser triage Waiting for maintainers to take a look labels May 25, 2021
@Innei Innei changed the title don't support typescript new syntax override Support typescript new syntax override May 25, 2021
@bradzacher
Copy link
Member

We do support #3429 as of v4.25.0

If it's not working for you then likely your installed version is wrong.

@bradzacher bradzacher added awaiting response Issues waiting for a reply from the OP or another party and removed triage Waiting for maintainers to take a look labels May 25, 2021
@Innei
Copy link
Author

Innei commented May 26, 2021

Thank you for your reply. I just remove node_modules and re-install. It worked.

@Innei Innei closed this as completed May 26, 2021
@bradzacher bradzacher added fix: out of date packages user was on an old version of our tooling or ESLint, updating fixed it and removed awaiting response Issues waiting for a reply from the OP or another party labels May 26, 2021
@akphi
Copy link

akphi commented Jun 7, 2021

@bradzacher Thank you so much for the work! I know this validation has been handled by Typescript, is there a plan to implement a rule in typescript-eslint so we can make use of auto-fix?

We have a fairly large codebase and would like to turn on the flag --noImplicitOverride but there's currently no programmatic way to add override to all places which need it.

@bradzacher
Copy link
Member

It's a language feature which causes errors in TS. There's no lint rule to implement.

If you want to turn it on in your project - you can script up a codemod for your codebase.
There are examples over the web of using the TS APIs to get the diagnostics, and there are other examples of using tools (like jscodeshift) to make code changes.

@akphi
Copy link

akphi commented Jun 7, 2021

@bradzacher 🙏 thank you so much for clarifying!

@bradzacher
Copy link
Member

@akphi please make sure you check who you're tagging so that you tag the correct user.
or else you're sending spam notifications to someone else.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fix: out of date packages user was on an old version of our tooling or ESLint, updating fixed it package: parser Issues related to @typescript-eslint/parser
Projects
None yet
Development

No branches or pull requests

3 participants