mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-06 08:32:51 +08:00
🧑💻 修复eslint异常
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file eslint/vueEslint.js
|
* @file eslint/vueEslint.js
|
||||||
* @description Vue相关的ESLint配置
|
* @description Vue相关的ESLint配置
|
||||||
* @since Beta v0.7.7
|
* @since Beta v0.8.0
|
||||||
*/
|
*/
|
||||||
import pluginImport from "eslint-plugin-import";
|
import pluginImport from "eslint-plugin-import";
|
||||||
import pluginPrettier from "eslint-plugin-prettier";
|
import pluginPrettier from "eslint-plugin-prettier";
|
||||||
@@ -9,6 +9,7 @@ import pluginVue from "eslint-plugin-vue";
|
|||||||
import globals from "globals";
|
import globals from "globals";
|
||||||
import eslintTs from "typescript-eslint";
|
import eslintTs from "typescript-eslint";
|
||||||
import parserVue from "vue-eslint-parser";
|
import parserVue from "vue-eslint-parser";
|
||||||
|
import appRootPath from "app-root-path";
|
||||||
|
|
||||||
const tsConfigRules = {
|
const tsConfigRules = {
|
||||||
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "angle-bracket" }],
|
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "angle-bracket" }],
|
||||||
@@ -32,7 +33,7 @@ const tsConfig = {
|
|||||||
plugins: { typescript: eslintTs, import: pluginImport, prettier: pluginPrettier },
|
plugins: { typescript: eslintTs, import: pluginImport, prettier: pluginPrettier },
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
parser: eslintTs.parser,
|
parser: eslintTs.parser,
|
||||||
parserOptions: { project: "tsconfig.json", tsconfigRootDir: "." },
|
parserOptions: { project: "tsconfig.json", tsconfigRootDir: appRootPath.path },
|
||||||
},
|
},
|
||||||
rules: tsConfigRules,
|
rules: tsConfigRules,
|
||||||
};
|
};
|
||||||
@@ -48,7 +49,7 @@ const vueConfig = {
|
|||||||
parserOptions: {
|
parserOptions: {
|
||||||
parser: eslintTs.parser,
|
parser: eslintTs.parser,
|
||||||
extraFileExtensions: [".vue"],
|
extraFileExtensions: [".vue"],
|
||||||
tsconfigRootDir: ".",
|
tsconfigRootDir: appRootPath.path,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
rules: { ...tsConfigRules, "vue/multi-word-component-names": "off" },
|
rules: { ...tsConfigRules, "vue/multi-word-component-names": "off" },
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
"ajv": "^8.17.1",
|
"ajv": "^8.17.1",
|
||||||
"artplayer": "^5.3.0",
|
"artplayer": "^5.3.0",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
"color-convert": "^3.1.1",
|
"color-convert": "^3.1.0",
|
||||||
"echarts": "^6.0.0",
|
"echarts": "^6.0.0",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"js-md5": "^0.8.3",
|
"js-md5": "^0.8.3",
|
||||||
@@ -116,6 +116,7 @@
|
|||||||
"@typescript-eslint/parser": "^8.43.0",
|
"@typescript-eslint/parser": "^8.43.0",
|
||||||
"@typescript/native-preview": "7.0.0-dev.20250908.1",
|
"@typescript/native-preview": "7.0.0-dev.20250908.1",
|
||||||
"@vitejs/plugin-vue": "^6.0.1",
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
|
"app-root-path": "^3.1.0",
|
||||||
"concurrently": "^9.2.1",
|
"concurrently": "^9.2.1",
|
||||||
"eslint": "^9.35.0",
|
"eslint": "^9.35.0",
|
||||||
"eslint-plugin-import": "^2.32.0",
|
"eslint-plugin-import": "^2.32.0",
|
||||||
|
|||||||
20
pnpm-lock.yaml
generated
20
pnpm-lock.yaml
generated
@@ -54,8 +54,8 @@ importers:
|
|||||||
specifier: ^2.0.11
|
specifier: ^2.0.11
|
||||||
version: 2.0.11
|
version: 2.0.11
|
||||||
color-convert:
|
color-convert:
|
||||||
specifier: ^3.1.1
|
specifier: ^3.1.0
|
||||||
version: 3.1.1
|
version: 3.1.0
|
||||||
echarts:
|
echarts:
|
||||||
specifier: ^6.0.0
|
specifier: ^6.0.0
|
||||||
version: 6.0.0
|
version: 6.0.0
|
||||||
@@ -141,6 +141,9 @@ importers:
|
|||||||
'@vitejs/plugin-vue':
|
'@vitejs/plugin-vue':
|
||||||
specifier: ^6.0.1
|
specifier: ^6.0.1
|
||||||
version: 6.0.1(vite@7.1.5(@types/node@24.3.1)(jiti@2.5.1)(sass-embedded@1.92.1)(sass@1.92.1)(terser@5.39.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2))
|
version: 6.0.1(vite@7.1.5(@types/node@24.3.1)(jiti@2.5.1)(sass-embedded@1.92.1)(sass@1.92.1)(terser@5.39.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.21(typescript@5.9.2))
|
||||||
|
app-root-path:
|
||||||
|
specifier: ^3.1.0
|
||||||
|
version: 3.1.0
|
||||||
concurrently:
|
concurrently:
|
||||||
specifier: ^9.2.1
|
specifier: ^9.2.1
|
||||||
version: 9.2.1
|
version: 9.2.1
|
||||||
@@ -1323,6 +1326,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-BGcItUBWSMRgOCe+SVZJ+S7yTRG0eGt9cXAHev72yuGcY23hnLA7Bky5L/xLyPINoSN95geovfBkqoTlNZYa7w==}
|
resolution: {integrity: sha512-BGcItUBWSMRgOCe+SVZJ+S7yTRG0eGt9cXAHev72yuGcY23hnLA7Bky5L/xLyPINoSN95geovfBkqoTlNZYa7w==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
|
|
||||||
|
app-root-path@3.1.0:
|
||||||
|
resolution: {integrity: sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==}
|
||||||
|
engines: {node: '>= 6.0.0'}
|
||||||
|
|
||||||
argparse@2.0.1:
|
argparse@2.0.1:
|
||||||
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
||||||
|
|
||||||
@@ -1474,10 +1481,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
|
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
|
||||||
engines: {node: '>=7.0.0'}
|
engines: {node: '>=7.0.0'}
|
||||||
|
|
||||||
color-convert@3.1.1:
|
color-convert@3.1.0:
|
||||||
resolution: {integrity: sha512-TVoqAq8ZDIpK5lsQY874DDnu65CSsc9vzq0wLpNQ6UMBq81GSZocVazPiBbYGzngzBOIRahpkTzCLVe2at4MfA==, tarball: https://registry.npmmirror.com/color-convert/-/color-convert-3.1.0.tgz}
|
resolution: {integrity: sha512-TVoqAq8ZDIpK5lsQY874DDnu65CSsc9vzq0wLpNQ6UMBq81GSZocVazPiBbYGzngzBOIRahpkTzCLVe2at4MfA==}
|
||||||
engines: {node: '>=14.6'}
|
engines: {node: '>=14.6'}
|
||||||
deprecated: '[WARNING] Use 3.1.0 instead of 3.1.1, reason: https://github.com/debug-js/debug/issues/1005'
|
|
||||||
|
|
||||||
color-name@1.1.4:
|
color-name@1.1.4:
|
||||||
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
|
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
|
||||||
@@ -4695,6 +4701,8 @@ snapshots:
|
|||||||
|
|
||||||
ansis@4.1.0: {}
|
ansis@4.1.0: {}
|
||||||
|
|
||||||
|
app-root-path@3.1.0: {}
|
||||||
|
|
||||||
argparse@2.0.1: {}
|
argparse@2.0.1: {}
|
||||||
|
|
||||||
array-buffer-byte-length@1.0.2:
|
array-buffer-byte-length@1.0.2:
|
||||||
@@ -4884,7 +4892,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
color-name: 1.1.4
|
color-name: 1.1.4
|
||||||
|
|
||||||
color-convert@3.1.1:
|
color-convert@3.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
color-name: 2.0.0
|
color-name: 2.0.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user