0.1.0 • Published 5 years ago
cra-template-basic-johnepabnb v0.1.0
CRA Template Custom basic-johnepabnb
A CRA with ESlint & Prettier config with Airbnb style guide.
1) Install template
$ npx create-react-app [nameOfYourApp] --template basic-johnepabnb
2) Modify package.json
Add this lines below on your package.json
:
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.4",
"eslint-plugin-react-hooks": "^4.1.2",
"prettier": "^2.1.2"
}
3) Delete Eslint config CRA
Remove this entry on your package.json
:
"eslintConfig": {
"extends": "react-app"
},
4) install dev/depencies
$ npm install
5) Allow EslintforVscode and Prettier for this workplace
I've seen some errors if eslint is allow for all. I suggest to allow only for the workspace and you will see errors appears on the screen.
6) Launch server
$ npm start
0.1.0
5 years ago