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

Add index.d.ts file for typescript compatible #686

Merged
merged 7 commits into from Mar 13, 2023

Conversation

hirohe
Copy link
Contributor

@hirohe hirohe commented Nov 22, 2022

Pull Request

Related issue

Fixes #479

What does this PR do?

  • add index.d.ts types declare file
  • add dependencies related to typescript and eslint config
  • update .eslintrc.js file, with typescript related configs
  • replace no-unused-vars with @typescript-eslint/no-unused-vars refer

there's some definitions unclear in index.d.ts

  • queryHook dont know the arguments definitons
  • handleSelected dont know the arguments definitons
  • all methods of class DocsSearchBar should be defined ?

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!

@hirohe hirohe marked this pull request as ready for review November 23, 2022 02:45
@bidoubiwa bidoubiwa self-requested a review November 23, 2022 11:40
@brunoocasali
Copy link
Member

brunoocasali commented Feb 24, 2023

@bidoubiwa is this PR still valid?

@bidoubiwa
Copy link
Contributor

My bad, I forgot to answer as I was waiting for the styling check to be resolved.

To resolve that issue you can use the overrides parameter of eslint with one object for typescript files and one for the others.
You can basically copy paste the initial eslint rules, add both in the overrides parameter and add the typescript rules only on one of the two objects.

If you are still up for modification though @hirohe

@hirohe
Copy link
Contributor Author

hirohe commented Mar 3, 2023

sorry, I didn't aware that i have to resolved styling check

I changed .eslintrc.js, use overrides for ts files only rules. @bidoubiwa

Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

@bidoubiwa bidoubiwa added the enhancement New feature or request label Mar 13, 2023
@bidoubiwa
Copy link
Contributor

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented Mar 13, 2023

@meili-bors meili-bors bot merged commit 74cc571 into meilisearch:main Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make docs-searchbar compatible with typescript
3 participants