Refactor #6.1
This commit is contained in:
parent
2cc87e1891
commit
28ad3a16ff
5 changed files with 3592 additions and 36 deletions
4
.husky/pre-commit
Normal file
4
.husky/pre-commit
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx lint-staged
|
||||||
3
.prettierignore
Normal file
3
.prettierignore
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
coverage/
|
||||||
3600
package-lock.json
generated
3600
package-lock.json
generated
File diff suppressed because it is too large
Load diff
15
package.json
15
package.json
|
|
@ -5,7 +5,9 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint",
|
||||||
|
"format": "prettier --write .",
|
||||||
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
|
|
@ -19,7 +21,16 @@
|
||||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
"@vue/cli-service": "~5.0.0",
|
"@vue/cli-service": "~5.0.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-plugin-vue": "^8.0.3"
|
"eslint-plugin-vue": "^8.0.3",
|
||||||
|
"husky": "^8.0.0",
|
||||||
|
"lint-staged": "^13.3.0",
|
||||||
|
"prettier": "^3.3.3",
|
||||||
|
"vitest": "^1.6.0"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{js,vue,css,scss,md}": [
|
||||||
|
"prettier --write"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"root": true,
|
"root": true,
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,9 @@ Outcome: Components get smaller and easier to read; business logic is reusable.
|
||||||
### Phase 4 — Tooling and Standards
|
### Phase 4 — Tooling and Standards
|
||||||
- [x] Add Prettier config and .editorconfig; wire Prettier with ESLint
|
- [x] Add Prettier config and .editorconfig; wire Prettier with ESLint
|
||||||
- [ ] Upgrade ESLint (if/when convenient) and align with Vue 3 rules
|
- [ ] Upgrade ESLint (if/when convenient) and align with Vue 3 rules
|
||||||
- [ ] Ensure Volar is used (dev environment) for Vue 3 type intelligence
|
- [x] Ensure Volar is used (dev environment) for Vue 3 type intelligence
|
||||||
- Optional next: add lint-staged + husky for `pre-commit` formatting
|
- [x] Add lint-staged + husky for `pre-commit` formatting
|
||||||
|
- Optional next: enable Vue macros (defineProps/defineOptions) in ESLint or upgrade ESLint/vue plugin
|
||||||
|
|
||||||
Outcome: Stable formatting and consistent linting across contributors.
|
Outcome: Stable formatting and consistent linting across contributors.
|
||||||
|
|
||||||
|
|
@ -70,3 +71,4 @@ Outcome: Confidence in refactors and easier onboarding.
|
||||||
- Added Prettier and EditorConfig
|
- Added Prettier and EditorConfig
|
||||||
- Added `composables/useMeals.js`; migrated meal pages to composable and `<script setup>`
|
- Added `composables/useMeals.js`; migrated meal pages to composable and `<script setup>`
|
||||||
- Added `composables/useShopping.js`; migrated shopping pages to composable and `<script setup>`
|
- Added `composables/useShopping.js`; migrated shopping pages to composable and `<script setup>`
|
||||||
|
- Added VS Code Volar recommendation (`.vscode/extensions.json`)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue