-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: upgrade plugin to v9 #23
Conversation
6a610cb
to
52a861d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impressive changes! 🤯
I mostly have questions nothing major
src/rules/comment-syntax.ts
Outdated
@@ -155,7 +154,7 @@ export default createRule<Options, MessageIds>({ | |||
context.report({ node: comment, messageId: 'lineCommentCapital' }); | |||
} | |||
|
|||
if (lastChar === '.') { | |||
if (lastChar === '.' && !comment.value.endsWith('etc.') && !comment.value.endsWith(' ...')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woo that's a nice improvements 🤌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea indeed. Was annoying that this wasn't allowed cause it's pretty usual to have that.
"@typescript-eslint/eslint-plugin": "^8.0.0-alpha.30", | ||
"@typescript-eslint/parser": "^8.0.0-alpha.30", | ||
"@typescript-eslint/utils": "^8.0.0-alpha.30", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need the alpha versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea unfortunately we do need them because only those support the new flat config format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I talked to James Henry and they will release the real version very soon, since it's already a release candidate.
src/configs/javascript.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know if those rules pass on every project that we own that uses this package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the exact same rules as before only pulled into a separate file. But I can check tomorrow if if works on some other projects as well and can come back with my findings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing how many files were changed on the TutorialKit repo, I feel like we should merge this ASAP (as well as the one in TutorialKit) and feedback in here can be addressed in future PRs.
Otherwise it'll be an endless series of fixing conflicts on the TutorialKit side 😓
Either that or we publish an "alpha" version of that branch that we use on the TutorialKit side.
What do you think @d3lm?
I mean all those changes in the TK repo are just because it didn't meet our conventions defined in our plugin but it's not specific to the upgrade to eslint v9. But yea, we can release an alpha if you prefer that. I think you didn't have any comments to be addressed other than if we know whether it works on other projects. I do think that it should work because there's no new rules added here and it's just upgrading to a newer version of eslint but worth checking! With a pre-release or alpha we can do that testing and fix any bugs that we encounter along the way. It will be an iterative approach anyways so we can upgrade the repos we have one by one if we want to and it shouldn't be a big bang. |
Oh I was referring to other reviewers of this PR. If we want for everyone else to have reviewed it and have their feedback addressed before merging, then I think it would make sense to have an alpha version so that we can move forward on the eslint PR on the TutorialKit repo. Or we just merge it, release a new version and address the feedback as follow-up PRs which works fine with me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
pnpm-lock.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason for the switch to pnpm
? is it just performance or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only did that switch since we started to use pnpm in other repos as well and it's a little faster than other package managers and the more repos use pnpm the less disk space is consumed cause it uses symlinks to the global store. But if anyone feels strongly about one or the other then I am happy to discuss and potentially revert back. But yarn v1 is just unmaintained at this point and I wanted to switch to something that is maintained yet gives us good ergonomics and performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have a preference for consistency, rather than some specific package manager.
This is the first time I've seen it used and it seemed a bit random considering we already use npm
and yarn
elsewhere, but if we're moving to repos pnpm
generally that's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I think we gotta decide on what we wanna use going forward. TutorialKit uses pnpm and it was chosen because it's gonna be open source and because we maintain a good partnership with the open source community / the Vite ecosystem. But I am a 100% with you on consistency! We gotta decide, but I would personally wanna move away from yarn v1 cause it's unmaintained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, pnpm has the better workspace support I'd say and gives more options and flexibility in the way it can be configured compared to npm.
Oh but you did ping me, unless I misinterpreted that 🙉 |
Oh I get it now 😅 |
But I am fine either way. We can definitely go with an alpha version for now if we want that. I don't have a strong opinion on this one. |
I just tested the new version on our registry proxy and it worked well and caught some issues even. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on upgrading this 🙏 !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
3c4e8d6
to
5fe5bba
Compare
Ok, I merged #24 and merged |
This PR updates our eslint plugin and migrates from v8 to v9. This includes some breaking changes specifically around the config since v9 introduced a flat config file format.
I have also improved some of our custom lint rules and fixed a few bugs and did a bunch of cleanup.
Furthermore, I got rid of
yarn
in favor of usingpnpm
.I also added CI via GitHub Actions which now build, lint, and test the project.
For the version I went with a new minor version since we can't just use another minor version. That's because using this updated plugin requires to update the config on the consumer side as well.