mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-06 08:32:51 +08:00
🔧 格式化配置
This commit is contained in:
5
.eslintignore
Normal file
5
.eslintignore
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Build
|
||||||
|
dist
|
||||||
|
src-tauri/target
|
||||||
|
# Submodules
|
||||||
|
TGAssistant
|
||||||
@@ -5,86 +5,31 @@ env:
|
|||||||
extends:
|
extends:
|
||||||
- plugin:vue/vue3-recommended
|
- plugin:vue/vue3-recommended
|
||||||
- standard-with-typescript
|
- standard-with-typescript
|
||||||
overrides: []
|
- prettier
|
||||||
parser: vue-eslint-parser
|
- plugin:prettier/recommended
|
||||||
|
parser: "@typescript-eslint/parser"
|
||||||
parserOptions:
|
parserOptions:
|
||||||
parser: "@typescript-eslint/parser"
|
parser: vue-eslint-parser
|
||||||
ecmaVersion: latest
|
|
||||||
sourceType: module
|
|
||||||
extraFileExtensions:
|
|
||||||
- .vue
|
|
||||||
project:
|
project:
|
||||||
- ./tsconfig.json
|
- tsconfig.json
|
||||||
- ./tsconfig.node.json
|
- tsconfig.node.json
|
||||||
globals:
|
globals:
|
||||||
TGApp: readonly
|
TGApp: readonly
|
||||||
plugins:
|
plugins:
|
||||||
- vue
|
- vue
|
||||||
|
- prettier
|
||||||
rules:
|
rules:
|
||||||
# some rules that not normal disabled
|
# 严格布尔表达式
|
||||||
semi: off
|
|
||||||
quotes: off
|
|
||||||
# rules of standard
|
|
||||||
no-tabs:
|
|
||||||
- warn
|
|
||||||
- allowIndentationTabs: false # 禁止使用 tab 缩进
|
|
||||||
comma-dangle:
|
|
||||||
- warn
|
|
||||||
- always-multiline # 多行时,尾随逗号必须存在
|
|
||||||
camelcase:
|
|
||||||
- warn
|
|
||||||
- properties: always # 对象属性名必须使用驼峰命名
|
|
||||||
array-callback-return:
|
|
||||||
- error
|
|
||||||
- allowImplicit: true
|
|
||||||
# rules of vue
|
|
||||||
vue/max-attributes-per-line:
|
|
||||||
- off
|
|
||||||
# vue/max-len: # 限制代码长度不得超过这个长度
|
|
||||||
# - warn
|
|
||||||
# - code: 80
|
|
||||||
vue/html-indent:
|
|
||||||
- warn
|
|
||||||
- 2 # Vue 标签缩进
|
|
||||||
- baseIndent: 1 # 最外面的template缩进
|
|
||||||
vue/component-name-in-template-casing:
|
|
||||||
- warn # 组件应使用PascalCase命名
|
|
||||||
- "PascalCase"
|
|
||||||
vue/multi-word-component-names:
|
|
||||||
- off # 组件名应该是由多个单词组成
|
|
||||||
# rules of typescript
|
|
||||||
"@typescript-eslint/strict-boolean-expressions":
|
"@typescript-eslint/strict-boolean-expressions":
|
||||||
- off
|
|
||||||
"@typescript-eslint/indent":
|
|
||||||
- warn
|
- warn
|
||||||
- 2 # js/ts缩进
|
# 禁止使用 Object
|
||||||
"@typescript-eslint/semi":
|
"@typescript-eslint/consistent-type-assertions":
|
||||||
- warn
|
- warn
|
||||||
- always # 语句末尾必须加分号
|
- assertionStyle: angle-bracket # 使用尖括号
|
||||||
"@typescript-eslint/quotes":
|
# 命名规范
|
||||||
|
"@typescript-eslint/naming-convention":
|
||||||
- warn
|
- warn
|
||||||
- double # 引号使用双引号
|
- selector: variableLike
|
||||||
"@typescript-eslint/comma-dangle":
|
format: ["camelCase", "UPPER_CASE", "PascalCase", "snake_case"]
|
||||||
- warn
|
leadingUnderscore: "allow"
|
||||||
- always-multiline
|
trailingUnderscore: "allow"
|
||||||
"@typescript-eslint/prefer-nullish-coalescing": off # on 会出现一些问题
|
|
||||||
"@typescript-eslint/space-before-function-paren":
|
|
||||||
- warn
|
|
||||||
- always # 函数名和括号之间必须有空格
|
|
||||||
"@typescript-eslint/ban-types":
|
|
||||||
- warn
|
|
||||||
- types:
|
|
||||||
Object: # 禁止使用 Object
|
|
||||||
message: "Use {} instead"
|
|
||||||
fixWith: "{}"
|
|
||||||
Boolean: # 禁止使用 Boolean
|
|
||||||
message: "Use boolean instead"
|
|
||||||
Number: # 禁止使用 Number
|
|
||||||
message: "Use number instead"
|
|
||||||
String: # 禁止使用 String
|
|
||||||
message: "Use string instead"
|
|
||||||
Symbol: # 禁止使用 Symbol
|
|
||||||
message: "Use symbol instead"
|
|
||||||
"@typescript-eslint/no-floating-promises":
|
|
||||||
- warn
|
|
||||||
- ignoreVoid: true # 忽略 void 类型
|
|
||||||
|
|||||||
@@ -2,15 +2,8 @@
|
|||||||
.idea
|
.idea
|
||||||
# Visual Studio Code Setting
|
# Visual Studio Code Setting
|
||||||
.vscode
|
.vscode
|
||||||
# Node Modules
|
|
||||||
node_modules
|
|
||||||
package-lock.json
|
|
||||||
# Tauri build
|
# Tauri build
|
||||||
dist
|
dist
|
||||||
src-tauri/target
|
src-tauri/target
|
||||||
# submodules
|
# submodules
|
||||||
TGAssistant
|
TGAssistant
|
||||||
# Docs
|
|
||||||
README.md
|
|
||||||
LICENSE
|
|
||||||
docs
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
"semi": true
|
semi: true
|
||||||
"singleQuote": false
|
singleQuote: false
|
||||||
"printWidth": 120
|
printWidth: 100
|
||||||
"useTabs": true
|
useTabs: false
|
||||||
"proseWrap": "preserve"
|
tabWidth: 2
|
||||||
"bracketSpacing": true
|
bracketSpacing: true
|
||||||
"endOfLine": "crlf"
|
endOfLine: "crlf"
|
||||||
|
trailingComma: "all"
|
||||||
|
|||||||
@@ -3,4 +3,7 @@ extends:
|
|||||||
- stylelint-order
|
- stylelint-order
|
||||||
- stylelint-declaration-block-no-ignored-properties
|
- stylelint-declaration-block-no-ignored-properties
|
||||||
- stylelint-config-standard-vue
|
- stylelint-config-standard-vue
|
||||||
rules: {}
|
plugins:
|
||||||
|
- stylelint-prettier
|
||||||
|
rules:
|
||||||
|
"prettier/prettier": true
|
||||||
|
|||||||
14474
package-lock.json
generated
14474
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
165
package.json
165
package.json
@@ -1,83 +1,86 @@
|
|||||||
{
|
{
|
||||||
"name": "tauri-genshin",
|
"name": "tauri-genshin",
|
||||||
"description": "A Genshin Tool build with Tauri",
|
"description": "A Genshin Tool build with Tauri",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
"author": "BTMuli <bt-muli@outlook.com>",
|
"author": "BTMuli <bt-muli@outlook.com>",
|
||||||
"packageManager": "npm@9.6.6",
|
"packageManager": "npm@9.6.6",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tauri build",
|
"build": "tauri build",
|
||||||
"debug": "tauri build --debug",
|
"debug": "tauri build --debug",
|
||||||
"dev": "concurrently -k \"tauri dev --exit-on-panic\" \"vue-devtools\"",
|
"dev": "concurrently -k \"tauri dev --exit-on-panic\" \"vue-devtools\"",
|
||||||
"lint": "concurrently \"npm:lint:*(!fix)\"",
|
"lint": "concurrently \"npm:lint:*(!fix)\"",
|
||||||
"lint:code": "eslint \"./src/**/*.{vue,ts,tsx,js,jsx}\"",
|
"lint:fix": "concurrently \"npm:lint:*:fix\"",
|
||||||
"lint:code:fix": "npm run lint:code -- --fix",
|
"lint:code": "eslint .",
|
||||||
"lint:fix": "concurrently \"npm:lint:*:fix\"",
|
"lint:code:fix": "eslint . --fix",
|
||||||
"lint:style": "stylelint \"./src/**/*.{vue,css}\"",
|
"lint:style": "stylelint \"src/**/*.{vue,css}\"",
|
||||||
"lint:style:fix": "npm run lint:style -- --fix",
|
"lint:style:fix": "npm run lint:style -- --fix",
|
||||||
"prettier": "prettier \"**/*.{json,yml,html}\" --write",
|
"prettier": "prettier . --write",
|
||||||
"tauri": "tauri",
|
"tauri": "tauri",
|
||||||
"update:submodule": "git submodule update --remote --recursive",
|
"update:submodule": "git submodule update --remote --recursive",
|
||||||
"vite:dev": "vite dev",
|
"vite:dev": "vite dev",
|
||||||
"vite:build": "vite build"
|
"vite:build": "vite build"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/BTMuli/Tauri.Genshin/issues"
|
"url": "https://github.com/BTMuli/Tauri.Genshin/issues"
|
||||||
},
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"doc": "docs"
|
"doc": "docs"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/BTMuli/Tauri.Genshin#readme",
|
"homepage": "https://github.com/BTMuli/Tauri.Genshin#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Tauri",
|
"Tauri",
|
||||||
"Node",
|
"Node",
|
||||||
"Typescript",
|
"Typescript",
|
||||||
"Vite",
|
"Vite",
|
||||||
"Genshin Impact",
|
"Genshin Impact",
|
||||||
"Vuetify"
|
"Vuetify"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/BTMuli/Tauri.Genshin.git"
|
"url": "https://github.com/BTMuli/Tauri.Genshin.git"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mdi/font": "7.2.96",
|
"@mdi/font": "7.2.96",
|
||||||
"@tauri-apps/api": "^1.4.0",
|
"@tauri-apps/api": "^1.4.0",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
"pinia": "^2.1.4",
|
"pinia": "^2.1.4",
|
||||||
"pinia-plugin-persistedstate": "^3.1.0",
|
"pinia-plugin-persistedstate": "^3.1.0",
|
||||||
"tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql",
|
"tauri-plugin-sql-api": "github:tauri-apps/tauri-plugin-sql",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-json-viewer": "^3.0.4",
|
"vue-json-viewer": "^3.0.4",
|
||||||
"vue-router": "^4.2.2",
|
"vue-router": "^4.2.2",
|
||||||
"vuetify": "^3.3.3"
|
"vuetify": "^3.3.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "^1.4.0",
|
"@tauri-apps/cli": "^1.4.0",
|
||||||
"@types/js-md5": "^0.7.0",
|
"@types/js-md5": "^0.7.0",
|
||||||
"@types/node": "^20.3.1",
|
"@types/node": "^20.3.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
||||||
"@typescript-eslint/parser": "^5.60.0",
|
"@typescript-eslint/parser": "^5.60.0",
|
||||||
"@vitejs/plugin-vue": "^4.2.3",
|
"@vitejs/plugin-vue": "^4.2.3",
|
||||||
"@vue/devtools": "^6.5.0",
|
"@vue/devtools": "^6.5.0",
|
||||||
"concurrently": "^8.2.0",
|
"concurrently": "^8.2.0",
|
||||||
"eslint": "^8.43.0",
|
"eslint": "^8.43.0",
|
||||||
"eslint-config-standard-with-typescript": "^35.0.0",
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-config-standard-with-typescript": "^35.0.0",
|
||||||
"eslint-plugin-n": "^15.7.0",
|
"eslint-plugin-import": "^2.27.5",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-n": "^15.7.0",
|
||||||
"eslint-plugin-vue": "^9.15.0",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"prettier": "2.8.8",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"stylelint": "^15.8.0",
|
"eslint-plugin-vue": "^9.15.0",
|
||||||
"stylelint-config-standard-vue": "^1.0.0",
|
"prettier": "2.8.8",
|
||||||
"stylelint-declaration-block-no-ignored-properties": "^2.7.0",
|
"stylelint": "^15.8.0",
|
||||||
"stylelint-high-performance-animation": "^1.8.0",
|
"stylelint-config-standard-vue": "^1.0.0",
|
||||||
"stylelint-order": "^6.0.3",
|
"stylelint-declaration-block-no-ignored-properties": "^2.7.0",
|
||||||
"typescript": "^5.1.3",
|
"stylelint-high-performance-animation": "^1.8.0",
|
||||||
"vite": "^4.3.9",
|
"stylelint-order": "^6.0.3",
|
||||||
"vite-plugin-vuetify": "^1.0.2"
|
"stylelint-prettier": "^3.0.0",
|
||||||
}
|
"typescript": "^5.1.3",
|
||||||
|
"vite": "^4.3.9",
|
||||||
|
"vite-plugin-vuetify": "^1.0.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "Node",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"lib": ["ESNext", "DOM"],
|
"lib": ["ESNext", "DOM"],
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"types": ["vite/client"]
|
"types": ["vite/client"]
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "./tsconfig.node.json"
|
"path": "./tsconfig.node.json"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"strict": true,
|
||||||
"module": "ESNext",
|
"composite": true,
|
||||||
"moduleResolution": "Node",
|
"module": "ESNext",
|
||||||
"allowSyntheticDefaultImports": true
|
"moduleResolution": "Node",
|
||||||
},
|
"allowSyntheticDefaultImports": true
|
||||||
"include": ["vite.config.ts"]
|
},
|
||||||
|
"include": ["vite.config.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user