diff --git a/src/content/10/en/part10a.md b/src/content/10/en/part10a.md index 36ac864933..b6eca237cc 100644 --- a/src/content/10/en/part10a.md +++ b/src/content/10/en/part10a.md @@ -133,7 +133,7 @@ Now that we are somewhat familiar with the development environment let's enhance npm install --save-dev eslint @babel/eslint-parser eslint-plugin-react eslint-plugin-react-native ``` -Next, let's add a .eslintrc.json file in the rate-repository-app directory with the ESLint configuration into the following content: +Next, let's add a eslint.config.mjs file in the rate-repository-app directory with the ESLint configuration into the following content: ```javascript { @@ -171,6 +171,14 @@ And finally, let's add a lint script to the package.json file to } ``` +> [! NOTE] +> in the event that npm run lint produces this error message ESLint couldn't find an eslint.config.(js|mjs|cjs) file. + +Run this migration +```shell +npx @eslint/migrate-config .eslintrc.json +``` + Now we can check that the linting rules are obeyed in JavaScript files in the src directory and in the App.js file by running npm run lint. We will be adding our future code to the src directory but because we haven't added any files there yet, we need the no-error-on-unmatched-pattern flag. Also if possible integrate ESLint with your editor. If you are using Visual Studio Code you can do that by, going to the extensions section and checking that the ESLint extension is installed and enabled: ![Visual Studio Code ESLint extensions](../../images/10/3.png)