- Linux/macOS - https://github.com/creationix/nvm#install-script
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
⌘ + P (Ctrl + P)
ext install dbaeumer.vscode-eslint
ext install esbenp.prettier-vscode
ext install dzannotti.vscode-babel-coloring
ext install shinnn.stylelint
npm install acorn --save-dev
npm install eslint --save-dev
npm install eslint-config-airbnb --save-dev
npm install eslint-config-prettier --save-dev
npm install eslint-plugin-immutable --save-dev
npm install eslint-plugin-import --save-dev
npm install eslint-plugin-jsx-a11y --save-dev
npm install eslint-plugin-prettier --save-dev
npm install eslint-plugin-react --save-dev
npm install prettier --save-dev
npm install csslint --save-dev
npm install stylelint --save-dev
npm install stylelint-config-recommended --save-dev
Instaliuojame git-hooks įrankius:
npm install husky --save-dev
npm install lint-staged --save-dev
Į package.json
įdedame husky
konfiguraciją:
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
Taip pat lint-staged
konfiguraciją:
"lint-staged": {
"src/**/*.jsx": [
"eslint --fix",
"git add"
],
"src/**/*.scss": [
"stylelint --syntax scss",
"git add"
]
},
https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi
Prisidedame scripts
į package.json
"start": "parcel src/index.html --open",
{
"singleQuote": true,
"tabWidth": 2,
"printWidth": 100,
"trailingComma": "all"
}
{
"extends": [
"stylelint-config-recommended"
],
"rules": {
"selector-list-comma-newline-after": "always",
"selector-pseudo-element-colon-notation": "double",
"no-duplicate-selectors": null
}
}
{
"parser": "babel-eslint",
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["react", "immutable", "import", "prettier"],
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"rules": {
"prettier/prettier": "error",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": false,
"peerDependencies": false
}
]
}
}