You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We created react application with create-react-app tool which handles a lot of configurations for us. The tool comes with ESLint as well but it has limitations. We want to add airbnb plugin but when we do that eslint warnings start to cause errors and application fails to compile. To avoid this and just give warnings we found this work-around.
cd web
# install
npm i eslint-config-airbnb
// Add "extends": "airbnb" to your .eslintrc(in web/package.json)"eslintConfig": {"extends": [// ..."airbnb"]},// Set ESLint to just print out warnings in terminal rather than causing error(in web/package.json)"scripts": {"start": "ESLINT_NO_DEV_ERRORS='true' react-scripts start","build": "DISABLE_ESLINT_PLUGIN='true' react-scripts build",// ...},
Node.js:
cd server
# Install ESLint as dev dependency.
npm i --save-dev eslint
# Create ESLint configuration(Follow the steps in referenced link but choose Airbnb style guide rather than Google style guide).
./node_modules/.bin/eslint --init
React:
Node.js:
Reference
The text was updated successfully, but these errors were encountered: