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

Error from @typescript-eslint/restrict-plus-operands #764

Closed
skernke opened this issue Jul 12, 2023 · 3 comments
Closed

Error from @typescript-eslint/restrict-plus-operands #764

skernke opened this issue Jul 12, 2023 · 3 comments
Assignees
Labels

Comments

@skernke
Copy link

skernke commented Jul 12, 2023

When i try to execute the linting with the latest version("eslint-config-hardcore": "39.0.3") i get this error:

eslint -c index.js "**/*.{ts,js,json}"
Oops! Something went wrong! :(
ESLint: 8.44.0
Error: --config » eslint-config-hardcore/ts#overrides[0]:
Configuration for rule "@typescript-eslint/restrict-plus-operands" is invalid:
Value {"checkCompoundAssignments":true} should NOT have additional properties.

To solve this in the ts.json
"@typescript-eslint/restrict-plus-operands": [ "error", { "checkCompoundAssignments": true } ],

has to be changed to:

"@typescript-eslint/restrict-plus-operands": [ "error", { "skipCompoundAssignments": true } ],
That's because here it was renamed:
https://github.com/typescript-eslint/typescript-eslint/pull/7027/files#diff-d55493d092b68ed80a3d5042f6153bc31def048d0ac5e9efc3987abaf075d159

@EvgenyOrekhov
Copy link
Owner

Not sure how your setup ended up using TypeScript ESLint v6, because eslint-config-hardcore does not support TypeScript ESLint v6 yet (npm should give a dependency conflict warning). Have to wait for jest-community/eslint-plugin-jest#1398

@voxpelli
Copy link

Probably because typescript-eslint isn't specified as a peer dependency and as such the version specified by this module is not the guaranteed one to be found by eslint

Flat configs will solve this I think

@EvgenyOrekhov EvgenyOrekhov self-assigned this Jul 26, 2023
@EvgenyOrekhov
Copy link
Owner

Should be fixed in v41.0.0

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

No branches or pull requests

3 participants