feat(lint): ts-standard linting configuration

This commit is contained in:
2025-03-19 15:27:50 +02:00
parent b9f1933af0
commit 19474e4873
6 changed files with 3418 additions and 10 deletions

2
env.d.ts vendored
View File

@@ -1 +1 @@
/// <reference types="vite/client" />
import 'vite/client'

View File

@@ -1,7 +1,7 @@
import pluginVue from 'eslint-plugin-vue'
import {
defineConfigWithVueTs,
vueTsConfigs,
vueTsConfigs
} from '@vue/eslint-config-typescript'
import { includeIgnoreFile } from '@eslint/compat'
import path from 'node:path'
@@ -17,11 +17,18 @@ export default defineConfigWithVueTs([
// your overrides
},
...pluginVue.configs['flat/essential'],
vueTsConfigs.recommended,
vueTsConfigs.recommendedTypeChecked,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'script'
sourceType: 'script',
parserOptions: {
project: [
'./tsconfig.json',
'./tsconfig.node.json',
'./tsconfig.eslint.json'
]
}
}
}
])

3393
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,6 +10,8 @@
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --fix",
"type-lint": "ts-standard",
"type-fix": "ts-standard --fix",
"format": "prettier --write src/ index.html .github/ .vscode/"
},
"dependencies": {
@@ -29,6 +31,7 @@
"eslint-plugin-vue": "^10",
"npm-run-all2": "^7.0.0",
"prettier": "^3.0.3",
"ts-standard": "^12.0.2",
"typescript": "~5.8.0",
"vite": "^6",
"vite-plugin-vue-devtools": "^7.0.18",

14
tsconfig.eslint.json Normal file
View File

@@ -0,0 +1,14 @@
{
"extends": "./tsconfig.node.json",
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"env.d.ts",
"eslint.config.mjs",
"vite.config.ts"
],
"exclude": [
"node_modules"
]
}

View File

@@ -6,6 +6,9 @@
},
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.eslint.json"
}
]
}