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

Update ESLint and related packages #1697

Closed
wants to merge 6 commits into from

Conversation

flevi29
Copy link
Collaborator

@flevi29 flevi29 commented Aug 21, 2024

Pull Request

Why?

ESLint received major upgrade from 8 -> 9. With this comes a new flat config. Also rules have been changed a little bit.
This PR updates ESLint, related packages, and adapts config.

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@flevi29 flevi29 added the maintenance Issue about maintenance (CI, tests, refacto...) label Aug 21, 2024
eslint.config.js Outdated
/** @type {import('eslint').Linter.Config[]} */
module.exports = [
{
ignores: ['dist/', 'tests/env/', 'coverage/', 'playgrounds/', 'docs/'],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

rules: eslint.configs.recommended.rules,
},
// TypeScript linting for ts files
...tseslint.configs.recommendedTypeChecked.map((config) => ({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now TypeScript rules are also applied to test files, which wasn't the case before.

@@ -53,8 +53,8 @@
"style:fix": "yarn fmt:fix && yarn lint:fix",
"fmt": "prettier -c ./**/*.{js,ts}",
"fmt:fix": "prettier -w ./**/*.{js,ts}",
"lint": "eslint --ext .js,.ts,.tsx .",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

--ext is deprecated and removed, we just include the proper files now with globs pattern.

@flevi29 flevi29 requested a review from curquiza August 21, 2024 09:16
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.11%. Comparing base (3b7e7e4) to head (aab1044).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1697   +/-   ##
=======================================
  Coverage   97.11%   97.11%           
=======================================
  Files          21       21           
  Lines         831      831           
  Branches       84       84           
=======================================
  Hits          807      807           
  Misses         23       23           
  Partials        1        1           

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

@curquiza
Copy link
Member

Thank you @flevi29 for the PR!
I prefer we merge this after the release we will do on Monday, to prevent us from having any issue when trying to merge: #1682

@curquiza
Copy link
Member

curquiza commented Oct 2, 2024

@flevi29 don't put skip-changelog doing maintenance like this. Only use skip-changelog for really small PR on README or not-impactful/not-risky at all 😊

Also, can you fix the git conflicts?

@flevi29
Copy link
Collaborator Author

flevi29 commented Oct 2, 2024

@curquiza fixed.

Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

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

bors merge

meili-bors bot added a commit that referenced this pull request Oct 2, 2024
1697: Update ESLint and related packages r=curquiza a=flevi29

# Pull Request

## Why?
ESLint received major upgrade from 8 -> 9. With this comes a new flat config. Also rules have been changed a little bit.
This PR updates ESLint, related packages, and adapts config.

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: F. Levi <55688616+flevi29@users.noreply.github.com>
Copy link
Contributor

meili-bors bot commented Oct 2, 2024

@flevi29 flevi29 closed this Oct 2, 2024
@flevi29 flevi29 deleted the update-eslint branch October 3, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Issue about maintenance (CI, tests, refacto...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants