Compare commits

..

No commits in common. "1daeea0cbb57e22f02c1998115dfe2be2c2e4b2e" and "ed2a24f1e37bc9d735500fa0654e5a1c6bf2d422" have entirely different histories.

23 changed files with 830 additions and 806 deletions

View File

@ -1,10 +1,11 @@
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginVue from "eslint-plugin-vue";
import * as parserVue from "vue-eslint-parser";
import configPrettier from "eslint-config-prettier";
import pluginPrettier from "eslint-plugin-prettier";
import { defineConfig, globalIgnores } from "eslint/config";
import * as parserTypeScript from "@typescript-eslint/parser";
import pluginTypeScript from "@typescript-eslint/eslint-plugin";
export default defineConfig([
globalIgnores([
@ -19,7 +20,7 @@ export default defineConfig([
...js.configs.recommended,
languageOptions: {
globals: {
// types/index.d.ts
// index.d.ts
RefType: "readonly",
EmitType: "readonly",
TargetContext: "readonly",
@ -72,10 +73,21 @@ export default defineConfig([
]
}
},
...tseslint.config({
extends: [...tseslint.configs.recommended],
{
files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"],
languageOptions: {
parser: parserTypeScript,
parserOptions: {
sourceType: "module",
warnOnUnsupportedTypeScriptVersion: false
}
},
plugins: {
"@typescript-eslint": pluginTypeScript
},
rules: {
...pluginTypeScript.configs.strict.rules,
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
@ -102,20 +114,20 @@ export default defineConfig([
}
]
}
}),
},
{
files: ["**/*.d.ts"],
rules: {
"eslint-comments/no-unlimited-disable": "off",
"import/no-duplicates": "off",
"no-restricted-syntax": "off",
"unused-imports/no-unused-vars": "off"
}
},
{
files: ["**/*.?([cm])js"],
rules: {
"@typescript-eslint/no-require-imports": "off"
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "off"
}
},
{
@ -136,19 +148,18 @@ export default defineConfig([
jsx: true
},
extraFileExtensions: [".vue"],
parser: tseslint.parser,
parser: "@typescript-eslint/parser",
sourceType: "module"
}
},
plugins: {
"@typescript-eslint": tseslint.plugin,
vue: pluginVue
},
processor: pluginVue.processors[".vue"],
rules: {
...pluginVue.configs.base.rules,
...pluginVue.configs.essential.rules,
...pluginVue.configs.recommended.rules,
...pluginVue.configs["vue3-essential"].rules,
...pluginVue.configs["vue3-recommended"].rules,
"no-undef": "off",
"no-unused-vars": "off",
"vue/no-v-html": "off",

View File

@ -25,7 +25,7 @@ export default defineFakeRoute([
url: "/mine-logs",
method: "get",
response: () => {
const list = [
let list = [
{
id: 1,
ip: faker.internet.ipv4(),

View File

@ -117,7 +117,7 @@
"@commitlint/cli": "^19.8.0",
"@commitlint/config-conventional": "^19.8.0",
"@commitlint/types": "^19.8.0",
"@eslint/js": "^9.24.0",
"@eslint/js": "^9.23.0",
"@faker-js/faker": "^9.6.0",
"@iconify/json": "^2.2.321",
"@iconify/vue": "4.2.0",
@ -133,16 +133,18 @@
"@types/qrcode": "^1.5.5",
"@types/qs": "^6.9.18",
"@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
"@vitejs/plugin-vue": "^5.2.3",
"@vitejs/plugin-vue-jsx": "^4.1.2",
"boxen": "^8.0.1",
"code-inspector-plugin": "^0.20.7",
"cssnano": "^7.0.6",
"dagre": "^0.8.5",
"eslint": "^9.24.0",
"eslint": "^9.23.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-prettier": "^5.2.6",
"eslint-plugin-vue": "^10.0.0",
"eslint-plugin-prettier": "^5.2.5",
"eslint-plugin-vue": "^9.33.0",
"gradient-string": "^3.0.0",
"husky": "^9.1.7",
"lint-staged": "^15.5.0",
@ -162,7 +164,6 @@
"svgo": "^3.3.2",
"tailwindcss": "^4.1.3",
"typescript": "^5.8.2",
"typescript-eslint": "^8.29.1",
"unplugin-icons": "^22.1.0",
"vite": "^6.2.3",
"vite-plugin-cdn-import": "^1.0.1",
@ -171,7 +172,7 @@
"vite-plugin-remove-console": "^2.2.0",
"vite-plugin-router-warn": "^1.0.0",
"vite-svg-loader": "^5.1.0",
"vue-eslint-parser": "^10.1.3",
"vue-eslint-parser": "^9.4.3",
"vue-tsc": "^2.2.8"
},
"engines": {
@ -193,6 +194,11 @@
"abab": "*",
"glob": "*"
},
"peerDependencyRules": {
"allowedVersions": {
"eslint": "9"
}
},
"onlyBuiltDependencies": [
"@parcel/watcher",
"core-js",

1538
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@ import { ref, unref, onMounted } from "vue";
import { LogicFlow } from "@logicflow/core";
interface Props {
lf?: LogicFlow;
lf: LogicFlow;
catTurboData?: boolean;
}

View File

@ -9,8 +9,8 @@ type nodeListType = {
};
interface Props {
lf?: LogicFlow;
nodeList?: Array<nodeListType>;
lf: LogicFlow;
nodeList: Array<nodeListType>;
}
const props = withDefaults(defineProps<Props>(), {

View File

@ -60,15 +60,12 @@ export function copyObj() {
copyIsArray,
clone,
i = 1,
// eslint-disable-next-line prefer-rest-params
target = arguments[0] || {}, // 使用||运算符排除隐式强制类型转换为false的数据类型
deep = false,
// eslint-disable-next-line prefer-const
len = arguments.length;
if (typeof target === "boolean") {
deep = target;
// eslint-disable-next-line prefer-rest-params
target = arguments[1] || {};
i++;
}
@ -82,7 +79,6 @@ export function copyObj() {
for (; i < len; i++) {
//所以如果源对象中数据类型为Undefined或Null那么就会跳过本次循环接着循环下一个源对象
// eslint-disable-next-line prefer-rest-params
if ((options = arguments[i]) != null) {
// 如果遇到源对象的数据类型为Boolean, Number for in循环会被跳过不执行for in循环// src用于判断target对象是否存在name属性
for (name in options) {

View File

@ -32,8 +32,8 @@ const calculate = (
const offset = el.getBoundingClientRect();
// 获取点击位置距离 el 的垂直和水平距离
const localX = e.clientX - offset.left;
const localY = e.clientY - offset.top;
let localX = e.clientX - offset.left;
let localY = e.clientY - offset.top;
let radius = 0;
let scale = 0.3;

View File

@ -6,7 +6,7 @@ import EnterOutlined from "@/assets/svg/enter_outlined.svg?component";
import ArrowUpLine from "~icons/ri/arrow-up-line";
import ArrowDownLine from "~icons/ri/arrow-down-line";
withDefaults(defineProps<{ total?: number }>(), {
withDefaults(defineProps<{ total: number }>(), {
total: 0
});

View File

@ -7,7 +7,7 @@ import { useNav } from "@/layout/hooks/useNav";
import ArrowLeft from "~icons/ri/arrow-left-double-fill";
interface Props {
isActive?: boolean;
isActive: boolean;
}
withDefaults(defineProps<Props>(), {

View File

@ -7,7 +7,7 @@ import { useNav } from "@/layout/hooks/useNav";
import MenuFold from "~icons/ri/menu-fold-fill";
interface Props {
isActive?: boolean;
isActive: boolean;
}
withDefaults(defineProps<Props>(), {

View File

@ -4,7 +4,7 @@ import MenuFold from "~icons/ri/menu-fold-fill";
import MenuUnfold from "~icons/ri/menu-unfold-fill";
interface Props {
isActive?: boolean;
isActive: boolean;
}
withDefaults(defineProps<Props>(), {

View File

@ -10,7 +10,7 @@ import zhLocale from "element-plus/es/locale/lang/zh-cn";
const siphonI18n = (function () {
// 仅初始化一次国际化配置
const cache = Object.fromEntries(
let cache = Object.fromEntries(
Object.entries(
import.meta.glob("../../locales/*.y(a)?ml", { eager: true })
).map(([key, value]: any) => {

View File

@ -140,10 +140,8 @@ Print.prototype = {
"position:absolute;width:0;height:0;top:-10px;left:-10px;"
);
// eslint-disable-next-line prefer-const
w = f.contentWindow || f.contentDocument;
// eslint-disable-next-line prefer-const
doc = f.contentDocument || f.contentWindow.document;
doc.open();
doc.write(content);

View File

@ -3,7 +3,7 @@ import { ref } from "vue";
// props
export interface FormProps {
formInline?: {
formInline: {
user: string;
region: string;
};

View File

@ -3,7 +3,7 @@ import { useVModel } from "@vueuse/core";
// props
export interface FormProps {
data?: string;
data: string;
}
// props

View File

@ -3,7 +3,7 @@ import { ref } from "vue";
// props
export interface FormProps {
formInline?: {
formInline: {
user: string;
region: string;
};

View File

@ -3,7 +3,7 @@ import { useVModel } from "@vueuse/core";
// props
export interface FormProps {
data?: string;
data: string;
}
// props

View File

@ -73,7 +73,7 @@ export function useColumns(selectRef: Ref, formRef: Ref, tableRef: Ref) {
const onSearch = () => {
tableData.value = cloneTableData;
if (!isAllEmpty(searchForm.sexValue)) {
const sex = sexOptions
let sex = sexOptions
.map(sex => sex.value === Number(searchForm.sexValue) && sex.label)
.filter(Boolean)[0];
tableData.value = tableData.value.filter(data => data.sex === sex);

2
types/index.d.ts vendored
View File

@ -75,6 +75,8 @@ interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
$el: T;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function parseInt(s: string | number, radix?: number): number;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function parseFloat(string: string | number): number;

2
types/router.d.ts vendored
View File

@ -104,6 +104,6 @@ declare global {
// https://router.vuejs.org/zh/guide/advanced/meta.html#typescript
declare module "vue-router" {
// eslint-disable-next-line
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface RouteMeta extends CustomizeRouteMeta {}
}

View File

@ -1,4 +1,4 @@
import type Vue, { type VNode } from "vue";
import Vue, { VNode } from "vue";
declare module "*.tsx" {
import Vue from "compatible-vue";
@ -7,9 +7,7 @@ declare module "*.tsx" {
declare global {
namespace JSX {
// eslint-disable-next-line
interface Element extends VNode {}
// eslint-disable-next-line
interface ElementClass extends Vue {}
interface ElementAttributesProperty {
$props: any;

View File

@ -1,6 +1,5 @@
declare module "*.vue" {
import type { DefineComponent } from "vue";
// eslint-disable-next-line
const component: DefineComponent<{}, {}, any>;
export default component;
}