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

Add support for @typescript-eslint version 6.x.x #1188

Closed
jerome-benoit opened this issue Jul 18, 2023 · 12 comments
Closed

Add support for @typescript-eslint version 6.x.x #1188

jerome-benoit opened this issue Jul 18, 2023 · 12 comments
Labels

Comments

@jerome-benoit
Copy link
Contributor

What version of this package are you using?

36.1.0

What problem do you want to solve?

Crash at running the linter:

ESLint: 8.45.0

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

    at ConfigValidator.validateRuleOptions (/Users/I339261/SAPDevelop/poolifier-git/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2039:23)
    at /Users/I339261/SAPDevelop/poolifier-git/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2094:18
    at Array.forEach (<anonymous>)
    at ConfigValidator.validateRules (/Users/I339261/SAPDevelop/poolifier-git/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2091:34)
    at ConfigValidator.validateConfigArray (/Users/I339261/SAPDevelop/poolifier-git/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2217:18)
    at CascadingConfigArrayFactory._finalizeConfigArray (/Users/I339261/SAPDevelop/poolifier-git/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3974:23)
    at CascadingConfigArrayFactory.getConfigArrayForFile (/Users/I339261/SAPDevelop/poolifier-git/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3780:21)
    at FileEnumerator._iterateFilesRecursive (/Users/I339261/SAPDevelop/poolifier-git/node_modules/.pnpm/eslint@8.45.0/node_modules/eslint/lib/cli-engine/file-enumerator.js:450:49)
    at _iterateFilesRecursive.next (<anonymous>)
    at FileEnumerator.iterateFiles (/Users/I339261/SAPDevelop/poolifier-git/node_modules/.pnpm/eslint@8.45.0/node_modules/eslint/lib/cli-engine/file-enumerator.js:299:49)
@mightyiam
Copy link
Owner

Is this still an issue, please? May I see the output of npm ls, please?

@jerome-benoit
Copy link
Contributor Author

jerome-benoit commented Jul 22, 2023

Yes. To reproduce, you just need to install

"eslint": "^8.45.0",
"eslint-config-standard-with-typescript": "^36.1.0",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",

in a dummy app, configure eslint with documented defaults for eslint-config-standard-with-typescript and @typescript-eslint and run the linter.

@karolyi
Copy link

karolyi commented Jul 22, 2023

37.0.0 didn't fix this, as I thought it would from the major version bump:

npm ERR! Found: @typescript-eslint/eslint-plugin@6.1.0
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR!   dev @typescript-eslint/eslint-plugin@"^6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @typescript-eslint/eslint-plugin@"^5.52.0" from eslint-config-standard-with-typescript@37.0.0
npm ERR! node_modules/eslint-config-standard-with-typescript  
npm ERR!   dev eslint-config-standard-with-typescript@"^37.0.0" from the root project

@Jayprecode
Copy link

Are there any fixes for this error, i'm also facing the same issue

@Jayprecode
Copy link

Jayprecode commented Jul 23, 2023

37.0.0 didn't fix this, as I thought it would from the major version bump:

npm ERR! Found: @typescript-eslint/eslint-plugin@6.1.0
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR!   dev @typescript-eslint/eslint-plugin@"^6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @typescript-eslint/eslint-plugin@"^5.52.0" from eslint-config-standard-with-typescript@37.0.0
npm ERR! node_modules/eslint-config-standard-with-typescript  
npm ERR!   dev eslint-config-standard-with-typescript@"^37.0.0" from the root project

Hi karolyi, were you able to resolve this?

@karolyi
Copy link

karolyi commented Jul 23, 2023

Hi karolyi, were you able to resolve this?

Yes, by downgrading the required packages.

@mightyiam
Copy link
Owner

This project doesn't support typescript-eslint v6 yet. Your package manager should be telling you that.

Also, supporting it seems non-trivial. So it may take a while.

@Mist3rBru
Copy link

To workaround this issue, install the fallowing packages at v5:

npm install -D @typescript-eslint/eslint-plugin@5 @typescript-eslint/parser@5

@retrixe
Copy link

retrixe commented Aug 17, 2023

With Yarn v2+'s yarn patch eslint-config-standard-with-typescript I was able to get this config working with TypeScript ESLint v6, see here for the patch https://github.com/retrixe/ecthelion/blob/main/.yarn/patches/eslint-config-standard-with-typescript-npm-37.0.0-e24fa6a048.patch

Presumably npm patch-package can do this for you as well.

@jerome-benoit
Copy link
Contributor Author

@retrixe: please do a pull request on that repo including the code changes in the patch.
The package maintainer(s) as well as their users will be thankful to you for having made the groundwork to start supporting @typescript-eslint version 6.x.x

@retrixe
Copy link

retrixe commented Aug 17, 2023

@retrixe: please do a pull request on that repo including the code changes in the patch. The package maintainer(s) as well as their users will be thankful to you for having made the groundwork to start supporting @typescript-eslint version 6.x.x

👍 #1222

standard-cd-bot bot pushed a commit that referenced this issue Aug 20, 2023
## [38.0.0](v37.0.0...v38.0.0) (2023-08-20)

### ⚠ BREAKING CHANGES

* minimum @typescript-eslint packages bumped to v6.1.0
* there will be some

### Build system / dependencies

* bump package-lock.json on release ([d42bf5b](d42bf5b))
* moduleResolution: nodenext ([1f31e2b](1f31e2b))
* package-lock.json ([b3a6535](b3a6535)), closes [#1193](#1193)
* shared commitlint config ([bdd6e2d](bdd6e2d))
* use extracted releaserc ([877b004](877b004))

### Features

* [@typescript-eslint](https://github.com/typescript-eslint) 6 ([166e189](166e189))
* bump minimum [@typescript-eslint](https://github.com/typescript-eslint) to v6.1.0 ([77202d1](77202d1)), closes [#1222](#1222) [#1188](#1188)
@standard-cd-bot
Copy link

🎉 This issue has been resolved in version 38.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

6 participants