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

chore: migrate to ESLint v9 and relevant packages #362

Conversation

markEHVN
Copy link
Contributor

@markEHVN markEHVN commented Dec 7, 2024

PR Checklist

Overview

  • Support ESLint v9

@JoshuaKGoldberg JoshuaKGoldberg changed the title Feat: Migrate to ESLint v9 and relevant packages chore: migrate to ESLint v9 and relevant packages Dec 7, 2024
eslint.config.cjs Outdated Show resolved Hide resolved
Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Thanks for getting started on this! 🙂

@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for author Needs an action taken by the original poster label Dec 7, 2024
Copy link

codecov bot commented Dec 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.50%. Comparing base (91e7d0b) to head (e608781).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
+ Coverage   91.14%   95.50%   +4.36%     
==========================================
  Files          12       11       -1     
  Lines         350      334      -16     
  Branches       42       42              
==========================================
  Hits          319      319              
+ Misses         31       15      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Sorry, I don't think I was clear 😅. I'm requesting that this file be as close as possible to the latest ESLint configs I use in other repositories. The most recently created one is https://github.com/JoshuaKGoldberg/object-strings-deep/blob/41390065d3fa1f06d34bd2ed7d7c0320d8227ec6/eslint.config.js.

This is for two reasons:

  • A lot of the settings in this repo's older ESLint config are no longer necessary. I commented a few of them inline to show examples.
  • Soon, much of this will be automated, so any deviations from the other ESLint configs will cause extra work.

My advice would be to:

  1. Copy and paste the linked eslint.config.js here
  2. Add or remove devDependencies as needed
  3. Run pnpm lint --fix

If any rules then start reporting complaints, you can either disable them in the config ("<rule-name>": "off") or fix them in the files. We can discuss those changes too if they're not straightforward.

Thanks!

eslint.config.js Outdated Show resolved Hide resolved
eslint.config.js Outdated Show resolved Hide resolved
eslint.config.js Outdated Show resolved Hide resolved
eslint.config.js Outdated Show resolved Hide resolved
eslint.config.js Outdated Show resolved Hide resolved
eslint.config.js Outdated Show resolved Hide resolved
eslint.config.js Outdated Show resolved Hide resolved
@markEHVN
Copy link
Contributor Author

markEHVN commented Dec 8, 2024

Sorry, I don't think I was clear 😅.

Thanks, I updated it. Please help me re-review ❤️

@markEHVN
Copy link
Contributor Author

markEHVN commented Dec 8, 2024

I make 2 changes when compare with base eslint configuration file

  1. Set ignoreTypeImport to allowing import type { Endpoints } from ''@octokit/types" - reference . To be honest, I do not know why n/no-missing-import can not resolved this import. 😢 .
  2. Allow import release-it-action in **/*.md/*.ts glob - reference

Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

💯 this looks great, thank you!

Agreed on all the decisions you made 🙂

@JoshuaKGoldberg JoshuaKGoldberg merged commit fd190bf into JoshuaKGoldberg:main Dec 8, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for author Needs an action taken by the original poster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🛠️ Repo: Migrate ESLint to v9
2 participants