Configure ESLint and Prettier
This commit is contained in:
parent
c688bf1cda
commit
0116ba3ac1
7 changed files with 1023 additions and 16 deletions
7
.prettierrc
Normal file
7
.prettierrc
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"printWidth": 100
|
||||||
|
}
|
||||||
14
Justfile
14
Justfile
|
|
@ -1,10 +1,14 @@
|
||||||
# Start development server
|
# Start development server
|
||||||
dev:
|
serve-dev:
|
||||||
# pnpm dev
|
pnpm dev
|
||||||
|
|
||||||
|
# Start production preview server
|
||||||
|
serve-preview:
|
||||||
|
pnpm preview
|
||||||
|
|
||||||
# Build for production
|
# Build for production
|
||||||
build:
|
build:
|
||||||
# pnpm build
|
pnpm build
|
||||||
# cargo build
|
# cargo build
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
|
|
@ -14,9 +18,9 @@ test:
|
||||||
|
|
||||||
# Run linter
|
# Run linter
|
||||||
lint:
|
lint:
|
||||||
# pnpm lint
|
pnpm lint
|
||||||
|
|
||||||
# Format code
|
# Format code
|
||||||
format:
|
format:
|
||||||
# pnpm fmt
|
pnpm format
|
||||||
# cargo fmt
|
# cargo fmt
|
||||||
|
|
|
||||||
5
TODO.md
5
TODO.md
|
|
@ -14,10 +14,7 @@ A step-by-step checklist for porting MatterControl's design features to a Vue +
|
||||||
|
|
||||||
### Vue Project Scaffold
|
### Vue Project Scaffold
|
||||||
- [x] Initialize Vue 3 project with Vite and TypeScript
|
- [x] Initialize Vue 3 project with Vite and TypeScript
|
||||||
- [ ] Configure TypeScript with strict mode
|
- [x] Add ESLint and Prettier configuration
|
||||||
- [ ] Add ESLint and Prettier configuration
|
|
||||||
- [ ] Create `.gitignore` for node_modules, dist, .env
|
|
||||||
- [ ] Set up path aliases (`@/` for `src/`)
|
|
||||||
- [ ] Create folder structure (`components/`, `composables/`, `stores/`, `types/`)
|
- [ ] Create folder structure (`components/`, `composables/`, `stores/`, `types/`)
|
||||||
- [ ] Add Pinia for state management
|
- [ ] Add Pinia for state management
|
||||||
- [ ] Verify hot module replacement works
|
- [ ] Verify hot module replacement works
|
||||||
|
|
|
||||||
20
eslint.config.js
Normal file
20
eslint.config.js
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import js from '@eslint/js'
|
||||||
|
import tseslint from 'typescript-eslint'
|
||||||
|
import pluginVue from 'eslint-plugin-vue'
|
||||||
|
import eslintConfigPrettier from 'eslint-config-prettier'
|
||||||
|
|
||||||
|
export default tseslint.config(
|
||||||
|
{ ignores: ['dist', 'node_modules'] },
|
||||||
|
js.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
...pluginVue.configs['flat/recommended'],
|
||||||
|
{
|
||||||
|
files: ['**/*.vue'],
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
parser: tseslint.parser,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
eslintConfigPrettier
|
||||||
|
)
|
||||||
10
package.json
10
package.json
|
|
@ -6,16 +6,24 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc -b && vite build",
|
"build": "vue-tsc -b && vite build",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview",
|
||||||
|
"lint": "eslint . --fix",
|
||||||
|
"format": "prettier --write \"src/**/*.{ts,vue,css,html}\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.5.24"
|
"vue": "^3.5.24"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.39.2",
|
||||||
"@types/node": "^24.10.1",
|
"@types/node": "^24.10.1",
|
||||||
"@vitejs/plugin-vue": "^6.0.1",
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
"@vue/tsconfig": "^0.8.1",
|
"@vue/tsconfig": "^0.8.1",
|
||||||
|
"eslint": "^9.39.2",
|
||||||
|
"eslint-config-prettier": "^10.1.8",
|
||||||
|
"eslint-plugin-vue": "^10.7.0",
|
||||||
|
"prettier": "^3.8.1",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
|
"typescript-eslint": "^8.54.0",
|
||||||
"vite": "^7.2.4",
|
"vite": "^7.2.4",
|
||||||
"vue-tsc": "^3.1.4"
|
"vue-tsc": "^3.1.4"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
974
pnpm-lock.yaml
generated
974
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -19,15 +19,12 @@ const count = ref(0)
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Check out
|
Check out
|
||||||
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank">create-vue</a>, the
|
||||||
>create-vue</a
|
official Vue + Vite starter
|
||||||
>, the official Vue + Vite starter
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Learn more about IDE Support for Vue in the
|
Learn more about IDE Support for Vue in the
|
||||||
<a
|
<a href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support" target="_blank"
|
||||||
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
|
||||||
target="_blank"
|
|
||||||
>Vue Docs Scaling up Guide</a
|
>Vue Docs Scaling up Guide</a
|
||||||
>.
|
>.
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue