meilisearch / meilisearch-js

JavaScript client for the Meilisearch API

Home Page:https://www.meilisearch.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`eslint` and `prettier` outdated, messy/faulty configurations, these and `typescript` too need improvement

flevi29 opened this issue · comments

Prettier

  • Outdated
  • .prettierrc has some redundant settings that are set as the default value
    • arrowParens
    • bracketSpacing
    • printWidth
  • @types/prettier why is this installed? It is not required in any way, shape or form

ESLint

  • Outdated
  • Prettier plugin used that is recommended against by Prettier, essentially linting and formatting should be separate concerns: https://prettier.io/docs/en/integrating-with-linters.html
    • eslint-plugin-prettier is the plugin we don't want for this reason
    • eslint-config-prettier is the only plugin we want, to disable all rules regarding style
    • Essentially getting squiggly red lines all over the code just because it's not formatted well is more distracting than any useful
      • prettier runs automatically on "lint-staged" script
      • we can make "style" script run it separately, which also makes it faster according to Prettier docs (so run linting and formatting separately)
  • @typescript-eslint criminally outdated
  • eslint-plugin-jest
    • Outdated compared to jest version
    • Recommended rules not applied (I'm not even sure if it does anything without this, might be useless without)
    • Used on all files instead of just test files
  • There are quite a few installed plugins that aren't even configured to run: eslint-plugin-standard, eslint-plugin-promise, eslint-plugin-node, eslint-plugin-import, eslint-config-standard-with-typescript
    • These don't run because they're not registered either in plugins or extends of .eslintrc.js
    • They are outdated, potentially deprecated, and they might just end up polluting ESLint with conflicting/unnecessary rules, so it's best to get rid of them entirely, especially since none of these were enforced before either way

TypeScript

  • A little outdated (1 year old)
  • Config is messy, will detail in PR

Thank you very much @flevi29 for your involvement and suggesting improvement 🙏

We cannot be 100% reactive and @brunoocasali, the maintainer is on Holiday currently, but we will do our best to review and merge your PRs

Let us know when you need review!