-
Make a git repository (or clone an empty repository from a remote).
mkdir -p ~/git/react-app cd ~/git/react-app git init
-
Install Yarn.
npm install --global yarn
-
Create a React app.
yarn create react-app .
-
Configure ESLint.
$ yarn create @eslint/config yarn create v1.22.17 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Installed "@eslint/create-config@0.1.2" with binaries: - create-config
-
Choose a usage option.
? How would you like to use ESLint? … To check syntax only To check syntax and find problems ▸ To check syntax, find problems, and enforce code style
-
Choose a module type.
? What type of modules does your project use? … ▸ JavaScript modules (import/export) CommonJS (require/exports) None of these
-
Choose a framework.
? Which framework does your project use? … ▸ React Vue.js None of these
-
Choose a TypeScript option.
? Does your project use TypeScript? ‣ No / Yes
-
Choose where the code will run.
? Where does your code run? … (Press <space> to select, <a> to toggle all, <i> to invert selection) ✔ Browser Node
-
Choose how to define a style.
? How would you like to define a style for your project? … ▸ Use a popular style guide Answer questions about your style
-
Choose a style guide.
? Which style guide do you want to follow? … Airbnb: https://github.com/airbnb/javascript Standard: https://github.com/standard/standard ▸ Google: https://github.com/google/eslint-config-google XO: https://github.com/xojs/eslint-config-xo
-
Choose a config file format.
? What format do you want your config file to be in? … JavaScript YAML ▸ JSON
-
Choose to install dependencies now.
? Would you like to install them now with npm? ‣ No / Yes
-
-
Move any ESLint configuration from
package.json
to.eslintrc.json
and add recommended extensions.-
Delete
eslintConfig
frompackage.json
."eslintConfig": { "extends": [ "react-app", "react-app/jest" ] },
-
Add extensions to
.eslintrc.json
."extends": [ "eslint:recommended", "plugin:react/recommended", "google", "react-app", "react-app/jest" ],
-
-
Add a
lint
script topackage.json
."scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "lint": "eslint src", "eject": "react-scripts eject" },
-
Delete
package-lock.json
, which is not required by Yarn.rm package-lock.json
-
Commit and push.
-
Notifications
You must be signed in to change notification settings - Fork 0
ojwm/react-app
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Getting started with Create React App
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published