Skip to content

Commit d654c05

Browse files
committed
chore: update configuration settings
1 parent a8d2442 commit d654c05

13 files changed

Lines changed: 186 additions & 56 deletions

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec commitlint --edit $1

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pnpm test
1+
pnpm exec lint-staged

commitlint.config.mjs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
export default {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'type-case': [2, 'always', 'lower-case'],
5+
'type-enum': [
6+
2,
7+
'always',
8+
[
9+
'build',
10+
'chore',
11+
'ci',
12+
'docs',
13+
'feat',
14+
'fix',
15+
'perf',
16+
'refactor',
17+
'revert',
18+
'style',
19+
'test'
20+
]
21+
],
22+
'subject-full-stop': [2, 'never', '.'],
23+
}
24+
}

eslint.config.mjs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
// Run this command to generate base config and vs code settings:
22
// pnpm dlx @antfu/eslint-config@latest
33

4-
import antfu from "@antfu/eslint-config";
4+
import antfu from '@antfu/eslint-config';
55

66
export default antfu({
7-
type: "app",
7+
type: 'app',
88
vue: true,
99
typescript: true,
1010
formatters: true,
1111
stylistic: {
1212
indent: 2,
1313
semi: true,
14-
quotes: "double",
14+
quotes: 'single',
1515
},
1616
}, {
1717
rules: {
18-
"ts/no-redeclare": "off",
19-
"ts/consistent-type-definitions": ["error", "type"],
20-
"no-console": ["warn"],
21-
"antfu/no-top-level-await": ["off"],
22-
"node/prefer-global/process": ["off"],
23-
"node/no-process-env": ["error"],
24-
"perfectionist/sort-imports": ["error", {
18+
'ts/no-redeclare': 'off',
19+
'ts/consistent-type-definitions': ['error', 'type'],
20+
'no-console': ['warn'],
21+
'antfu/no-top-level-await': ['off'],
22+
'node/prefer-global/process': ['off'],
23+
'node/no-process-env': ['error'],
24+
'perfectionist/sort-imports': ['error', {
2525
tsconfigRootDir: '.',
2626
}],
27-
"unicorn/filename-case": ["error", {
28-
case: "kebabCase",
29-
ignore: ["README.md"],
27+
'unicorn/filename-case': ['error', {
28+
cases: {
29+
kebabCase: true,
30+
pascalCase: true,
31+
},
32+
ignore: ['README.md'],
3033
}],
3134
},
3235
});

package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"name": "vue-starter",
3-
"private": true,
4-
"version": "1.0.0",
53
"type": "module",
4+
"version": "1.0.0",
5+
"private": true,
66
"scripts": {
77
"dev": "vite",
88
"build": "vue-tsc -b && vite build",
99
"preview": "vite preview",
1010
"type-check": "vue-tsc --noEmit",
11+
"lint": "eslint .",
12+
"lint:fix": "eslint . --fix",
1113
"prepare": "husky"
1214
},
1315
"dependencies": {
@@ -21,10 +23,19 @@
2123
"@vitejs/plugin-vue": "^6.0.1",
2224
"@vue/tsconfig": "^0.8.1",
2325
"eslint": "^9.39.1",
26+
"eslint-plugin-format": "^1.0.2",
2427
"husky": "^9.1.7",
2528
"lint-staged": "^16.2.7",
2629
"typescript": "~5.9.3",
2730
"vite": "^7.2.4",
2831
"vue-tsc": "^3.1.4"
32+
},
33+
"lint-staged": {
34+
"*.{js,jsx,ts,tsx,vue}": [
35+
"eslint --fix"
36+
],
37+
"*.{json,md}": [
38+
"eslint --fix"
39+
]
2940
}
3041
}

pnpm-lock.yaml

Lines changed: 93 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import HelloWorld from './components/HelloWorld.vue'
2+
import HelloWorld from './components/HelloWorld.vue';
33
</script>
44

55
<template>

0 commit comments

Comments
 (0)