npm install
npm run serve
npm run build
npm run lint
npm i eslint-config-prettier eslint-plugin-prettier --save-dev
.eslintrc.js rules에 'prettier/prettier': 'off', 추가
- 커밋하기전에 eslint 검사
// packages.json
"husky": {
"hooks": {
"pre-commit": "eslint app.js --fix"
}
}
- 변경된 파일만 검사
npm i lint-staged --save-dev
//packages.json
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": "eslint --fix"
},
- https://gist.github.com/GavinRay97/29f9af2f84665e5656e8298a568f1175
- https://stackoverflow.com/questions/64831745/props-typing-in-vue-js-3-with-typescript
interface Product {
name: string;
price: number;
}
props: {
product: {
type: Object as () => Product,
required: true,
},
},
Breakpoint prefix Minimum width CSS
sm 640px @media (min-width: 640px) { ... }
md 768px @media (min-width: 768px) { ... }
lg 1024px @media (min-width: 1024px) { ... }
xl 1280px @media (min-width: 1280px) { ... }
2xl 1536px @media (min-width: 1536px) { ... }