mirror of
https://github.com/BidingCC/BuildingAI.git
synced 2026-09-01 15:48:39 +08:00
style: eslint配置更新
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
* 认证相关常量
|
||||
* @description 定义登录和认证相关的常量
|
||||
*/
|
||||
|
||||
export const LOGIN_METHOD = {
|
||||
/** 微信登录 */
|
||||
WECHAT: 3,
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import { dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { config as baseConfig } from "@fastbuildai/config/eslint/base";
|
||||
import { config as httpConfig } from "@fastbuildai/config/eslint/http";
|
||||
import vuePlugin from "eslint-plugin-vue";
|
||||
import tseslint from "typescript-eslint";
|
||||
import vueParser from "vue-eslint-parser";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
/** @type {import("eslint").Linter.Config} */
|
||||
export default [
|
||||
// 忽略规则 - 排除自动生成的代码和构建目录
|
||||
@@ -12,7 +18,16 @@ export default [
|
||||
},
|
||||
|
||||
// TypeScript 推荐配置
|
||||
...tseslint.configs.recommended,
|
||||
...tseslint.configs.recommended.map((config) => ({
|
||||
...config,
|
||||
languageOptions: {
|
||||
...config.languageOptions,
|
||||
parserOptions: {
|
||||
...config.languageOptions?.parserOptions,
|
||||
tsconfigRootDir: __dirname,
|
||||
},
|
||||
},
|
||||
})),
|
||||
|
||||
// Vue 相关配置
|
||||
{
|
||||
@@ -24,6 +39,7 @@ export default [
|
||||
parser: vueParser,
|
||||
parserOptions: {
|
||||
parser: tseslint.parser,
|
||||
tsconfigRootDir: __dirname,
|
||||
extraFileExtensions: [".vue"],
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
@@ -51,6 +67,9 @@ export default [
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
languageOptions: {
|
||||
parser: tseslint.parser,
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ export function useMessage(): MessageService {
|
||||
const createMessage = (
|
||||
type: MessageType,
|
||||
msg: string,
|
||||
opt: MessageOptions,
|
||||
opt?: MessageOptions,
|
||||
): MessageInstance => {
|
||||
const toastId = toast.add({
|
||||
...DEFAULT_OPTIONS,
|
||||
|
||||
Reference in New Issue
Block a user