Skip to content

chore: update to eslint 9 #672

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

Merged
merged 5 commits into from
Mar 17, 2025
Merged

chore: update to eslint 9 #672

merged 5 commits into from
Mar 17, 2025

Conversation

fedeericodl
Copy link
Member

@fedeericodl fedeericodl commented Mar 3, 2025

This pull request includes a major version upgrade to ESLint and some minor code improvements. The primary focus is on migrating to the new ESLint flat config, updating dependencies, and improving TypeScript type safety. Thanks to this change we leave the config dependency we have relied on in these years, now allowing greater control on it.

  • Removed old ESLint configuration files (.eslintignore and .eslintrc.yml) and replaced them with the new standard flat config with eslint.config.mjs. Most of the rules from the dependency have been ported to the new config to keep the current style of the repository as close as possible before this change. This new configuration includes recommended settings for ESLint, TypeScript, and React (added new), along with specific rules for various file types. In some specific cases comments have been added to ignore some linter rules, most of them are about no-unnecessary-condition. It's better to keep it enabled and disable it occasionally in very specific cases where it is necessary to keep the condition unnecessary.
  • Updated dependencies, and order the keys properly in the package.json. The package manager version was also updated from pnpm 9.x to pnpm 10.x.
  • Improved type safety in various scripts, such as scripts/build-bin.mts, scripts/inject/checks/env.mts, and scripts/inject/index.mts.
  • Minor refactoring and cleanup of code to improve readability and maintainability.

@fedeericodl fedeericodl added refactor semver: none This is an internal change and doesn't affect anything in the release labels Mar 3, 2025
Copy link

netlify bot commented Mar 3, 2025

Deploy Preview for replugged-docs failed.

Name Link
🔨 Latest commit f6e82ee
🔍 Latest deploy log https://app.netlify.com/sites/replugged-docs/deploys/67c76cfbc41206000880902a

@fedeericodl
Copy link
Member Author

Need to wait for a new node.js v20 version that fixes corepack issues. It should be out in a few days.

@fedeericodl fedeericodl marked this pull request as ready for review March 13, 2025 19:50
@fedeericodl
Copy link
Member Author

Updated node and checks passed. PR out of draft.

@fedeericodl fedeericodl merged commit 8aa1254 into main Mar 17, 2025
14 checks passed
@fedeericodl fedeericodl deleted the eslint-9 branch March 17, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor semver: none This is an internal change and doesn't affect anything in the release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants