You've already forked agentic-coding-workflow
chore(web): eslint flat-config + prettier setup
This commit is contained in:
@@ -14,6 +14,7 @@ coverage.html
|
|||||||
/web/dist/
|
/web/dist/
|
||||||
/web/*.tsbuildinfo
|
/web/*.tsbuildinfo
|
||||||
/web/*.js
|
/web/*.js
|
||||||
|
!/web/eslint.config.js
|
||||||
/web/*.d.ts
|
/web/*.d.ts
|
||||||
/web/src/**/*.js
|
/web/src/**/*.js
|
||||||
/web/src/**/*.d.ts
|
/web/src/**/*.d.ts
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
pnpm-lock.yaml
|
||||||
|
*.tsbuildinfo
|
||||||
|
*.d.ts
|
||||||
|
vite.config.js
|
||||||
|
src/**/*.js
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "all",
|
||||||
|
"printWidth": 100
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
// ESLint v10 flat config。
|
||||||
|
// 覆盖范围:src/、test/ 下的 .vue/.ts/.tsx 文件。dist/、node_modules、配置类
|
||||||
|
// 文件 (vite.config.ts、postcss.config.js 等) 默认走 ignore。
|
||||||
|
import js from '@eslint/js'
|
||||||
|
import tseslint from 'typescript-eslint'
|
||||||
|
import vue from 'eslint-plugin-vue'
|
||||||
|
import vueParser from 'vue-eslint-parser'
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: ['dist/**', 'node_modules/**', '**/*.d.ts', 'src/**/*.js', 'vite.config.js'],
|
||||||
|
},
|
||||||
|
js.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
...vue.configs['flat/recommended'],
|
||||||
|
{
|
||||||
|
files: ['**/*.vue'],
|
||||||
|
languageOptions: {
|
||||||
|
parser: vueParser,
|
||||||
|
parserOptions: {
|
||||||
|
parser: tseslint.parser,
|
||||||
|
ecmaVersion: 2022,
|
||||||
|
sourceType: 'module',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.{ts,tsx,vue}'],
|
||||||
|
rules: {
|
||||||
|
'vue/multi-word-component-names': 'off',
|
||||||
|
'@typescript-eslint/no-unused-vars': [
|
||||||
|
'error',
|
||||||
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
+2
-1
@@ -10,7 +10,7 @@
|
|||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"lint": "eslint . --ext .vue,.ts,.tsx",
|
"lint": "eslint .",
|
||||||
"format": "prettier -w .",
|
"format": "prettier -w .",
|
||||||
"typecheck": "vue-tsc --noEmit"
|
"typecheck": "vue-tsc --noEmit"
|
||||||
},
|
},
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
"typescript-eslint": "^8.59.1",
|
"typescript-eslint": "^8.59.1",
|
||||||
"vite": "^8.0.10",
|
"vite": "^8.0.10",
|
||||||
"vitest": "^4.1.5",
|
"vitest": "^4.1.5",
|
||||||
|
"vue-eslint-parser": "^10.4.0",
|
||||||
"vue-tsc": "^3.2.7"
|
"vue-tsc": "^3.2.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+3
@@ -69,6 +69,9 @@ importers:
|
|||||||
vitest:
|
vitest:
|
||||||
specifier: ^4.1.5
|
specifier: ^4.1.5
|
||||||
version: 4.1.5(@types/node@25.6.0)(happy-dom@20.9.0)(vite@8.0.10(@types/node@25.6.0)(jiti@2.6.1)(yaml@2.8.3))
|
version: 4.1.5(@types/node@25.6.0)(happy-dom@20.9.0)(vite@8.0.10(@types/node@25.6.0)(jiti@2.6.1)(yaml@2.8.3))
|
||||||
|
vue-eslint-parser:
|
||||||
|
specifier: ^10.4.0
|
||||||
|
version: 10.4.0(eslint@10.2.1(jiti@2.6.1))
|
||||||
vue-tsc:
|
vue-tsc:
|
||||||
specifier: ^3.2.7
|
specifier: ^3.2.7
|
||||||
version: 3.2.7(typescript@6.0.3)
|
version: 3.2.7(typescript@6.0.3)
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
@import "tailwindcss";
|
@import 'tailwindcss';
|
||||||
|
|
||||||
@variant dark (&:where(.dark, .dark *));
|
@variant dark (&:where(.dark, .dark *));
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
body {
|
body {
|
||||||
background: var(--color-bg);
|
background: var(--color-bg);
|
||||||
color: var(--color-fg);
|
color: var(--color-fg);
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
|
font-family:
|
||||||
Arial, "Microsoft YaHei", sans-serif;
|
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Microsoft YaHei',
|
||||||
|
sans-serif;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user