mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-06 08:32:51 +08:00
🔧 完善格式化配置
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
semi: true
|
||||
singleQuote: false
|
||||
printWidth: 100
|
||||
useTabs: false
|
||||
tabWidth: 2
|
||||
bracketSpacing: true
|
||||
endOfLine: auto
|
||||
printWidth: 100
|
||||
semi: true
|
||||
singleQuote: false
|
||||
tabWidth: 2
|
||||
trailingComma: all
|
||||
useTabs: false
|
||||
|
||||
@@ -1,20 +1,42 @@
|
||||
customSyntax: postcss-html
|
||||
extends:
|
||||
- stylelint-high-performance-animation
|
||||
- stylelint-order
|
||||
- stylelint-declaration-block-no-ignored-properties
|
||||
- stylelint-config-standard-vue
|
||||
- stylelint-config-standard-scss
|
||||
- stylelint-config-idiomatic-order
|
||||
overrides:
|
||||
- customSyntax: postcss-scss
|
||||
files:
|
||||
- "*.scss"
|
||||
plugins:
|
||||
- stylelint-scss
|
||||
- stylelint-prettier
|
||||
- stylelint-order
|
||||
- "@btmuli/stylelint-plugin-color"
|
||||
rules:
|
||||
property-no-vendor-prefix:
|
||||
- true
|
||||
- ignoreProperties: [backdrop-filter]
|
||||
color-hex-length: long
|
||||
prettier/prettier: true
|
||||
color/format:
|
||||
- true
|
||||
- hexa
|
||||
import-notation: string
|
||||
no-descending-specificity:
|
||||
- true
|
||||
- severity: warning
|
||||
order/order:
|
||||
- custom-properties
|
||||
- declarations
|
||||
- rules
|
||||
- at-rules
|
||||
prettier/prettier: true
|
||||
property-no-vendor-prefix:
|
||||
- true
|
||||
- ignoreProperties: [backdrop-filter]
|
||||
rule-empty-line-before:
|
||||
- always
|
||||
- except: ["first-nested"]
|
||||
selector-class-pattern: null
|
||||
selector-pseudo-class-no-unknown:
|
||||
- true
|
||||
- ignorePseudoClasses: ["deep"]
|
||||
|
||||
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug",
|
||||
@@ -9,5 +8,6 @@
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"type": "node"
|
||||
}
|
||||
]
|
||||
],
|
||||
"version": "0.2.0"
|
||||
}
|
||||
|
||||
30
.vscode/settings.json
vendored
30
.vscode/settings.json
vendored
@@ -1,33 +1,33 @@
|
||||
{
|
||||
"editor.tabSize": 2,
|
||||
"eslint.format.enable": true,
|
||||
"eslint.quiet": false,
|
||||
"eslint.lintTask.enable": true,
|
||||
"eslint.validate": ["typescript", "vue"],
|
||||
"stylelint.enable": true,
|
||||
"stylelint.validate": ["css", "less", "postcss"],
|
||||
"css.validate": false,
|
||||
"less.validate": false,
|
||||
"scss.validate": false,
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[javascriptreact]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[scss]": {
|
||||
"editor.defaultFormatter": "stylelint.vscode-stylelint"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"[scss]": {
|
||||
"editor.defaultFormatter": "stylelint.vscode-stylelint"
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
"css.validate": false,
|
||||
"editor.rulers": [80, 120],
|
||||
"editor.tabSize": 2,
|
||||
"eslint.format.enable": true,
|
||||
"eslint.lintTask.enable": true,
|
||||
"eslint.quiet": false,
|
||||
"eslint.validate": ["typescript", "vue"],
|
||||
"less.validate": false,
|
||||
"scss.validate": false,
|
||||
"stylelint.enable": true,
|
||||
"stylelint.validate": ["css", "less", "postcss"],
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"vue.features.codeActions.enable": false
|
||||
}
|
||||
|
||||
4
.vscode/tasks.json
vendored
4
.vscode/tasks.json
vendored
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
@@ -7,5 +6,6 @@
|
||||
"problemMatcher": ["$eslint-compact", "$eslint-stylish"],
|
||||
"label": "npm: lint:code"
|
||||
}
|
||||
]
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
import eslint_jsonc from "eslint-plugin-jsonc";
|
||||
import eslint_js from "@eslint/js";
|
||||
import eslint_ts from "typescript-eslint";
|
||||
import eslint_vue from "eslint-plugin-vue";
|
||||
/**
|
||||
* @file eslint.config.mjs
|
||||
* @description ESLint配置文件
|
||||
* @since 2025-05-29
|
||||
*/
|
||||
import eslintPluginJsonc from "eslint-plugin-jsonc";
|
||||
import eslintPluginJs from "@eslint/js";
|
||||
import eslintPluginTs from "typescript-eslint";
|
||||
import eslintPluginVue from "eslint-plugin-vue";
|
||||
|
||||
import { jsonEslintConfig } from "./eslint/jsonEslint.js";
|
||||
import { vueEslintConfig } from "./eslint/vueEslint.js";
|
||||
import ymlEslintConfig from "./eslint/ymlEslint.js";
|
||||
import eslintConfigJson from "./eslint/jsonEslint.js";
|
||||
import eslintConfigVue from "./eslint/vueEslint.js";
|
||||
import eslintConfigYml from "./eslint/ymlEslint.js";
|
||||
|
||||
export default [
|
||||
eslint_js.configs.recommended,
|
||||
...eslint_jsonc.configs["flat/recommended-with-jsonc"],
|
||||
...eslint_ts.configs.recommended,
|
||||
...eslint_vue.configs["flat/essential"],
|
||||
...jsonEslintConfig,
|
||||
...vueEslintConfig,
|
||||
ymlEslintConfig,
|
||||
eslintPluginJs.configs.recommended,
|
||||
...eslintPluginJsonc.configs["flat/recommended-with-jsonc"],
|
||||
...eslintPluginTs.configs.recommended,
|
||||
...eslintPluginVue.configs["flat/essential"],
|
||||
...eslintConfigJson,
|
||||
...eslintConfigVue,
|
||||
eslintConfigYml,
|
||||
{
|
||||
ignores: [
|
||||
"dist",
|
||||
@@ -24,10 +29,7 @@ export default [
|
||||
"src-tauri/tauri.conf.json",
|
||||
"src-tauri/**/*.json",
|
||||
"qodana.yaml",
|
||||
".github",
|
||||
".vscode",
|
||||
".prettierrc.yml",
|
||||
".stylelintrc.yml",
|
||||
".github"
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @file eslint/jsonEslint.js
|
||||
* @description JSON相关的ESLint配置
|
||||
* @since Beta v0.7.7
|
||||
*/
|
||||
|
||||
import pluginJsonc from "eslint-plugin-jsonc";
|
||||
import parserJsonc from "jsonc-eslint-parser";
|
||||
|
||||
@@ -66,4 +72,6 @@ const jsoncConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
export const jsonEslintConfig = [pkgJsonConfig, tscJsonConfig, jsoncConfig];
|
||||
const eslintConfigJson = [pkgJsonConfig, tscJsonConfig, jsoncConfig];
|
||||
|
||||
export default eslintConfigJson;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @file eslint/vueEslint.js
|
||||
* @description Vue相关的ESLint配置
|
||||
* @since Beta v0.7.7
|
||||
*/
|
||||
import pluginImport from "eslint-plugin-import";
|
||||
import pluginPrettier from "eslint-plugin-prettier";
|
||||
import pluginVue from "eslint-plugin-vue";
|
||||
@@ -49,4 +54,7 @@ const vueConfig = {
|
||||
rules: { ...tsConfigRules, "vue/multi-word-component-names": "off" },
|
||||
};
|
||||
|
||||
export const vueEslintConfig = [tsConfig, vueConfig];
|
||||
const eslintConfigVue = [tsConfig, vueConfig];
|
||||
|
||||
export default eslintConfigVue;
|
||||
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
/**
|
||||
* @file eslint/ymlEslint.js
|
||||
* @description YAML相关的ESLint配置
|
||||
* @since Beta v0.7.7
|
||||
*/
|
||||
import pluginYml from "eslint-plugin-yml";
|
||||
import parserYml from "yaml-eslint-parser";
|
||||
|
||||
const ymlEslintConfig = {
|
||||
const eslintConfigYml = {
|
||||
files: ["**/*.yml", "**/*.yaml"],
|
||||
plugins: { yml: pluginYml },
|
||||
languageOptions: {
|
||||
@@ -16,4 +21,4 @@ const ymlEslintConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
export default ymlEslintConfig;
|
||||
export default eslintConfigYml;
|
||||
|
||||
16
package.json
16
package.json
@@ -40,7 +40,8 @@
|
||||
"prettier --write",
|
||||
"stylelint --fix"
|
||||
],
|
||||
"*.{yml,json,md}": [
|
||||
"*.{yml,json}": [
|
||||
"eslint --fix",
|
||||
"prettier --write"
|
||||
],
|
||||
"*.rs": [
|
||||
@@ -94,11 +95,11 @@
|
||||
"qrcode.vue": "^3.6.0",
|
||||
"sass-embedded": "^1.89.0",
|
||||
"uuid": "^11.1.0",
|
||||
"vue": "^3.5.14",
|
||||
"vue": "^3.5.16",
|
||||
"vue-echarts": "^7.0.3",
|
||||
"vue-json-pretty": "^2.4.0",
|
||||
"vue-router": "^4.5.1",
|
||||
"vuetify": "^3.8.6",
|
||||
"vuetify": "^3.8.7",
|
||||
"wcag-color": "^1.1.1",
|
||||
"xml-js": "^1.6.11"
|
||||
},
|
||||
@@ -110,9 +111,9 @@
|
||||
"@types/color-convert": "^2.0.4",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/js-md5": "^0.7.2",
|
||||
"@types/node": "^22.15.21",
|
||||
"@types/node": "^22.15.24",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/parser": "^8.32.1",
|
||||
"@typescript-eslint/parser": "^8.33.0",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"concurrently": "^9.1.2",
|
||||
"eslint": "^9.27.0",
|
||||
@@ -125,11 +126,12 @@
|
||||
"globals": "^16.2.0",
|
||||
"husky": "^9.1.7",
|
||||
"jsonc-eslint-parser": "^2.4.0",
|
||||
"lint-staged": "^16.0.0",
|
||||
"lint-staged": "^16.1.0",
|
||||
"oxlint": "^0.16.12",
|
||||
"prettier": "3.5.3",
|
||||
"stylelint": "^16.19.1",
|
||||
"stylelint-config-idiomatic-order": "^10.0.0",
|
||||
"stylelint-config-standard-scss": "^15.0.1",
|
||||
"stylelint-config-standard-vue": "^1.0.0",
|
||||
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
||||
"stylelint-high-performance-animation": "^1.11.0",
|
||||
@@ -138,7 +140,7 @@
|
||||
"stylelint-scss": "^6.12.0",
|
||||
"tsx": "^4.19.4",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.32.1",
|
||||
"typescript-eslint": "^8.33.0",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-vue-devtools": "^7.7.6",
|
||||
"vite-plugin-vuetify": "^2.1.1",
|
||||
|
||||
1033
pnpm-lock.yaml
generated
1033
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -45,7 +45,9 @@
|
||||
"scripts/*.ts",
|
||||
"tsconfig.json",
|
||||
"vite.config.ts",
|
||||
"eslint.config.mjs"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
"eslint.config.mjs",
|
||||
".prettierrc.yml",
|
||||
".stylelintrc.yml",
|
||||
"eslint/*.js"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user