Already intalled and configured:
- ESLint (airbnb)
- Prettier
- Stylelint (standard)
- Husky with lint-staged
Install with npm install
or yarn install
Run with npm start
or yarn start
Lint with npm run lint
or yarn run lint
Force git to use LF end of line everywhere:
git config --global core.eol lf
git config --global core.autocrlf input
If you've already cloned this repository, remove it and clone it again.
- In Visual Studio Code go to View -> Extensions
- Search for
eslint
: EsLint - Click Install
- In Visual Studio Code go to View -> Extensions
- Search for
prettier code formatter
: Prettier - Click Install
- In Visual Studio Code go to View -> Extensions
- Search for
stylelint
: Stylelint - Click Install
- Go to File -> Preferences -> Settings.
- On the top right corner, click on the file icon
Open Settings (JSON)
. - Add the code below before the last closing curly brace:
{
/* existing configurations... */
/* began to copy setting from here */
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
},
"files.eol": "\n",
"editor.tabSize": 2,
/* do not copy after here */
}
You might have to close and reopen Visual Studio Code after the plugins install and setting changes.