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

XO and Prettier fighting over @typescript-eslint/no-implicit-any-catch #500

Closed
luludotdev opened this issue Oct 18, 2020 · 1 comment · Fixed by #505
Closed

XO and Prettier fighting over @typescript-eslint/no-implicit-any-catch #500

luludotdev opened this issue Oct 18, 2020 · 1 comment · Fixed by #505

Comments

@luludotdev
Copy link
Contributor

xo v0.34.0 added the new rule @typescript-eslint/no-implicit-any-catch, but when running with Prettier enabled, Prettier will try and remove all type annotations on catch clause variables.

This is due to Prettier v2.0.x not having support for TypeScript 4, but xo v0.34.0 does. Upgrading to Prettier v2.1.x should solve the problem.

@luludotdev
Copy link
Contributor Author

To anyone else having this issue, you can use Yarn resolutions to apply a temporary fix. Add the following to your package.json and reinstall packages.

"resolutions": {
  "xo/prettier": "^2.1.2"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant