Skip to content

[refactor] Upgrade to eslint v9 and flat config#11446

Merged
sfc-gh-bnisco merged 13 commits intodevelopfrom
bnisco/upgrade-eslint-v9
May 28, 2025
Merged

[refactor] Upgrade to eslint v9 and flat config#11446
sfc-gh-bnisco merged 13 commits intodevelopfrom
bnisco/upgrade-eslint-v9

Conversation

@sfc-gh-bnisco
Copy link
Copy Markdown
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco commented May 23, 2025

Describe your changes

  • Upgrades our repo from eslint v8 to eslint v9
    • The big change is that we need to utilize eslint flat config
    • For reference, migration steps can be found here
  • Updates a number of lint dependencies since we can now utilize the latest versions
  • In terms of source file changes, there are a few categories of changes:
    1. Eslint v9 now warns if there is an unused eslint-disable directive in code. This PR removes any unused eslint-disables
    2. A few of the rules were made to be stricter. For example, the no unused vars rule now checks against the variable argument in a catch statement. For now, I've disabled any existing violations
    3. A few of the rules were made to be more relaxed. For example, a few of the React Hook rules are now a bit more relaxed, so I removed any unnecessary eslint-disable directives for those.

GitHub Issue Link (if applicable)

Testing Plan

  • ✅ This is a lint change, so it is checked at CI time
  • I also have checked that the eslint plugin in Cursor/VSCode still work as expected locally

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@sfc-gh-bnisco sfc-gh-bnisco added security-assessment-completed impact:internal PR changes only affect internal code change:refactor PR contains code refactoring without behavior change labels May 23, 2025
@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented May 23, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 23, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-11446/streamlit-1.45.1-py3-none-any.whl
🕹️ Preview app pr-11446.streamlit.app (☁️ Deploy here if not accessible)

@sfc-gh-bnisco sfc-gh-bnisco force-pushed the bnisco/upgrade-eslint-v9 branch from 1e2287b to 1fa8ad5 Compare May 27, 2025 20:56
@sfc-gh-bnisco sfc-gh-bnisco marked this pull request as ready for review May 27, 2025 22:17
@sfc-gh-bnisco sfc-gh-bnisco requested a review from a team as a code owner May 27, 2025 22:17
Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍 do we lose anything important with the removal of the airbnb eslint rule set?

@sfc-gh-bnisco
Copy link
Copy Markdown
Collaborator Author

@lukasmasuch good question re: Airbnb rule set. I took a look at this and I actually think the previous setup is misconfigured and thus isn't actually leveraging most of the base Airbnb rules. Per the directions we should have had both airbnb and airbnb-typescript. We did not. Further, we only utilized airbnb-typescript/base, which omitted the React rules. Because of that, I don't think we're really missing anything in this change due to the prior misconfiguration.

@sfc-gh-bnisco sfc-gh-bnisco merged commit 98293f5 into develop May 28, 2025
37 checks passed
@sfc-gh-bnisco sfc-gh-bnisco deleted the bnisco/upgrade-eslint-v9 branch May 28, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:refactor PR contains code refactoring without behavior change impact:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants