eslint issues with TypeScript > 5.1.0

Originally written on 2023-08-03

If you’re working on TypeScript code with eslint and you’re using/extending standard-with-typescript in your config you may have run into this issue:

Error: .eslintrc.cjs » eslint-config-standard-with-typescript:
Configuration for rule "@typescript-eslint/restrict-plus-operands" is invalid:
Value {"checkCompoundAssignments":true} should NOT have additional properties.

This issue sucks and is confusing but here’s the fix:

  • Downgrade @typescript-eslint/eslint-plugin and @typescript-eslint/parser to 5.60.1
  • If your TypeScript version is greater than 5.1.0 you’ll need to downgrade that to something less than 5.1.0. When I wrote this post the highest version option was 5.0.4