solidjs-community / eslint-plugin-solid

Solid-specific linting rules for ESLint.
MIT License
206 stars 24 forks source link

Support for eslint 9.0.0 #137

Open AlbertSabate opened 3 months ago

AlbertSabate commented 3 months ago

Describe the need ESLint 9.0.0 has been released as stable.

Currently, the ESlint version of this package is pointing to version 8.43.0, which has many deprecation notices for version 9.0.0.

This version updates the code to prevent using deprecated fn from version 8.x and start using the new fns of 9.x

The version has been updated to 8.56.0 and migrated to a non-deprecated FNS.

ESLint has not been bumped to version 9, as many changes are required to maintain backward compatibility. However, the package works well in the new version.

Tests are passing. And I tested a bit on my end. This is not a guarantee that I did not break anything. And Code reviews will be really appreciated :)

Note that the package has been bumped to 0.14.0.

Suggested Solution Make it work

Possible Alternatives NA

Additional context

https://github.com/solidjs-community/eslint-plugin-solid/pull/136

AlbertSabate commented 2 months ago

Hello @suiyun39, for you reference I've opened the PR https://github.com/solidjs-community/eslint-plugin-solid/pull/136 in regards of this issue, maybe you can continue from that branch if you want to amend anything? Will save you some hours of work :)

suiyun39 commented 2 months ago

@AlbertSabate

Thanks for reminding, that reference is only for tracking: when can upgrade my eslint config package to eslint 9.0.0.

At the same time, I'd be happy to make some contributions to this project. But at the moment, I don't know the guidelines for this update. For example, should new version be compatible with eslint 8.x? We should create a minor version or major version?

AlbertSabate commented 2 months ago

I would love to know it also. Maybe @joshwilsonvu can answer that? And let us know next steps?

In the meanwhile, for your reference, you can use the following with eslint 9.0.0 compatible using this in your package.json:

"eslint-plugin-solid": "git://github.com/AlbertSabate/eslint-plugin-solid#06897bafb97bd31f4021bafb124badcf4589ba58",

You can code review the changes on that commit.

joshwilsonvu commented 2 months ago

Hello, thank you all for taking the reins on this so far. (Started a new job recently and have been busy 🙂)

Currently, the plugin is tested with ESLint v8 down to v6. From what I understand, the breaking changes in ESLint v9 are fairly minor for plugin authors. I don't see a compelling reason to drop support for any old versions, until it becomes difficult to pass tests for those versions while supporting the newest version.

Re: versioning, since we're still in v0.x, it technically doesn't matter too much, but adding support for v9 would count as a new feature and could go in a minor. I may take the opportunity to release a v1 major version bump (without breaking changes) once the current batch of PRs and issues are resolved. The pace of rapid changes has slowed enough for that to make sense to me, and I think big changes to reactivity can wait until a v2.

I intend to do as much of that as I can tomorrow, and make a few infra updates soon to make releases a less manual, time-intensive process. I'm very thankful for all the community involvement and would like to make this project more collaborative, so that I'm less of a bottleneck.

pauliesnug commented 2 months ago

v9 support was added to eslint-plugin-solid in https://github.com/solidjs-community/eslint-plugin-solid/pull/140, with https://github.com/solidjs-community/eslint-plugin-solid/pull/141 awaiting a peer dependency update

Borber commented 1 month ago

When can it be released?

Crazytieguy commented 2 weeks ago

It looks like the build failed due to the lint script failing:

> eslint --ext .js,.jsx,.ts,.tsx --ignore-pattern test/fixture/invalid . "--max-warnings=0"

Invalid option '--ext' - perhaps you meant '-c'?
You're using eslint.config.js, some command line flags are no longer available. Please see https://eslint.org/docs/latest/use/command-line-interface for details.
 ELIFECYCLE  Command failed with exit code 2.
pauliesnug commented 2 weeks ago

@Crazytieguy @Borber It was just released in the latest 4 commits, including v9 and flat config support

joshwilsonvu commented 2 weeks ago

Yes--v9 support was released in v0.14.0! This v0.14.1 release just fixes the peer dependency and makes some internal updates to use ESLint v9, which don't affect users.