meilisearch / meilisearch-js-plugins

The search client to use Meilisearch with InstantSearch.
https://www.meilisearch.com
MIT License
472 stars 57 forks source link

yarn lint is not running #124

Closed bb closed 3 years ago

bb commented 3 years ago

In preparation for #121 I tried running through the contributing guidelines, however, the step yarn lint was not running successfully on a fresh checkout. The commands given before that were fine.

yarn lint
yarn run v1.22.10
$ eslint --ext .js,.ts,.tsx .

Oops! Something went wrong! :(

ESLint: 7.12.1

ESLint couldn't find the config "react-app" to extend from. Please check that the name of the config is correct.

The config "react-app" was referenced from the config file in "/Users/bb/src/meilisearch/instant-meilisearch/playgrounds/react/package.json".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

After yarn add -D eslint-config-react-app, it still failed because of eslint-plugin-flowtype (and a few others) it runs... but it does not terminate, at least not within a few minutes:

$ yarn lint
yarn run v1.22.10
$ eslint --ext .js,.ts,.tsx .
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.

It just keeps one core busy at 99% CPU.

I'm using node 14.14.0 and these are my changes compared to current master:

--- a/package.json
+++ b/package.json
@@ -39,16 +39,23 @@
     "@babel/preset-env": "^7.10.4",
     "@rollup/plugin-commonjs": "^15.0.0",
     "@rollup/plugin-node-resolve": "^10.0.0",
+    "babel-eslint": "^10.1.0",
     "babel-jest": "^26.1.0",
     "eslint": "^7.5.0",
     "eslint-config-prettier": "^6.11.0",
+    "eslint-config-react-app": "^6.0.0",
     "eslint-config-standard": "^15.0.1",
+    "eslint-plugin-flowtype": "^5.2.0",
     "eslint-plugin-import": "^2.22.0",
     "eslint-plugin-jest": "^24.0.0",
+    "eslint-plugin-jsx-a11y": "^6.4.1",
     "eslint-plugin-node": "^11.1.0",
     "eslint-plugin-prettier": "^3.1.4",
     "eslint-plugin-promise": "^4.2.1",
+    "eslint-plugin-react": "^7.21.5",
+    "eslint-plugin-react-hooks": "^4.2.0",
     "eslint-plugin-standard": "^4.0.1",
+    "eslint-plugin-vue": "^7.1.0",
     "jest": "^26.1.0",
     "jest-watch-typeahead": "^0.6.0",
     "prettier": "2.1.1",

I also upgraded all outdated packages but it did not help. I created a PR to share the current WIP.

bb commented 3 years ago

This issue will be solved when #123 is merged. See comments there for details.

curquiza commented 3 years ago

Close by #123 🚀