-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
refactor(eslint)!: Prepare eslint for rollup 3 and upgrade eslint to newest version #1236
Conversation
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.
Nice work, thanks for taking this on.
I'd also like to update the engines
in package.json https://github.com/rollup/plugins/pull/1236/files#diff-83ca08b9de9168d7d59366dc40f4e5a4590a7645790563ad6c9fbb9699e053a1R18-R20 to >= 14
so we're in line with LTS.
@shellscape I will update the readme and the engine. Quick question about working with pnpm, I noticed there were a ton of changes to the pnpm-lock.yaml and I didn't want to commit some of them (things like the image below). Should I just not worry about those and commit all changes to that file? |
Good eye. Those are because we're still on the lockfile format from pnpm v6.34.0. I have it on my list to update that, but haven't gotten around to it yet. You'll want to use pnpm v6.34.0 to update the lockfile (run |
Looks like you might need to run |
You're going down the rabbit hole now. There may be a version conflict between the version of eslint installed for the repo, and the version installed for the rollup eslint plugin. We're hoisting eslint in the monorepo to make it work correctly across all the projects. The version installed for the repo is a direct dep of https://github.com/rollup/eslint-config-rollup/blob/master/package.json#L28. I'll update that later today and we'll try running CI here again |
yeah it looks like it is because |
Yeah I'll get that updated. It's about time anyhow |
Turns out my editor has a plugin that doesn't support ESLint v8 so I'm working on fixing that now. Then I'll get our eslint config updated, update master, and then you can rebase from upstream. I'll keep you posted. |
Updating ESLint nuked my editor (Atom) ability to format on the fly, so now I'm trying to fix an abandoned prettier-atom plugin lol. Rabbit hole. |
Tried to fix the config issues in your fork, but it's going to require a master branch fix. Will keep you posted. |
@shellscape seems like I have cursed you 😅 if you want I can work on updating the |
@shellscape checking back in, anything I can do to help out with upgrading |
I ran into a major hurdle with my editor (Atom. I know, I know) and the linter plugins and ESLint v8 that I'm still trying to resolve. Planning on getting back to that soon. |
OK got everything working. Now, it gets dicey how this has to happen. Because of the hoisting of ESLint, we need to update the dependency only on the eslint rollup plugin in |
@shellscape I know you are probably quite busy so I don't want to bother you too much, but let me know if there is any step of the above process I can help with to make it smoother, would love to unblock this |
I still have this on my radar, not to worry |
@shellscape anything I can do to help out? |
Thanks for checking in. I haven't lost track of this yet, not to worry. |
Hi! I just created a bunch of PRs to update all plugins for Rollup 3. These will be major version bumps as we explicitly drop Node < 14 compatibility. It would be nice if we could merge the ESLint PR with yours. It so happens that the repo ESLint issues should be solved now as well as I also updated the Repo-wide ESLint version in the process. I also wanted to update all plugin dependencies but actually happened to give up on this one 😱 Suggestion:
If you do that, then I will close #1296 and merge your PR instead together with the other PRs in the next days. |
@lukastaegert i will go ahead and take care of all that on Monday morning EST, thank you! |
Prior to these changes, the eslint plugin was using an older version of eslint that relied on a class called CLIEngine. In newer versions this has now been deprecated and so upgrading versions required also updating to using ESLint internally instead. Ultimately this doesn't change the usage of the plugin but some of the option names have changed for ESLint (notably configFile needs to change to overrideConfigFile). The main driving factor for this change is to prevent conflicts that happen when using @rollup/plugin-typescript and this plugin together. Without this update, eslint would run on the transpiled code and so the error messages weren't as helpful. This update will allow the two plugins to work well together and provide helpful information about errors and warnings. This change also includes some necessary package updates to prepare eslint for Rollup 3. BREAKING CHANGES: - options structure has changed due to moving from CLIEngine t ESlint. Review the new supported options below: https://eslint.org/docs/latest/developer-guide/nodejs-api#-new-eslintoptions - requires Node 14
f34d299
to
df363d8
Compare
@lukastaegert I have gone ahead and done all of the requested rebases and merges, let me know if everything looks alright or if there are any other requested changes. |
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 great! Happy to merge this in the next days.
[npm]: https://img.shields.io/npm/v/@rollup/plugin-eslint | ||
[npm-url]: https://www.npmjs.com/package/@rollup/plugin-eslint | ||
[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-eslint | ||
[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-eslint |
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.
Ooops...
@lukastaegert it looks like this auto closed since you deleted the base branch maybe, is there something else you need me to do here? |
Damn it, I hoped it would just change your target branch to master as I merged the original branch into master. Can you somehow reopen the PR and point it to master instead? Apparently, it worked for all other PRs pointing to that branch except yours, maybe this does not work for PRs from forks. |
yeah, I will rebase real quick but I will probably need to open a new PR since it won't let me change base on this one |
Github doesn't like it when you delete target branches for open PRs, it chokes and dies |
Thanks so much |
Ok, auto-publish did not work, probably because |
Rollup Plugin Name:
plugin-eslint
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Prior to these changes, the eslint plugin was using an older
version of eslint that relied on a class called CLIEngine.
In newer versions this has now been deprecated and so upgrading
versions required also updating to using ESLint internally
instead. Ultimately this doesn't change the usage of the plugin
but some of the option names have changed for ESLint (notably
configFile needs to change to overrideConfigFile).
The main driving factor for this change is to prevent conflicts
that happen when using @rollup/plugin-typescript and this plugin
together. Without this update, eslint would run on the transpiled
code and so the error messages weren't as helpful. This update
will allow the two plugins to work well together and provide
helpful information about errors and warnings.
This work is also preparing eslint for the move to rollup 3 through
various package version updates.
BREAKING CHANGES:
https://eslint.org/docs/latest/developer-guide/nodejs-api#-new-eslintoptions
This work is also based on this abandoned pr: #663