Needless to say, Airbnb is top tier when it comes to developer contributions. Much of the industry has adopted Airbnb's JavaScript Style Guide. However, perhaps the style guide is too restrictive at this point in your coding journey.
- Removing node modules
- In your terminal, run
npm uninstall -g eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react-hooks
- In your terminal, run
- Checking list of globally installed node modules
- In your terminal run,
npm list -g --depth 0
and confirm that the following are in the list:├── [email protected] ├── [email protected]
- If there are any other
eslint
-related node modules in the list, please uninstall them:- Pay attention, the last argument of the command below should be replaced
npm uninstall -g paste-node-module-name-without-the-version-here
- Pay attention, the last argument of the command below should be replaced
- If you are missing either of the two aforementioned node modules, please install them:
npm install -g [email protected] [email protected]
- In your terminal run,
- Edit the
.eslintrc.json
file- Open the file:
code ~/.eslintrc.json
- Replace the entire contents of the file with the following JSON:
{ "extends": "eslint:recommended", "env": { "browser": true, "node": true, "mocha": true, "es6": true }, "plugins": ["react"], "parserOptions": { "ecmaVersion": 2018, "sourceType": "module", "ecmaFeatures": { "jsx": true } }, "rules": { "linebreak-style": 0, "no-console": "off" } }
- Don't forget to save the file before you close it!
- Open the file: