lasselupe33 / eslint-plugin-comment-length

MIT License
13 stars 3 forks source link

Support ESLint v9 #10

Open jaydenseric opened 1 month ago

jaydenseric commented 1 month ago

This dependency needs updating:

https://github.com/lasselupe33/eslint-plugin-comment-length/blob/1a381d6159f4b970e1091c7be04dde8cbcd1a3ff/rules/package.json#L30-L32

Otherwise, you can see problems like this when running npm ls eslint in a project with ESLint v9 setup:

npm error code ELSPROBLEMS
npm error invalid: eslint@9.2.0 [redacted]/node_modules/eslint
[redacted]
├─┬ eslint-plugin-comment-length@1.7.3
│ ├─┬ @typescript-eslint/utils@6.21.0
│ │ └── eslint@9.2.0 deduped invalid: "^7.0.0 || ^8.0.0" from node_modules/eslint-plugin-comment-length/node_modules/@typescript-eslint/utils
│ └── eslint@9.2.0 deduped
├─┬ eslint-plugin-jsdoc@48.2.4
│ └── eslint@9.2.0 deduped
├─┬ eslint-plugin-optimal-modules@2.0.0
│ └── eslint@9.2.0 deduped
├─┬ eslint-plugin-simple-import-sort@12.1.0
│ └── eslint@9.2.0 deduped
├─┬ eslint@9.2.0
│ └─┬ @eslint-community/eslint-utils@4.4.0
│   └── eslint@9.2.0 deduped invalid: "^7.0.0 || ^8.0.0" from node_modules/eslint-plugin-comment-length/node_modules/@typescript-eslint/utils
└─┬ typescript-eslint@8.0.0-alpha.12
  ├─┬ @typescript-eslint/eslint-plugin@8.0.0-alpha.12
  │ └── eslint@9.2.0 deduped invalid: "^7.0.0 || ^8.0.0" from node_modules/eslint-plugin-comment-length/node_modules/@typescript-eslint/utils
  ├─┬ @typescript-eslint/parser@8.0.0-alpha.12
  │ └── eslint@9.2.0 deduped invalid: "^7.0.0 || ^8.0.0" from node_modules/eslint-plugin-comment-length/node_modules/@typescript-eslint/utils
  └─┬ @typescript-eslint/utils@8.0.0-alpha.12
    └── eslint@9.2.0 deduped invalid: "^7.0.0 || ^8.0.0" from node_modules/eslint-plugin-comment-length/node_modules/@typescript-eslint/utils

I'm not sure why @typescript-eslint/utils is a dependency; it seems like a good idea to avoid it in a plugin that's intended to be used in either TypeScript or non-TypeScript projects. It introduces all sorts of complexity.

yf-yang commented 1 week ago

Related: https://github.com/lasselupe33/eslint-plugin-comment-length/issues/12 That package (specifically typescript eslint parser) is used for checking comments with code.

lasselupe33 commented 1 week ago

As mentioned by @yf-yang, typescript-eslint is used in several cases by this plugin. It might be possible to avoid this dependency altogether, which I will examine in the near future.

However, as typescript-eslint is also used to improve DX, I'd prefer waiting for typescript-eslint v8 to be released (currently in alpha), so that I can batch ESLint v9 support into a single run as I've got limited time to actively maintain this plugin. Fingers crossed that this will happen soon.

If no updates are seen within the next couple of weeks I might reconsider. :)

christopher-buss commented 1 week ago

Just to add, the roadmap for v8 can be found here. The earliest v8 should be ready is around July, with the latest timeframe around September.