- Make sure you have installed Node.js v6.11+ (You have to downgrade your node version if you encounter npm EINTEGRITY issue)
- How to setup JavaScript Development Environment - VS Code
- Open terminal, clone your forked repo.
git clone https://github.com/euler-ui/react-sample
cd react-sample
- Install dependencies.
npm install
- Run the mock server.
npm run server
- Open another terminal
- Start application.
npm start
- Enjoy at the url printed at terminal. E.g.,
http://localhost:3000/
- Open
react-sample
with VS Code - Open Command Palette (⇧⌘P), type
Open Workspace Settings
, and selectPreferences: Open Workspace Settings
- Copy below content into opened settings.json.
// Place your settings in this file to overwrite default and user settings.
{
// Format a file on save. A formatter must be available, the file must not be auto-saved, and editor must not be shutting down.
"editor.formatOnSave": true,
"stylelint.enable": true,
"css.validate": false,
"scss.validate": false,
// Enable/disable default JavaScript formatter (For Prettier)
"javascript.format.enable": false,
// Use 'prettier-eslint' instead of 'prettier'. Other settings will only be fallbacks in case they could not be inferred from eslint rules.
"prettier.eslintIntegration": true,
"prettier.singleQuote": true,
"prettier.trailingComma": "all",
"prettier.printWidth": 100,
"search.exclude": {
"**/node_modules": true,
"src/routes":true,
"*config.js":true,
".eslintrc.js":true,
"*config.prod.js":true
}
}
- Enjoy live lintin and auto formatting with VS Code
You may need to find out: