From af6dd074129448230ca47b3c9a2dcbe9d0c2ec5f Mon Sep 17 00:00:00 2001 From: Moise-Kongolo <138870757+Moise-Kongolo@users.noreply.github.com> Date: Sun, 7 Jan 2024 20:57:01 +0200 Subject: [PATCH] Update part5b.md In the package.json, "lint" is lowercase instead of "Lint". So the command should be "npm run lint" When I ran the command i encountered an error saying jest/globals not found. I found a fix on github. https://github.com/facebook/react-native/issues/33955 --- src/content/5/en/part5b.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/content/5/en/part5b.md b/src/content/5/en/part5b.md index 5775f98f19..49d96708cf 100644 --- a/src/content/5/en/part5b.md +++ b/src/content/5/en/part5b.md @@ -780,12 +780,19 @@ Now the directories dist and node_modules will be skipped when As usual, you can perform the linting either from the command line with the command + ```bash -npm run Lint +npm run lint ``` or using the editor's Eslint plugin. +If you encounter an error saying ```Environment key "jest/globals" is unknown``` , you can install eslint-plugin-jest module as a development dependency and it will fix the error. + +```bash + npm install eslint-plugin-jest --save-dev +``` + Component _Togglable_ causes a nasty-looking warning Component definition is missing display name: ![vscode showing component definition error](../../images/5/25x.png)