Skip to content
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: upgrade ESLint and migrate its plugins to v9 #3456

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

wellwelwel
Copy link
Collaborator

@wellwelwel wellwelwel commented Mar 5, 2025

Here's the popular PR with thousands of changed lines 😅

There is no change in the actual files, except for ESLint applying the auto fixes, including Prettier's rules (nothing else), while migrating ESLint and its respective plugins to their latest versions.

For years, lint-stage never performed formatting before commits, which is why so many files were affected. I'll open a separate PR removing this dependency since it's not actually used in practice.

Also, you can follow all breaking changes from ESLint in Migrate to v9.x documentation.


CodeQL

It's interesting to note that CodeQL will notify about two warnings, since a comma has been removed from the line in question for each warning.

If this is indeed a problem to be addressed, I don't see this PR as the ideal place for it, since it's exclusively for lint and format rules and its apply.

However, Copilot suggested it:

const charMap = {
  '<': '\\u003C',
  '>': '\\u003E',
  '/': '\\u002F',
  '\\': '\\\\',
  '\b': '\\b',
  '\f': '\\f',
  '\n': '\\n',
  '\r': '\\r',
  '\t': '\\t',
  '\0': '\\0',
  '\u2028': '\\u2028',
  '\u2029': '\\u2029'
};

function escapeUnsafeChars(str) {
  return str.replace(/[<>\b\f\n\r\t\0\u2028\u2029]/g, x => charMap[x]);
}
  • It might be worth checking a dedicated PR for this.

This comment was marked as off-topic.

@wellwelwel
Copy link
Collaborator Author

wellwelwel commented Mar 5, 2025

I also took care to check each PR opened one by one:

From 49 valid PRs (not bots):

I carefully create a label for each of them, which is where each link above leads.


The recent #3451 PR was not impacted ✨

@wellwelwel wellwelwel added dependencies Pull requests that update a dependency file refactor labels Mar 5, 2025
@wellwelwel wellwelwel changed the title refactor: upgrade ESLint and plugins to v9 refactor: upgrade ESLint and its plugins to v9 Mar 5, 2025
@wellwelwel wellwelwel changed the title refactor: upgrade ESLint and its plugins to v9 refactor: upgrade ESLint and migrate its plugins to v9 Mar 5, 2025
@wellwelwel wellwelwel merged commit e70160b into sidorares:master Mar 5, 2025
100 checks passed
@wellwelwel wellwelwel deleted the eslint branch March 5, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant