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 pacakges #1697

Open
wants to merge 4 commits into
base: main
Choose a base branch
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
/** @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 (2d90d98) to head (2f32001).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1697   +/-   ##
=======================================
  Coverage   97.11%   97.11%           
=======================================
  Files          21       21           
  Lines         831      831           
  Branches       77       84    +7     
=======================================
  Hits          807      807           
- Misses         23       24    +1     
+ Partials        1        0    -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 curquiza requested review from brunoocasali and removed request for curquiza August 21, 2024 13:24
@flevi29 flevi29 force-pushed the update-eslint branch 2 times, most recently from c32f029 to 968b476 Compare September 18, 2024 07:05
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