Skip to content

Conversation

@43081j
Copy link

@43081j 43081j commented Dec 27, 2024

Upgrades ESLint and moves to the new flat config style.

Also fixes up some newly found lint errors/warnings and enables TSESLint's strict config.

I was roaming around the repo so figured I'd do this while I'm in there. if you don't want it, all good just let me know and we can close this 👍

Notes

  • Locally, for whatever reason, npm run build:ts fails with a lot of errors. is that known to be broken? (in main)
  • Do we need our own full blown config still? maybe we could use the recommended configs from ESLint, stylistic and tseslint
  • could we introduce a formatter like prettier or dprint, and drop stylistic?

@netlify
Copy link

netlify bot commented Dec 27, 2024

Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit f51c42d
🔍 Latest deploy log https://app.netlify.com/projects/colorjs/deploys/694ee3565ae415000807f6df
😎 Deploy Preview https://deploy-preview-625--colorjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@LeaVerou
Copy link
Member

Hi there, sorry this slipped through the cracks. Looks like it's now in need of rebasing. Is the change still current?

@43081j
Copy link
Author

43081j commented Dec 26, 2025

no worries, this should be caught up now 👍

since we use prettier for all formatting, the pr is a lot simpler now

@LeaVerou
Copy link
Member

Thanks! If it wouldn't be too much hassle, would you mind separating the Prettier run from the substantive changes to the config? Currently the commit log will display all of them under the commit "chore: upgrade to eslint 9.x". Fine to just separate into two commits in this PR, then we can just rebase instead of squashing when merging.

@43081j
Copy link
Author

43081j commented Dec 26, 2025

should be sorted 👍

@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker for this PR, but I'd consider removing this ESLint rule so we don't have to do this.

Copy link
Member

@LeaVerou LeaVerou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again! LGTM but someone who has worked more with types like @MysteryBlokHed should also review this.

Upgrades to ESLint 9 and uses flat config rather than `.eslintrc`.
Runs prettier against `types/` which seemed to have previously been left
unformatted.
Copy link
Member

@MysteryBlokHed MysteryBlokHed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants