diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index ffb355f8..00000000
--- a/.eslintignore
+++ /dev/null
@@ -1,14 +0,0 @@
-dist
-coverage
-node_modules
-dest
-types
-public/entry
-public/runtime
-
-comp-entry.ts
-config-entry.ts
-value-entry.ts
-
-magic-admin/web/public/runtime
-magic-admin/server/static
\ No newline at end of file
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
deleted file mode 100644
index 3751e8b3..00000000
--- a/.eslintrc.cjs
+++ /dev/null
@@ -1,71 +0,0 @@
-module.exports = {
- env: {
- node: true,
- browser: true,
- es2021: true,
- },
- globals: {
- describe: true,
- it: true,
- expect: true,
- beforeEach: true,
- },
- extends: [
- 'eslint-config-tencent',
- 'eslint-config-tencent/ts',
- 'plugin:vue/vue3-essential',
- './prettier.cjs',
- ],
- parser: 'vue-eslint-parser',
- parserOptions: {
- ecmaVersion: 12,
- parser: '@typescript-eslint/parser',
- extraFileExtensions: ['.vue'],
- sourceType: 'module',
- },
- plugins: [
- 'vue',
- '@typescript-eslint',
- 'simple-import-sort'
- ],
- ignorePatterns: ['.eslintrc.cjs'],
- rules: {
- 'vue/no-mutating-props': 'off',
- 'vue/multi-word-component-names': 'off',
- 'no-param-reassign': 'off',
- '@typescript-eslint/naming-convention': 'off',
- '@typescript-eslint/no-require-imports': 'off',
- "@typescript-eslint/no-misused-promises": [
- "error",
- {
- "checksVoidReturn": false
- }
- ],
- 'simple-import-sort/imports': [
- "error", {
- groups: [
- ['./polyfills'],
- // Node.js builtins. You could also generate this regex if you use a `.js` config.
- // For example: `^(${require("module").builtinModules.join("|")})(/|$)`
- [
- "^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)",
- ],
- ["^(node)(:.*|$)"],
- // Packages. `react|vue` related packages come first.
- ["^(react|vue|vite)", "^@?\\w"],
- ["^(@tmagic)(/.*|$)"],
- // Internal packages.
- ["^(@|@editor|@data-source)(/.*|$)"],
- // Side effect imports.
- ["^\\u0000"],
- // Parent imports. Put `..` last.
- ["^\\.\\.(?!/?$)", "^\\.\\./?$"],
- // Other relative imports. Put same-folder imports and `.` last.
- ["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
- // Style imports.
- ["^.+\\.s?css$"],
- ],
- }
- ]
- },
-};
diff --git a/.gitignore b/.gitignore
index 9f828c73..f72059d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,5 @@ coverage
auto-imports.d.ts
components.d.ts
docs/.vitepress/cache
+
+.eslintcache
diff --git a/docs/.vitepress/theme/components/demo-block.vue b/docs/.vitepress/theme/components/demo-block.vue
index 368d2dc2..bfccc7a3 100644
--- a/docs/.vitepress/theme/components/demo-block.vue
+++ b/docs/.vitepress/theme/components/demo-block.vue
@@ -17,11 +17,7 @@
-
+
@@ -30,23 +26,14 @@
-
- {{type === 'form' ? '查看结果' : '在线运行'}}
+
+ {{ type === 'form' ? '查看结果' : '在线运行' }}
-
+
@@ -60,7 +47,9 @@
transition: 0.2s;
&.hover {
- box-shadow: 0 0 8px 0 rgba(232, 237, 250, 0.6), 0 2px 4px 0 rgba(232, 237, 250, 0.5);
+ box-shadow:
+ 0 0 8px 0 rgba(232, 237, 250, 0.6),
+ 0 2px 4px 0 rgba(232, 237, 250, 0.5);
}
code {
@@ -219,9 +208,7 @@ export function stripTemplate(content) {
}
export default {
- props: [
- 'type', 'config'
- ],
+ props: ['type', 'config'],
data() {
return {
@@ -293,12 +280,15 @@ export default {
},
text() {
- return this.isStringConfig ?
- hljs.highlight('js', this.config).value :
- hljs.highlight('js', serialize(this.config, {
- space: 2,
- unsafe: true,
- }).replace(/"(\w+)":\s/g, '$1: ')).value;
+ return this.isStringConfig
+ ? hljs.highlight('js', this.config).value
+ : hljs.highlight(
+ 'js',
+ serialize(this.config, {
+ space: 2,
+ unsafe: true,
+ }).replace(/"(\w+)":\s/g, '$1: '),
+ ).value;
},
formConfig() {
@@ -307,7 +297,7 @@ export default {
isStringConfig() {
return typeof this.config === 'string';
- }
+ },
},
watch: {
@@ -356,7 +346,7 @@ export default {
});
},
- beforeDestroy() {
+ beforeUnmount() {
this.removeScrollHandler();
},
};
diff --git a/eslint-config/flat/base.mjs b/eslint-config/flat/base.mjs
new file mode 100644
index 00000000..9deaa414
--- /dev/null
+++ b/eslint-config/flat/base.mjs
@@ -0,0 +1,566 @@
+export default {
+ rules: {
+ /**
+ * 不要在中括号中添加空格
+ */
+ 'array-bracket-spacing': ['error', 'never'],
+ /**
+ * 数组的方法除了 forEach 之外,回调函数必须有返回值
+ */
+ 'array-callback-return': 'warn',
+ /**
+ * 要求箭头函数体使用大括号
+ */
+ 'arrow-body-style': ['warn', 'as-needed'],
+ /**
+ * 要求箭头函数的参数使用圆括号
+ */
+ 'arrow-parens': [
+ 'warn',
+ 'as-needed',
+ {
+ requireForBlockBody: true,
+ },
+ ],
+ /**
+ * 强制箭头函数的箭头前后使用一致的空格
+ */
+ 'arrow-spacing': 'warn',
+ /**
+ * 要求打开的块标志和同一行上的标志拥有一致的间距。此规则还会在同一行关闭的块标记和前边的标记强制实施一致的间距。
+ */
+ 'block-spacing': 'error',
+ /**
+ * 强制在代码块中使用一致的大括号风格
+ */
+ 'brace-style': 'error',
+ /**
+ * 使用驼峰命名法(camelCase)命名对象、函数和实例。
+ */
+ camelcase: [
+ 'error',
+ {
+ ignoreDestructuring: true,
+ properties: 'never',
+ },
+ ],
+ /**
+ * 添加尾随逗号
+ */
+ 'comma-dangle': ['warn', 'always-multiline'],
+ /**
+ * 强制在逗号前后使用一致的空格
+ */
+ 'comma-spacing': [
+ 'error',
+ {
+ before: false,
+ after: true,
+ },
+ ],
+ /**
+ * 强制使用一致的逗号风格
+ */
+ 'comma-style': ['error', 'last'],
+ /**
+ * 强制在计算的属性的方括号中使用一致的空格
+ */
+ 'computed-property-spacing': ['warn', 'never'],
+ /**
+ * 禁止使用 foo['bar'],必须写成 foo.bar
+ */
+ 'dot-notation': 'warn',
+ /**
+ * 要求或禁止文件末尾存在空行
+ */
+ 'eol-last': ['error', 'always'],
+ /**
+ * 必须使用 === 或 !==,禁止使用 == 或 !=
+ */
+ eqeqeq: ['warn', 'always'],
+ /**
+ * 要求或禁止在函数标识符和其调用之间有空格
+ */
+ 'func-call-spacing': ['error', 'never'],
+ /**
+ * 必须只使用函数声明或只使用函数表达式
+ */
+ 'func-style': ['off', 'expression'],
+ /**
+ * 强制在函数括号内使用一致的换行
+ */
+ 'function-paren-newline': ['warn', 'multiline'],
+ /**
+ * 强制 generator 函数中 * 号周围使用一致的空格
+ */
+ 'generator-star-spacing': [
+ 'warn',
+ {
+ before: false,
+ after: true,
+ },
+ ],
+ /**
+ * 限制变量名长度
+ */
+ 'id-length': 'off',
+ /**
+ * 强制隐式返回的箭头函数体的位置
+ */
+ 'implicit-arrow-linebreak': ['warn', 'beside'],
+ /**
+ * 使用 2 个空格缩进
+ */
+ indent: [
+ 'warn',
+ 2,
+ {
+ SwitchCase: 1,
+ VariableDeclarator: 1,
+ outerIIFEBody: 1,
+ FunctionDeclaration: {
+ parameters: 1,
+ body: 1,
+ },
+ FunctionExpression: {
+ parameters: 1,
+ body: 1,
+ },
+ CallExpression: {
+ arguments: 1,
+ },
+ ArrayExpression: 1,
+ ObjectExpression: 1,
+ ImportDeclaration: 1,
+ flatTernaryExpressions: false,
+ ignoredNodes: [
+ 'JSXElement',
+ 'JSXElement > *',
+ 'JSXAttribute',
+ 'JSXIdentifier',
+ 'JSXNamespacedName',
+ 'JSXMemberExpression',
+ 'JSXSpreadAttribute',
+ 'JSXExpressionContainer',
+ 'JSXOpeningElement',
+ 'JSXClosingElement',
+ 'JSXFragment',
+ 'JSXOpeningFragment',
+ 'JSXClosingFragment',
+ 'JSXText',
+ 'JSXEmptyExpression',
+ 'JSXSpreadChild',
+ ],
+ ignoreComments: false,
+ },
+ ],
+ /**
+ * 强制在对象字面量的属性中键和值之间使用一致的间距
+ */
+ 'key-spacing': 'error',
+ /**
+ * 强制在关键字前后使用一致的空格
+ */
+ 'keyword-spacing': [
+ 'error',
+ {
+ overrides: {
+ if: {
+ after: true,
+ },
+ for: {
+ after: true,
+ },
+ while: {
+ after: true,
+ },
+ else: {
+ after: true,
+ },
+ },
+ },
+ ],
+ /**
+ * 只允许使用 unix 的 LF 作为换行符,Windows 的 CRLF 不可以使用
+ */
+ 'linebreak-style': ['warn', 'unix'],
+ /**
+ * 强制一行的最大长度,限制单行不能超过100个字符,字符串和正则表达式除外。
+ */
+ 'max-len': [
+ 'off',
+ {
+ code: 120,
+ ignoreStrings: true,
+ ignoreUrls: true,
+ ignoreRegExpLiterals: true,
+ ignoreTemplateLiterals: true,
+ },
+ ],
+ /**
+ * 只有在命名构造器或者类的时候,才用帕斯卡拼命名法(PascalCase),即首字母大写。
+ */
+ 'new-cap': [
+ 'error',
+ {
+ newIsCap: true,
+ newIsCapExceptions: [],
+ capIsNew: false,
+ capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'],
+ properties: false,
+ },
+ ],
+ /**
+ * 在编写多个方法链式调用(超过两个方法链式调用)时。 使用前导点,强调这行是一个方法调用,而不是一个语句。
+ */
+ 'newline-per-chained-call': [
+ 'warn',
+ {
+ ignoreChainWithDepth: 2,
+ },
+ ],
+ /**
+ * 使用字面量语法创建数组。
+ */
+ 'no-array-constructor': ['error'],
+ /**
+ * 在 case 和 default 的子句中,如果存在声明 (例如. let, const, function, 和 class),使用大括号来创建块级作用域。
+ */
+ 'no-case-declarations': 'error',
+ /**
+ * 避免搞混箭头函数符号 (=>) 和比较运算符 (<=, >=)。
+ */
+ 'no-confusing-arrow': 'warn',
+ /**
+ * 禁止对使用 const 定义的常量重新赋值
+ */
+ 'no-const-assign': 'error',
+ /**
+ * 禁止重复定义类的成员
+ */
+ 'no-dupe-class-members': 'error',
+ /**
+ * 禁止在 else 内使用 return,必须改为提前结束
+ */
+ 'no-else-return': [
+ 'warn',
+ {
+ allowElseIf: false,
+ },
+ ],
+ /**
+ * 禁止使用 eval
+ */
+ 'no-eval': 'error',
+ /**
+ * 不要使用迭代器。
+ * @reason 推荐使用 JavaScript 的高阶函数代替 for-in。
+ */
+ 'no-iterator': 'warn',
+ /**
+ * 禁止在循环内的函数内部出现循环体条件语句中定义的变量
+ */
+ 'no-loop-func': 'error',
+ /**
+ * 禁止混合使用不同的操作符:
+ * - 禁止 `%`, `**` 之间混用
+ * - 禁止 `%` 与其它运算符之间混用
+ * - 禁止乘除运算符之间混用
+ * - 禁止位运算符之间的任何混用
+ * - 禁止比较运算符之间混用
+ * - 禁止 `&&`, `||` 之间混用
+ */
+ 'no-mixed-operators': [
+ 'error',
+ {
+ groups: [
+ ['%', '**'],
+ ['%', '+'],
+ ['%', '-'],
+ ['%', '*'],
+ ['%', '/'],
+ ['&', '|', '<<', '>>', '>>>'],
+ ['==', '!=', '===', '!=='],
+ ['&&', '||'],
+ ],
+ allowSamePrecedence: false,
+ },
+ ],
+ /**
+ * 禁止连续赋值,比如 foo = bar = 1
+ */
+ 'no-multi-assign': 'error',
+ /**
+ * 不要使用多个空行填充代码。
+ */
+ 'no-multiple-empty-lines': 'error',
+ /**
+ * 禁止使用嵌套的三元表达式,比如 a ? b : c ? d : e
+ */
+ 'no-nested-ternary': 'warn',
+ /**
+ * 禁止使用 new Function
+ * @reason 这和 eval 是等价的
+ */
+ 'no-new-func': 'error',
+ /**
+ * 禁止直接 new Object
+ */
+ 'no-new-object': 'error',
+ /**
+ * 禁止使用 new 来生成 String, Number 或 Boolean
+ */
+ 'no-new-wrappers': 'warn',
+ /**
+ * 禁止对函数的参数重新赋值
+ */
+ 'no-param-reassign': [
+ 'warn',
+ {
+ props: true,
+ ignorePropertyModificationsFor: [
+ 'acc',
+ 'accumulator',
+ 'e',
+ 'ctx',
+ 'req',
+ 'request',
+ 'res',
+ 'response',
+ '$scope',
+ 'staticContext',
+ 'state',
+ ],
+ },
+ ],
+ /**
+ * 禁止使用 ++ 或 --
+ */
+ 'no-plusplus': [
+ 'error',
+ {
+ allowForLoopAfterthoughts: true,
+ },
+ ],
+ /**
+ * 禁止使用 hasOwnProperty, isPrototypeOf 或 propertyIsEnumerable
+ */
+ 'no-prototype-builtins': 'error',
+ /**
+ * 计算指数时,可以使用 ** 运算符。
+ */
+ 'no-restricted-properties': [
+ 'warn',
+ {
+ object: 'Math',
+ property: 'pow',
+ message: 'Please use ** instand',
+ },
+ ],
+ /**
+ * 推荐使用 JavaScript 的高阶函数代替 for-in
+ */
+ 'no-restricted-syntax': [
+ 'warn',
+ {
+ selector: 'ForInStatement',
+ message:
+ 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
+ },
+ {
+ selector: 'LabeledStatement',
+ message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
+ },
+ {
+ selector: 'WithStatement',
+ message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
+ },
+ ],
+ /**
+ * 避免在行尾添加空格。
+ */
+ 'no-trailing-spaces': 'error',
+ /**
+ * 变量应先声明再使用,禁止引用任何未声明的变量,除非你明确知道引用的变量存在于当前作用域链上。
+ */
+ 'no-undef': ['error'],
+ /**
+ * 禁止变量名出现下划线
+ */
+ 'no-underscore-dangle': 'warn',
+ /**
+ * 必须使用 !a 替代 a ? false : true
+ */
+ 'no-unneeded-ternary': 'warn',
+ /**
+ * 已定义的变量必须使用
+ * 但不检查最后一个使用的参数之前的参数
+ * 也不检查 rest 属性的兄弟属性
+ */
+ 'no-unused-vars': [
+ 'error',
+ {
+ args: 'after-used',
+ ignoreRestSiblings: true,
+ argsIgnorePattern: '^_.+',
+ varsIgnorePattern: '^_.+',
+ },
+ ],
+ /**
+ * 禁止出现没必要的 constructor
+ */
+ 'no-useless-constructor': 'warn',
+ /**
+ * 禁止出现没必要的转义
+ */
+ 'no-useless-escape': 'error',
+ /**
+ * 禁止使用 var
+ */
+ 'no-var': 'error',
+ /**
+ * 禁止属性前有空白
+ */
+ 'no-whitespace-before-property': 'warn',
+ /**
+ * 强制单个语句的位置
+ */
+ 'nonblock-statement-body-position': ['error', 'beside'],
+ /**
+ * 强制在大括号中使用一致的空格
+ */
+ 'object-curly-spacing': ['warn', 'always'],
+ /**
+ * 将对象方法、属性简写,且间歇属性放在前面。
+ */
+ 'object-shorthand': 'warn',
+ /**
+ * 禁止变量申明时用逗号一次申明多个
+ */
+ 'one-var': ['warn', 'never'],
+ /**
+ * 避免在赋值语句 = 前后换行。如果你的代码单行长度超过了 max-len 定义的长度而不得不换行,那么使用括号包裹。
+ */
+ 'operator-linebreak': [
+ 'error',
+ 'before',
+ {
+ overrides: {
+ '=': 'none',
+ },
+ },
+ ],
+ /**
+ * 要求或禁止块内填充
+ */
+ 'padded-blocks': ['error', 'never'],
+ /**
+ * 要求回调函数使用箭头函数
+ */
+ 'prefer-arrow-callback': 'warn',
+ /**
+ * 申明后不再被修改的变量必须使用 const 来申明
+ */
+ 'prefer-const': [
+ 'error',
+ {
+ destructuring: 'any',
+ ignoreReadBeforeAssign: false,
+ },
+ ],
+ /**
+ * 优先使用解构赋值
+ */
+ 'prefer-destructuring': [
+ 'warn',
+ {
+ VariableDeclarator: {
+ array: false,
+ object: true,
+ },
+ AssignmentExpression: {
+ array: true,
+ object: false,
+ },
+ },
+ {
+ enforceForRenamedProperties: false,
+ },
+ ],
+ /**
+ * 必须使用 ...args 而不是 arguments
+ */
+ 'prefer-rest-params': 'warn',
+ /**
+ * 必须使用 ... 而不是 apply,比如 foo(...args)
+ */
+ 'prefer-spread': 'warn',
+ /**
+ * 必须使用模版字符串而不是字符串连接
+ */
+ 'prefer-template': 'error',
+ /**
+ * 要求对象字面量属性名称用引号括起来
+ */
+ 'quote-props': [
+ 'error',
+ 'as-needed',
+ {
+ keywords: false,
+ },
+ ],
+ /**
+ * 使用单引号 '' 定义字符串
+ */
+ quotes: [
+ 'warn',
+ 'single',
+ {
+ allowTemplateLiterals: false,
+ },
+ ],
+ /**
+ * parseInt 必须传入第二个参数
+ */
+ radix: 'warn',
+ /**
+ * 要加分号
+ */
+ semi: ['error', 'always'],
+ /**
+ * 强制在块之前使用一致的空格
+ */
+ 'space-before-blocks': 'error',
+ /**
+ * 强制在 function 的左括号之前使用一致的空格
+ */
+ 'space-before-function-paren': [
+ 'error',
+ {
+ anonymous: 'always',
+ named: 'never',
+ asyncArrow: 'always',
+ },
+ ],
+ /**
+ * 强制在圆括号内使用一致的空格
+ */
+ 'space-in-parens': ['error', 'never'],
+ /**
+ * 要求操作符周围有空格
+ */
+ 'space-infix-ops': 'error',
+ /**
+ * 注释的斜线或 * 后必须有空格
+ */
+ 'spaced-comment': ['error', 'always'],
+ /**
+ * 要求或禁止模板字符串中的嵌入表达式周围空格的使用
+ */
+ 'template-curly-spacing': ['error', 'never'],
+ /**
+ * 要求立即执行的函数使用括号括起来
+ */
+ 'wrap-iife': ['error', 'outside'],
+ },
+};
diff --git a/eslint-config/flat/import-sort.mjs b/eslint-config/flat/import-sort.mjs
new file mode 100644
index 00000000..0bce8d51
--- /dev/null
+++ b/eslint-config/flat/import-sort.mjs
@@ -0,0 +1,38 @@
+import simpleImportSort from 'eslint-plugin-simple-import-sort';
+
+export default {
+ files: ['**/*.{js,mjs,cjs,ts,vue}'],
+ plugins: {
+ 'simple-import-sort': simpleImportSort,
+ },
+ rules: {
+ 'simple-import-sort/imports': [
+ 'error',
+ {
+ groups: [
+ ['./polyfills'],
+ ['^(node)(:.*|$)'],
+ // Node.js builtins. You could also generate this regex if you use a `.js` config.
+ // For example: `^(${require("module").builtinModules.join("|")})(/|$)`
+ [
+ '^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)',
+ ],
+ // Packages. `react|vue` related packages come first.
+ ['^(react|vue|vite|vitest)', '^@?\\w'],
+ ['^(@tencent)(/.*|$)'],
+ ['^(@tmagic)(/.*|$)'],
+ // Internal packages.
+ ['^(@|@editor|@data-source)(/.*|$)'],
+ // Side effect imports.
+ ['^\\u0000'],
+ // Parent imports. Put `..` last.
+ ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
+ // Other relative imports. Put same-folder imports and `.` last.
+ ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
+ // Style imports.
+ ['^.+\\.s?css$'],
+ ],
+ },
+ ],
+ },
+};
diff --git a/eslint-config/flat/import.mjs b/eslint-config/flat/import.mjs
new file mode 100644
index 00000000..8455faef
--- /dev/null
+++ b/eslint-config/flat/import.mjs
@@ -0,0 +1,37 @@
+import { rules } from 'eslint-plugin-import';
+
+export default {
+ plugins: {
+ import: {
+ meta: { name: 'eslint-plugin-import' },
+ rules,
+ },
+ },
+ files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
+ languageOptions: {
+ ecmaVersion: 2018,
+ sourceType: 'module',
+ },
+ rules: {
+ /**
+ * 导入语句前不允许有任何非导入语句
+ */
+ 'import/first': 'error',
+ /**
+ * 禁止重复导入模块
+ */
+ 'import/no-duplicates': 'error',
+ /**
+ * 禁止使用 let 导出
+ */
+ 'import/no-mutable-exports': 'warn',
+ /**
+ * 禁用导入的模块时使用 webpack 特有的语法(感叹号)
+ */
+ 'import/no-webpack-loader-syntax': 'warn',
+ /**
+ * 当只有一个导出时,必须使用 export default 来导出
+ */
+ 'import/prefer-default-export': 'off',
+ },
+};
diff --git a/prettier.cjs b/eslint-config/flat/prettier.mjs
similarity index 98%
rename from prettier.cjs
rename to eslint-config/flat/prettier.mjs
index 063c17bd..556276e4 100644
--- a/prettier.cjs
+++ b/eslint-config/flat/prettier.mjs
@@ -1,5 +1,4 @@
-module.exports = {
- plugins: ['prettier'],
+export default {
rules: {
'wrap-iife': 'off',
'template-curly-spacing': 'off',
diff --git a/eslint-config/flat/ts.mjs b/eslint-config/flat/ts.mjs
new file mode 100644
index 00000000..f3d3a3b5
--- /dev/null
+++ b/eslint-config/flat/ts.mjs
@@ -0,0 +1,376 @@
+export default {
+ files: ['**/*.ts', '**/*.tsx'],
+ rules: {
+ 'brace-style': 'off',
+ 'no-empty-function': 'off',
+ // https://github.com/typescript-eslint/typescript-eslint/issues/491
+ 'no-invalid-this': 'off',
+ 'no-magic-numbers': 'off',
+ 'react/sort-comp': 'off',
+ 'func-call-spacing': 'off',
+ 'comma-spacing': 'off',
+ 'dot-notation': 'off',
+ indent: 'off',
+ 'keyword-spacing': 'off',
+ camelcase: 'off',
+ 'no-underscore-dangle': 'off',
+ 'no-array-constructor': 'off',
+ 'no-dupe-class-members': 'off',
+ 'no-undef': 'off',
+ 'no-unused-vars': 'off',
+ 'no-useless-constructor': 'off',
+ quotes: 'off',
+ semi: 'off',
+ 'space-before-function-paren': 'off',
+ // https://github.com/typescript-eslint/typescript-eslint/issues/600
+ 'spaced-comment': ['error', 'always', { markers: ['/'] }],
+ /**
+ * 重载的函数必须写在一起
+ * @reason 增加可读性
+ */
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
+ /** 同 JS 规则的 TS 版本 */
+ '@stylistic/ts/brace-style': 'error',
+ /** 同 JS 规则的 TS 版本 */
+ '@stylistic/comma-spacing': [
+ 'error',
+ {
+ before: false,
+ after: true,
+ },
+ ],
+ /**
+ * 类型断言必须使用 as Type,禁止使用 ,禁止对对象字面量进行类型断言(断言成 any 是允许的)
+ * @reason 容易被理解为 jsx
+ */
+ '@typescript-eslint/consistent-type-assertions': [
+ 'error',
+ {
+ assertionStyle: 'as',
+ objectLiteralTypeAssertions: 'never',
+ },
+ ],
+ /**
+ * 优先使用 interface 而不是 type
+ */
+ '@typescript-eslint/consistent-type-definitions': 'off',
+ /** 同 JS 规则的 TS 版本 */
+ '@typescript-eslint/dot-notation': 'warn',
+ /**
+ * 必须设置类的成员的可访问性
+ * @reason 将不需要公开的成员设为私有的,可以增强代码的可理解性,对文档输出也很友好
+ */
+ '@typescript-eslint/explicit-member-accessibility': 'off',
+ /**
+ * 要求或禁止在函数标识符和其调用之间有空格
+ */
+ '@stylistic/ts/func-call-spacing': ['error', 'never'],
+ /** 同 JS 规则的 TS 版本 */
+ '@stylistic/ts/indent': [
+ 'warn',
+ 2,
+ {
+ SwitchCase: 1,
+ VariableDeclarator: 1,
+ outerIIFEBody: 1,
+ FunctionDeclaration: {
+ parameters: 1,
+ body: 1,
+ },
+ FunctionExpression: {
+ parameters: 1,
+ body: 1,
+ },
+ CallExpression: {
+ arguments: 1,
+ },
+ ArrayExpression: 1,
+ ObjectExpression: 1,
+ ImportDeclaration: 1,
+ flatTernaryExpressions: false,
+ ignoredNodes: [
+ 'JSXElement',
+ 'JSXElement > *',
+ 'JSXAttribute',
+ 'JSXIdentifier',
+ 'JSXNamespacedName',
+ 'JSXMemberExpression',
+ 'JSXSpreadAttribute',
+ 'JSXExpressionContainer',
+ 'JSXOpeningElement',
+ 'JSXClosingElement',
+ 'JSXFragment',
+ 'JSXOpeningFragment',
+ 'JSXClosingFragment',
+ 'JSXText',
+ 'JSXEmptyExpression',
+ 'JSXSpreadChild',
+ ],
+ ignoreComments: false,
+ },
+ ],
+ /** 同 JS 规则的 TS 版本 */
+ '@stylistic/ts/keyword-spacing': [
+ 'error',
+ {
+ overrides: {
+ if: {
+ after: true,
+ },
+ for: {
+ after: true,
+ },
+ while: {
+ after: true,
+ },
+ else: {
+ after: true,
+ },
+ },
+ before: true,
+ after: true,
+ },
+ ],
+ /**
+ * 指定类成员的排序规则
+ * @reason 优先级:
+ * 1. static > instance
+ * 2. field > constructor > method
+ * 3. public > protected > private
+ */
+ '@typescript-eslint/member-ordering': [
+ 'error',
+ {
+ default: [
+ 'public-static-field',
+ 'protected-static-field',
+ 'private-static-field',
+ 'static-field',
+ 'public-static-method',
+ 'protected-static-method',
+ 'private-static-method',
+ 'static-method',
+ 'public-instance-field',
+ 'protected-instance-field',
+ 'private-instance-field',
+ 'public-field',
+ 'protected-field',
+ 'private-field',
+ 'instance-field',
+ 'field',
+ 'constructor',
+ 'public-instance-method',
+ 'protected-instance-method',
+ 'private-instance-method',
+ 'public-method',
+ 'protected-method',
+ 'private-method',
+ 'instance-method',
+ 'method',
+ ],
+ },
+ ],
+ /**
+ * 接口中的方法必须用属性的方式定义
+ */
+ '@typescript-eslint/method-signature-style': 'off',
+ /** 代替 JS 规则 camelCase 的 TS 规则 */
+ '@typescript-eslint/naming-convention': [
+ 'warn',
+ {
+ selector: 'function',
+ format: ['camelCase', 'PascalCase'],
+ },
+ {
+ selector: 'variable',
+ format: ['camelCase', 'UPPER_CASE'],
+ },
+ {
+ selector: 'variable',
+ modifiers: ['global'],
+ format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
+ },
+ {
+ selector: 'variable',
+ format: ['camelCase', 'PascalCase'],
+ types: ['function'],
+ },
+ {
+ selector: 'variable',
+ modifiers: ['exported'],
+ format: ['UPPER_CASE'],
+ types: ['boolean', 'string', 'number', 'array'],
+ },
+ {
+ selector: 'variable',
+ modifiers: ['exported'],
+ format: ['camelCase', 'PascalCase'],
+ types: ['function'],
+ },
+ {
+ selector: ['class', 'typeLike'],
+ format: ['PascalCase'],
+ },
+ {
+ selector: ['classMethod', 'classProperty'],
+ leadingUnderscore: 'forbid',
+ trailingUnderscore: 'forbid',
+ format: ['camelCase'],
+ },
+ ],
+ /** 同 JS 规则的 TS 版本 */
+ '@typescript-eslint/no-array-constructor': 'error',
+ /** 同 JS 规则的 TS 版本 */
+ '@typescript-eslint/no-dupe-class-members': 'error',
+ /**
+ * 禁止定义空的接口
+ */
+ '@typescript-eslint/no-empty-interface': 'error',
+ /**
+ * 禁止给一个初始化时直接赋值为 number, string 的变量显式的声明类型
+ * @reason 可以简化代码
+ */
+ '@typescript-eslint/no-inferrable-types': 'warn',
+ /**
+ * 禁止对 promise 的误用,详见示例
+ */
+ '@typescript-eslint/no-misused-promises': [
+ 'error',
+ {
+ checksConditionals: true,
+ },
+ ],
+ /**
+ * 禁止使用 namespace 来定义命名空间
+ * @reason 使用 es6 引入模块,才是更标准的方式。
+ * 但是允许使用 declare namespace ... {} 来定义外部命名空间
+ */
+ '@typescript-eslint/no-namespace': [
+ 'error',
+ {
+ allowDeclarations: true,
+ allowDefinitionFiles: true,
+ },
+ ],
+ /**
+ * 禁止在 optional chaining 之后使用 non-null 断言(感叹号)
+ * @reason optional chaining 后面的属性一定是非空的
+ */
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
+ /**
+ * 禁止给类的构造函数的参数添加修饰符
+ */
+ '@typescript-eslint/no-parameter-properties': 'off',
+ /**
+ * 禁止使用 require
+ * @reason 统一使用 import 来引入模块,特殊情况使用单行注释允许 require 引入
+ */
+ '@typescript-eslint/no-require-imports': 'error',
+ /**
+ * 禁止将 this 赋值给其他变量,除非是解构赋值
+ */
+ '@typescript-eslint/no-this-alias': [
+ 'error',
+ {
+ allowDestructuring: true,
+ },
+ ],
+ /**
+ * 禁止无用的表达式
+ */
+ '@typescript-eslint/no-unused-expressions': [
+ 'error',
+ {
+ allowShortCircuit: true,
+ allowTernary: true,
+ allowTaggedTemplates: true,
+ },
+ ],
+ /** 同 JS 规则的 TS 版本 */
+ '@typescript-eslint/no-unused-vars': [
+ 'error',
+ {
+ args: 'after-used',
+ ignoreRestSiblings: true,
+ argsIgnorePattern: '^_.+',
+ varsIgnorePattern: '^_.+',
+ },
+ ],
+ /**
+ * 禁止出现没必要的 constructor
+ */
+ '@typescript-eslint/no-useless-constructor': 'warn',
+ /**
+ * 使用 for 循环遍历数组时,如果索引仅用于获取成员,则必须使用 for of 循环替代 for 循环
+ * @reason for of 循环更加易读
+ */
+ '@typescript-eslint/prefer-for-of': 'warn',
+ /**
+ * 使用函数类型别名替代包含函数调用声明的接口
+ */
+ '@typescript-eslint/prefer-function-type': 'warn',
+ /**
+ * 禁止使用 module 来定义命名空间
+ * @reason module 已成为 js 的关键字
+ */
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
+ /**
+ * 使用 optional chaining 替代 &&
+ */
+ '@typescript-eslint/prefer-optional-chain': 'error',
+ /** 同 JS 规则的 TS 版本 */
+ '@stylistic/ts/quotes': [
+ 'warn',
+ 'single',
+ {
+ allowTemplateLiterals: false,
+ },
+ ],
+ /** 同 JS 规则的 TS 版本 */
+ '@stylistic/ts/semi': ['error', 'always'],
+ /** 同 JS 规则的 TS 版本 */
+ '@stylistic/ts/space-before-function-paren': [
+ 'error',
+ {
+ anonymous: 'always',
+ named: 'never',
+ asyncArrow: 'always',
+ },
+ ],
+ /**
+ * 禁止使用三斜杠导入文件
+ * @reason 三斜杠是已废弃的语法,但在类型声明文件中还是可以使用的
+ */
+ '@typescript-eslint/triple-slash-reference': [
+ 'error',
+ {
+ path: 'never',
+ types: 'always',
+ lib: 'always',
+ },
+ ],
+ /**
+ * 在类型注释周围需要一致的间距
+ */
+ '@stylistic/ts/type-annotation-spacing': 'error',
+ /**
+ * interface 和 type 定义时必须声明成员的类型
+ */
+ '@typescript-eslint/typedef': [
+ 'error',
+ {
+ arrayDestructuring: false,
+ arrowParameter: false,
+ memberVariableDeclaration: false,
+ objectDestructuring: false,
+ parameter: false,
+ propertyDeclaration: true,
+ variableDeclaration: false,
+ },
+ ],
+ /**
+ * 函数重载时,若能通过联合类型将两个函数的类型声明合为一个,则使用联合类型而不是两个函数声明
+ */
+ '@typescript-eslint/unified-signatures': 'error',
+ },
+};
diff --git a/eslint-config/index.mjs b/eslint-config/index.mjs
new file mode 100644
index 00000000..b3f4ace3
--- /dev/null
+++ b/eslint-config/index.mjs
@@ -0,0 +1,39 @@
+import js from '@eslint/js';
+import stylistic from '@stylistic/eslint-plugin';
+import stylisticTs from '@stylistic/eslint-plugin-ts';
+import parserTs from '@typescript-eslint/parser';
+import { defineConfig } from 'eslint/config';
+import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
+import pluginVue from 'eslint-plugin-vue';
+import globals from 'globals';
+import tseslint from 'typescript-eslint';
+
+import tencentEslintBaseConfig from './flat/base.mjs';
+import tencentEslintImportexport from './flat/import.mjs';
+import ImportSortConfig from './flat/import-sort.mjs';
+import tencentEslintPrettierConfig from './flat/prettier.mjs';
+import tencentEslintTsConfig from './flat/ts.mjs';
+
+export default (tsconfigRootDir) =>
+ defineConfig([
+ { files: ['**/*.{js,mjs,cjs}'], plugins: { js }, extends: ['js/recommended'] },
+ { files: ['**/*.{js,mjs,cjs,ts,vue}'], languageOptions: { globals: { ...globals.browser, ...globals.node } } },
+ ...tseslint.config(tencentEslintBaseConfig, tencentEslintImportexport, tseslint.configs.base, {
+ plugins: {
+ '@stylistic': stylistic,
+ '@stylistic/ts': stylisticTs,
+ },
+ languageOptions: {
+ parser: parserTs,
+ parserOptions: {
+ project: tsconfigRootDir,
+ },
+ },
+ ...tencentEslintTsConfig,
+ }),
+ pluginVue.configs['flat/essential'],
+ { files: ['**/*.vue'], languageOptions: { parserOptions: { parser: tseslint.parser } } },
+ eslintPluginPrettierRecommended,
+ tencentEslintPrettierConfig,
+ ImportSortConfig,
+ ]);
diff --git a/eslint-config/package.json b/eslint-config/package.json
new file mode 100644
index 00000000..87956646
--- /dev/null
+++ b/eslint-config/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "@tmagic/eslint-config",
+ "version": "0.0.1",
+ "main": "index.mjs",
+ "type": "module",
+ "repository": {
+ "directory": "eslint-config",
+ "type": "git",
+ "url": "https://github.com/Tencent/tmagic-editor.git"
+ },
+ "dependencies": {
+ "@eslint/js": "^9.24.0",
+ "@typescript-eslint/parser": "^8.30.1",
+ "@typescript-eslint/eslint-plugin": "^8.30.1",
+ "@stylistic/eslint-plugin": "^4.2.0",
+ "@stylistic/eslint-plugin-ts": "^4.2.0",
+ "eslint-config-prettier": "^10.1.2",
+ "eslint-plugin-import": "^2.31.0",
+ "eslint-plugin-simple-import-sort": "^12.1.1",
+ "eslint-plugin-vue": "^10.0.0",
+ "eslint-plugin-prettier": "^5.2.6",
+ "globals": "^16.0.0",
+ "typescript-eslint": "^8.30.1"
+ },
+ "peerDependencies": {
+ "eslint": ">=9.24.0",
+ "prettier": ">=3.5.3"
+ }
+}
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 00000000..8ad0ffe6
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,41 @@
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+import { defineConfig, globalIgnores } from 'eslint/config';
+
+import eslintConfig from '@tmagic/eslint-config';
+
+export default defineConfig([
+ globalIgnores([
+ './docs/**/*',
+ './packages/cli/lib/**/*',
+ '*/**/auto-imports.d.ts',
+ '*/**/components.d.ts',
+ '*/**/dist/**/*',
+ '*/**/.tmagic/**/*',
+ '*/**/public/**/*',
+ '*/**/types/**/*',
+ '*/**/*.config.ts',
+ 'vite-env.d.ts',
+ ]),
+ ...eslintConfig(path.join(path.dirname(fileURLToPath(import.meta.url)), 'tsconfig.json')),
+ {
+ files: ['**/*.vue'],
+ rules: {
+ 'vue/no-mutating-props': 'off',
+ 'vue/multi-word-component-names': 'off',
+ },
+ },
+ {
+ files: ['**/*.{js,mjs,cjs,ts,vue}'],
+ rules: {
+ 'no-param-reassign': 'off',
+ },
+ },
+ {
+ files: ['**/*.tsx'],
+ rules: {
+ '@typescript-eslint/naming-convention': 'off',
+ },
+ },
+]);
diff --git a/package.json b/package.json
index 8f762037..ffeb9f29 100644
--- a/package.json
+++ b/package.json
@@ -9,8 +9,8 @@
"clean:top": "rimraf */**/dist */**/types */dist coverage dwt* temp packages/cli/lib",
"clean:modules": "rimraf node_modules **/node_modules **/**/node_modules",
"clean:all": "pnpm clean:top && pnpm clean:modules",
- "lint": "eslint . --ext .js,.vue,.ts,.tsx",
- "lint-fix": "eslint . --fix --ext .vue,.js,.ts,.tsx",
+ "lint": "eslint --cache .",
+ "lint-fix": "eslint --fix --cache .",
"playground": "pnpm --filter \"runtime-vue3\" build:libs && pnpm --filter \"runtime-vue3\" --filter \"tmagic-playground\" dev",
"pg": "pnpm playground",
"playground:vue2": "pnpm --filter \"runtime-vue2\" build:libs && pnpm --filter \"runtime-vue2\" --filter \"tmagic-playground\" dev:vue2",
@@ -46,9 +46,8 @@
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@rollup/plugin-alias": "^5.1.1",
+ "@tmagic/eslint-config": "workspace: ^*",
"@types/node": "18.19.61",
- "@typescript-eslint/eslint-plugin": "^5.62.0",
- "@typescript-eslint/parser": "^5.62.0",
"@vitejs/plugin-vue": "^5.2.3",
"@vitest/coverage-v8": "^2.1.9",
"@vue/compiler-sfc": "^3.5.13",
@@ -59,12 +58,7 @@
"cz-conventional-changelog": "^3.3.0",
"element-plus": "^2.9.7",
"enquirer": "^2.4.1",
- "eslint": "^8.57.1",
- "eslint-config-tencent": "^1.1.2",
- "eslint-plugin-import": "^2.31.0",
- "eslint-plugin-prettier": "^4.2.1",
- "eslint-plugin-simple-import-sort": "^10.0.0",
- "eslint-plugin-vue": "^9.33.0",
+ "eslint": "^9.25.0",
"execa": "^4.1.0",
"highlight.js": "^11.11.1",
"husky": "^7.0.4",
@@ -72,7 +66,7 @@
"lint-staged": "^11.2.6",
"minimist": "^1.2.8",
"picocolors": "^1.1.1",
- "prettier": "^2.8.8",
+ "prettier": "^3.5.3",
"recast": "^0.23.11",
"rimraf": "^3.0.2",
"rollup": "^4.38.0",
@@ -93,7 +87,7 @@
}
},
"lint-staged": {
- "*.{js,ts,vue}": "eslint --fix",
+ "*.{js,ts,vue}": "eslint --fix --cache",
"*.scss": "prettier --write"
}
}
diff --git a/packages/cli/src/Core.ts b/packages/cli/src/Core.ts
index 63e280d3..4b4a377f 100644
--- a/packages/cli/src/Core.ts
+++ b/packages/cli/src/Core.ts
@@ -1,4 +1,4 @@
-import path from 'path';
+import path from 'node:path';
import fs from 'fs-extra';
@@ -6,6 +6,7 @@ import { ModuleMainFilePath, UserConfig } from './types';
import { prepareEntryFile, resolveAppPackages } from './utils';
export default class Core {
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
public version = require('../package.json').version;
public options: UserConfig;
diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts
index b1de994d..221f61e5 100644
--- a/packages/cli/src/cli.ts
+++ b/packages/cli/src/cli.ts
@@ -29,6 +29,7 @@ export const cli = (defaultAppConfig: UserConfig): void => {
const program = cac('tmagic');
// display core version and cli version
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
const versionCli = require('../package.json').version;
program.version(`tmagic/cli@${versionCli}`);
diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts
index 0b7dd97f..00e87cfe 100644
--- a/packages/cli/src/commands/index.ts
+++ b/packages/cli/src/commands/index.ts
@@ -1,4 +1,4 @@
-import path from 'path';
+import path from 'node:path';
import fs from 'fs-extra';
diff --git a/packages/cli/src/utils/backupPackageFile.ts b/packages/cli/src/utils/backupPackageFile.ts
index ca91cc16..9655ddf9 100644
--- a/packages/cli/src/utils/backupPackageFile.ts
+++ b/packages/cli/src/utils/backupPackageFile.ts
@@ -1,5 +1,5 @@
-import fs from 'fs';
-import path from 'path';
+import fs from 'node:fs';
+import path from 'node:path';
export const backupFile = (runtimeSource: string, file: string) => {
const filePath = path.join(runtimeSource, file);
diff --git a/packages/cli/src/utils/loadUserConfig.ts b/packages/cli/src/utils/loadUserConfig.ts
index 4cc44678..62b43297 100644
--- a/packages/cli/src/utils/loadUserConfig.ts
+++ b/packages/cli/src/utils/loadUserConfig.ts
@@ -10,6 +10,7 @@ export const hasExportDefault = (mod: unknown): mod is { default: T } =
isPlainObject(mod) && !!mod.__esModule && Object.prototype.hasOwnProperty.call(mod, 'default');
export const loadUserConfigCjs: UserConfigLoader = async (userConfigPath) => {
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
const required = require(userConfigPath);
return hasExportDefault(required) ? required.default : required;
};
diff --git a/packages/cli/src/utils/prepareEntryFile.ts b/packages/cli/src/utils/prepareEntryFile.ts
index dad50df5..8a924829 100644
--- a/packages/cli/src/utils/prepareEntryFile.ts
+++ b/packages/cli/src/utils/prepareEntryFile.ts
@@ -95,7 +95,7 @@ export const prepareEntryFile = async (app: App) => {
app.writeTemp(fileName, content);
} else {
fileName = `${file}.js`;
- app.writeTemp(`${file}.d.ts`, `const type: Record;\n\nexport default type;`);
+ app.writeTemp(`${file}.d.ts`, 'const type: Record;\n\nexport default type;');
}
app.writeTemp(fileName, content);
});
@@ -136,6 +136,7 @@ export const generateContent = (
};
export const prettyCode = (code: string) =>
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
recast.prettyPrint(recast.parse(code.replace(/\\/g, '/'), { parser: require('recast/parsers/typescript') }), {
tabWidth: 2,
trailingComma: true,
diff --git a/packages/cli/src/utils/resolveAppPackages.ts b/packages/cli/src/utils/resolveAppPackages.ts
index e7a3a410..bc0ab99f 100644
--- a/packages/cli/src/utils/resolveAppPackages.ts
+++ b/packages/cli/src/utils/resolveAppPackages.ts
@@ -127,6 +127,7 @@ const typeAssertion = function ({
if (isFile(defaultFile)) {
const defaultCode = fs.readFileSync(defaultFile, { encoding: 'utf-8', flag: 'r' });
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
const ast = recast.parse(defaultCode, { parser: require('recast/parsers/typescript') });
if (
isDatasource(
@@ -518,6 +519,7 @@ const setPackages = (packages: ModuleMainFilePath, app: App, packagePath: string
.replace('\n', '');
const indexCode = fs.readFileSync(indexPath, { encoding: 'utf-8', flag: 'r' });
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
const ast: Ast = recast.parse(indexCode, { parser: require('recast/parsers/typescript') });
const result = typeAssertion({ ast, indexPath, componentFileAffix, datasoucreSuperClass });
diff --git a/packages/core/src/Node.ts b/packages/core/src/Node.ts
index 9483b96c..b0aa65eb 100644
--- a/packages/core/src/Node.ts
+++ b/packages/core/src/Node.ts
@@ -148,7 +148,7 @@ class Node extends EventEmitter {
}
private listenLifeSafe() {
- this.once('created', async (instance: any) => {
+ this.once('created', (instance: any) => {
this.once('destroy', () => {
this.instance = null;
if (typeof this.data.destroy === 'function') {
@@ -165,24 +165,27 @@ class Node extends EventEmitter {
}
}
- await this.runHookCode('created');
+ this.runHookCode('created');
});
- this.once('mounted', async (instance: any) => {
- if (instance) {
- this.registerMethod(instance);
- if (instance.config) {
- this.setData(instance.config);
+ this.once('mounted', (instance: any) => {
+ const handler = async () => {
+ if (instance) {
+ this.registerMethod(instance);
+ if (instance.config) {
+ this.setData(instance.config);
+ }
}
- }
- for (let eventConfig = this.eventQueue.shift(); eventConfig; eventConfig = this.eventQueue.shift()) {
- if (typeof instance[eventConfig.method] === 'function') {
- await instance[eventConfig.method](eventConfig.fromCpt, ...eventConfig.args);
+ for (let eventConfig = this.eventQueue.shift(); eventConfig; eventConfig = this.eventQueue.shift()) {
+ if (typeof instance[eventConfig.method] === 'function') {
+ await instance[eventConfig.method](eventConfig.fromCpt, ...eventConfig.args);
+ }
}
- }
- await this.runHookCode('mounted');
+ this.runHookCode('mounted');
+ };
+ handler();
});
}
}
diff --git a/packages/data-source/src/DataSourceManager.ts b/packages/data-source/src/DataSourceManager.ts
index 939ebb2e..ddccec33 100644
--- a/packages/data-source/src/DataSourceManager.ts
+++ b/packages/data-source/src/DataSourceManager.ts
@@ -1,3 +1,4 @@
+/* eslint-disable @typescript-eslint/naming-convention */
/*
* Tencent is pleased to support the open source community by making TMagicEditor available.
*
diff --git a/packages/data-source/src/utils.ts b/packages/data-source/src/utils.ts
index 61f1c95e..3192a942 100644
--- a/packages/data-source/src/utils.ts
+++ b/packages/data-source/src/utils.ts
@@ -139,6 +139,7 @@ export const compliedDataSourceField = (value: any, data: DataSourceManagerData)
try {
return getValueByKeyPath(fields.join('.'), dsData);
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return value;
}
@@ -151,6 +152,7 @@ export const template = (value: string, data?: DataSourceManagerData) =>
value.replaceAll(dataSourceTemplateRegExp, (match, $1) => {
try {
return getValueByKeyPath($1, data);
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e: any) {
return match;
}
diff --git a/packages/dep/tests/utils.spec.ts b/packages/dep/tests/utils.spec.ts
index 6a00e9c0..fdbfa3f3 100644
--- a/packages/dep/tests/utils.spec.ts
+++ b/packages/dep/tests/utils.spec.ts
@@ -125,7 +125,7 @@ describe('utils', () => {
test('isUseDataSourceField', () => {
expect(utils.isUseDataSourceField([`${DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX}dsID`, 'field'], 'dsID')).toBeTruthy();
expect(utils.isUseDataSourceField([`${DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX}dsID`, 'field'], 'dsID1')).toBeFalsy();
- expect(utils.isUseDataSourceField([`abcdsID`, 'field'], 'dsID')).toBeFalsy();
+ expect(utils.isUseDataSourceField(['abcdsID', 'field'], 'dsID')).toBeFalsy();
expect(utils.isUseDataSourceField([123, 'field'], 123)).toBeFalsy();
});
diff --git a/packages/design/src/Popover.vue b/packages/design/src/Popover.vue
index 302ebfa0..40d2b3d2 100644
--- a/packages/design/src/Popover.vue
+++ b/packages/design/src/Popover.vue
@@ -27,9 +27,9 @@ import type { PopoverProps } from './types';
defineSlots<{
/** 触发 Popover 显示的 HTML 元素 */
- reference(props: {}): any;
+ reference(_props: {}): any;
/** Popover 内嵌 HTML 文本 */
- default(props: {}): any;
+ default(_props: {}): any;
}>();
defineOptions({
@@ -130,7 +130,7 @@ const mouseenterHandler = () => {
popoverVisible.value = true;
};
-let timer: NodeJS.Timeout | null = null;
+let timer: ReturnType | null = null;
const mouseleaveHandler = () => {
if (props.disabled) return;
diff --git a/packages/design/src/index.ts b/packages/design/src/index.ts
index 21da4b41..406f3815 100644
--- a/packages/design/src/index.ts
+++ b/packages/design/src/index.ts
@@ -9,7 +9,6 @@ import './theme/index.scss';
export * from './types';
export * from './config';
-/* eslint-disable @typescript-eslint/no-unused-vars */
export { default as TMagicAutocomplete } from './Autocomplete.vue';
export { default as TMagicBadge } from './Badge.vue';
export { default as TMagicButton } from './Button.vue';
diff --git a/packages/editor/src/Editor.vue b/packages/editor/src/Editor.vue
index 7edfc23b..f37b89bc 100644
--- a/packages/editor/src/Editor.vue
+++ b/packages/editor/src/Editor.vue
@@ -142,7 +142,7 @@ import codeBlockService from './services/codeBlock';
import componentListService from './services/componentList';
import dataSourceService from './services/dataSource';
import depService from './services/dep';
-import editorService, { type EditorService } from './services/editor';
+import editorService from './services/editor';
import eventsService from './services/events';
import historyService from './services/history';
import keybindingService from './services/keybinding';
@@ -153,25 +153,9 @@ import uiService from './services/ui';
import keybindingConfig from './utils/keybinding-config';
import { defaultEditorProps, EditorProps } from './editorProps';
import { initServiceEvents, initServiceState } from './initService';
-import type {
- EventBus,
- FrameworkSlots,
- PropsPanelSlots,
- Services,
- SidebarSlots,
- StageOptions,
- WorkspaceSlots,
-} from './type';
+import type { EditorSlots, EventBus, Services, StageOptions } from './type';
-defineSlots<
- FrameworkSlots &
- WorkspaceSlots &
- SidebarSlots &
- PropsPanelSlots & {
- workspace(props: { editorService: EditorService }): any;
- 'workspace-content'(props: { editorService: EditorService }): any;
- }
->();
+defineSlots();
defineOptions({
name: 'MEditor',
diff --git a/packages/editor/src/components/CodeBlockEditor.vue b/packages/editor/src/components/CodeBlockEditor.vue
index 4bcd534a..21541977 100644
--- a/packages/editor/src/components/CodeBlockEditor.vue
+++ b/packages/editor/src/components/CodeBlockEditor.vue
@@ -233,7 +233,7 @@ const changeHandler = (values: CodeBlockContent) => {
changedValue.value = values;
};
-const beforeClose = (done: (cancel?: boolean) => void) => {
+const beforeClose = (done: (_cancel?: boolean) => void) => {
if (!changedValue.value) {
done();
return;
diff --git a/packages/editor/src/components/FloatingBox.vue b/packages/editor/src/components/FloatingBox.vue
index d4b3a4bc..c55abbf0 100644
--- a/packages/editor/src/components/FloatingBox.vue
+++ b/packages/editor/src/components/FloatingBox.vue
@@ -39,7 +39,7 @@ const props = withDefaults(
defineProps<{
position?: Position;
title?: string;
- beforeClose?: (done: (cancel?: boolean) => void) => void;
+ beforeClose?: (_done: (_cancel?: boolean) => void) => void;
}>(),
{
title: '',
diff --git a/packages/editor/src/components/ScrollBar.vue b/packages/editor/src/components/ScrollBar.vue
index 772fcc00..18399d62 100644
--- a/packages/editor/src/components/ScrollBar.vue
+++ b/packages/editor/src/components/ScrollBar.vue
@@ -93,7 +93,9 @@ const scrollBy = (delta: number) => {
position: absolute;
background-color: transparent;
opacity: 0.3;
- transition: background-color 0.2s linear, opacity 0.2s linear;
+ transition:
+ background-color 0.2s linear,
+ opacity 0.2s linear;
.m-editor-scroll-bar-thumb {
background-color: #aaa;
@@ -108,7 +110,9 @@ const scrollBy = (delta: number) => {
.m-editor-scroll-bar-thumb {
height: 6px;
- transition: background-color 0.2s linear, height 0.2s ease-in-out;
+ transition:
+ background-color 0.2s linear,
+ height 0.2s ease-in-out;
bottom: 2px;
}
}
@@ -120,7 +124,9 @@ const scrollBy = (delta: number) => {
.m-editor-scroll-bar-thumb {
width: 6px;
- transition: background-color 0.2s linear, width 0.2s ease-in-out;
+ transition:
+ background-color 0.2s linear,
+ width 0.2s ease-in-out;
right: 2px;
}
}
diff --git a/packages/editor/src/components/SearchInput.vue b/packages/editor/src/components/SearchInput.vue
index cfe0d28e..abc7935e 100644
--- a/packages/editor/src/components/SearchInput.vue
+++ b/packages/editor/src/components/SearchInput.vue
@@ -27,7 +27,7 @@ const emit = defineEmits(['search']);
const filterText = ref('');
-let timer: NodeJS.Timeout | null = null;
+let timer: ReturnType | null = null;
const filterTextChangeHandler = () => {
timer && clearTimeout(timer);
timer = setTimeout(() => {
diff --git a/packages/editor/src/components/Tree.vue b/packages/editor/src/components/Tree.vue
index 9e0759e2..6e543d33 100644
--- a/packages/editor/src/components/Tree.vue
+++ b/packages/editor/src/components/Tree.vue
@@ -38,9 +38,9 @@ import type { LayerNodeStatus, TreeNodeData } from '@editor/type';
import TreeNode from './TreeNode.vue';
defineSlots<{
- 'tree-node-content'(props: { data: TreeNodeData }): any;
- 'tree-node-label'(props: { data: TreeNodeData }): any;
- 'tree-node-tool'(props: { data: TreeNodeData }): any;
+ 'tree-node-content'(_props: { data: TreeNodeData }): any;
+ 'tree-node-label'(_props: { data: TreeNodeData }): any;
+ 'tree-node-tool'(_props: { data: TreeNodeData }): any;
}>();
defineOptions({
diff --git a/packages/editor/src/components/TreeNode.vue b/packages/editor/src/components/TreeNode.vue
index 5626d770..958e7364 100644
--- a/packages/editor/src/components/TreeNode.vue
+++ b/packages/editor/src/components/TreeNode.vue
@@ -72,9 +72,9 @@ import type { LayerNodeStatus, TreeNodeData } from '@editor/type';
import { updateStatus } from '@editor/utils/tree';
defineSlots<{
- 'tree-node-label'(props: { data: TreeNodeData }): any;
- 'tree-node-tool'(props: { data: TreeNodeData }): any;
- 'tree-node-content'(props: { data: TreeNodeData }): any;
+ 'tree-node-label'(_props: { data: TreeNodeData }): any;
+ 'tree-node-tool'(_props: { data: TreeNodeData }): any;
+ 'tree-node-content'(_props: { data: TreeNodeData }): any;
}>();
defineOptions({
diff --git a/packages/editor/src/fields/DataSourceInput.vue b/packages/editor/src/fields/DataSourceInput.vue
index 49592024..e27b2faa 100644
--- a/packages/editor/src/fields/DataSourceInput.vue
+++ b/packages/editor/src/fields/DataSourceInput.vue
@@ -179,7 +179,11 @@ const curCharIsDot = (dotIndex: number) => dotIndex > -1 && dotIndex === getSele
* @param leftCurlyBracketIndex 左大括号字符索引
* @param cb 建议的方法
*/
-const dsQuerySearch = (queryString: string, leftCurlyBracketIndex: number, cb: (data: { value: string }[]) => void) => {
+const dsQuerySearch = (
+ queryString: string,
+ leftCurlyBracketIndex: number,
+ cb: (_data: { value: string }[]) => void,
+) => {
let result: DataSourceSchema[] = [];
if (curCharIsLeftCurlyBracket(leftCurlyBracketIndex)) {
@@ -211,7 +215,7 @@ const fieldQuerySearch = (
queryString: string,
leftAngleIndex: number,
dotIndex: number,
- cb: (data: { value: string }[]) => void,
+ cb: (_data: { value: string }[]) => void,
) => {
let result: DataSchema[] = [];
@@ -272,7 +276,7 @@ const fieldQuerySearch = (
* @param queryString 当前输入框内的字符串
* @param cb 建议回调
*/
-const querySearch = (queryString: string, cb: (data: { value: string }[]) => void) => {
+const querySearch = (queryString: string, cb: (_data: { value: string }[]) => void) => {
inputText = queryString;
const selectionStart = getSelectionStart();
diff --git a/packages/editor/src/fields/DataSourceMethods.vue b/packages/editor/src/fields/DataSourceMethods.vue
index d192dd37..2680a65d 100644
--- a/packages/editor/src/fields/DataSourceMethods.vue
+++ b/packages/editor/src/fields/DataSourceMethods.vue
@@ -80,7 +80,7 @@ const methodColumns: ColumnConfig[] = [
{
text: '编辑',
handler: (method: CodeBlockContent, index: number) => {
- let codeContent = method.content || `({ params, dataSource, app }) => {\n // place your code here\n}`;
+ let codeContent = method.content || '({ params, dataSource, app }) => {\n // place your code here\n}';
if (typeof codeContent !== 'string') {
codeContent = codeContent.toString();
@@ -114,7 +114,7 @@ const methodColumns: ColumnConfig[] = [
const createCodeHandler = () => {
codeConfig.value = {
name: '',
- content: `({ params, dataSource, app, flowState }) => {\n // place your code here\n}`,
+ content: '({ params, dataSource, app, flowState }) => {\n // place your code here\n}',
params: [],
};
@@ -130,7 +130,7 @@ const submitCodeHandler = (value: CodeBlockContent, data: ContainerChangeEventDa
// 在保存的时候转换代码内容
const parseDSL = getEditorConfig('parseDSL');
if (typeof value.content === 'string') {
- value.content = parseDSL<(...args: any[]) => any>(value.content);
+ value.content = parseDSL<(..._args: any[]) => any>(value.content);
}
}
if (editIndex > -1) {
diff --git a/packages/editor/src/fields/UISelect.vue b/packages/editor/src/fields/UISelect.vue
index 6cd79554..35275f67 100644
--- a/packages/editor/src/fields/UISelect.vue
+++ b/packages/editor/src/fields/UISelect.vue
@@ -70,7 +70,7 @@ const uiSelectMode = ref(false);
const cancelHandler = () => {
uiService.set('uiSelectMode', false);
uiSelectMode.value = false;
- globalThis.document.removeEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler as EventListener);
+ globalThis.document.removeEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler as any);
};
const clickHandler = ({ detail }: Event & { detail: HTMLElement | MNode }) => {
@@ -97,7 +97,7 @@ const toName = computed(() => {
const startSelect = () => {
uiService.set('uiSelectMode', true);
uiSelectMode.value = true;
- globalThis.document.addEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler as EventListener);
+ globalThis.document.addEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler as any);
};
const deleteHandler = () => {
diff --git a/packages/editor/src/hooks/use-code-block-edit.ts b/packages/editor/src/hooks/use-code-block-edit.ts
index d644a25b..9a6df770 100644
--- a/packages/editor/src/hooks/use-code-block-edit.ts
+++ b/packages/editor/src/hooks/use-code-block-edit.ts
@@ -16,7 +16,7 @@ export const useCodeBlockEdit = (codeBlockService: Services['codeBlockService'])
const createCodeBlock = async () => {
codeConfig.value = {
name: '',
- content: `({app, params, flowState}) => {\n // place your code here\n}`,
+ content: '({app, params, flowState}) => {\n // place your code here\n}',
params: [],
};
diff --git a/packages/editor/src/index.ts b/packages/editor/src/index.ts
index a6d0cbfc..55f24ee2 100644
--- a/packages/editor/src/index.ts
+++ b/packages/editor/src/index.ts
@@ -122,7 +122,6 @@ export default {
app.use(formPlugin, opt || {});
app.use(tablePlugin);
- // eslint-disable-next-line no-param-reassign
app.config.globalProperties.$TMAGIC_EDITOR = option;
setEditorConfig(option);
diff --git a/packages/editor/src/initService.ts b/packages/editor/src/initService.ts
index 2751c90c..b2ef21a3 100644
--- a/packages/editor/src/initService.ts
+++ b/packages/editor/src/initService.ts
@@ -269,13 +269,13 @@ export const initServiceEvents = (
}
};
- const dsDepCollectedHandler = async () => {
+ const dsDepCollectedHandler = () => {
const root = editorService.get('root');
- const app = await getTMagicApp();
-
- if (root && app?.dsl) {
- app.dsl.dataSourceDeps = root.dataSourceDeps;
- }
+ getTMagicApp()?.then((app?: TMagicCore) => {
+ if (root && app?.dsl) {
+ app.dsl.dataSourceDeps = root.dataSourceDeps;
+ }
+ });
};
const collectIdle = (nodes: MComponent[], deep: boolean, type?: DepTargetType) =>
@@ -317,7 +317,7 @@ export const initServiceEvents = (
depService.addTarget(createDataSourceCondTarget(ds, reactive({})));
};
- const rootChangeHandler = async (value: MApp | null, preValue?: MApp | null) => {
+ const rootChangeHandler = (value: MApp | null, preValue?: MApp | null) => {
if (!value) return;
value.codeBlocks = value.codeBlocks || {};
@@ -347,39 +347,40 @@ export const initServiceEvents = (
delete value.dataSourceCondDeps;
}
- const nodeId = editorService.get('node')?.id || props.defaultSelected;
- let node;
- if (nodeId) {
- node = editorService.getNodeById(nodeId);
- }
+ const handler = async () => {
+ const nodeId = editorService.get('node')?.id || props.defaultSelected;
+ let node;
+ if (nodeId) {
+ node = editorService.getNodeById(nodeId);
+ }
+ if (node && node !== value) {
+ await editorService.select(node.id);
+ } else if (value.items?.length) {
+ await editorService.select(value.items[0]);
+ } else if (value.id) {
+ editorService.set('nodes', [value]);
+ editorService.set('parent', null);
+ editorService.set('page', null);
+ }
- if (node && node !== value) {
- await editorService.select(node.id);
- } else if (value.items?.length) {
- await editorService.select(value.items[0]);
- } else if (value.id) {
- editorService.set('nodes', [value]);
- editorService.set('parent', null);
- editorService.set('page', null);
- }
+ if (toRaw(value) !== toRaw(preValue)) {
+ emit('update:modelValue', value);
+ }
+ };
- if (toRaw(value) !== toRaw(preValue)) {
- emit('update:modelValue', value);
- }
+ handler();
};
// 新增节点,收集依赖
- const nodeAddHandler = async (nodes: MComponent[]) => {
- await collectIdle(nodes, true);
-
- updateStageNodes(nodes);
+ const nodeAddHandler = (nodes: MComponent[]) => {
+ collectIdle(nodes, true).then(() => {
+ updateStageNodes(nodes);
+ });
};
// 节点更新,收集依赖
// 仅当修改到数据源相关的才收集
- const nodeUpdateHandler = async (
- data: { newNode: MComponent; oldNode: MComponent; changeRecords?: ChangeRecord[] }[],
- ) => {
+ const nodeUpdateHandler = (data: { newNode: MComponent; oldNode: MComponent; changeRecords?: ChangeRecord[] }[]) => {
const needRecollectNodes: MComponent[] = [];
const normalNodes: MComponent[] = [];
for (const { newNode, oldNode, changeRecords } of data) {
@@ -424,9 +425,12 @@ export const initServiceEvents = (
if (needRecollectNodes.length) {
// 有数据源依赖,需要等依赖重新收集完才更新stage
- await collectIdle(needRecollectNodes, true, DepTargetType.DATA_SOURCE);
- await collectIdle(needRecollectNodes, true, DepTargetType.DATA_SOURCE_COND);
- updateStageNodes(needRecollectNodes);
+ const handler = async () => {
+ await collectIdle(needRecollectNodes, true, DepTargetType.DATA_SOURCE);
+ await collectIdle(needRecollectNodes, true, DepTargetType.DATA_SOURCE_COND);
+ updateStageNodes(needRecollectNodes);
+ };
+ handler();
} else {
updateStageNodes(normalNodes);
// 在上面判断是否需要收集数据源依赖中已经更新stage
@@ -443,9 +447,10 @@ export const initServiceEvents = (
};
// 由于历史记录变化是更新整个page,所以历史记录变化时,需要重新收集依赖
- const historyChangeHandler = async (page: MPage | MPageFragment) => {
- await collectIdle([page], true);
- updateStageNode(page);
+ const historyChangeHandler = (page: MPage | MPageFragment) => {
+ collectIdle([page], true).then(() => {
+ updateStageNode(page);
+ });
};
editorService.on('history-change', historyChangeHandler);
@@ -454,27 +459,28 @@ export const initServiceEvents = (
editorService.on('remove', nodeRemoveHandler);
editorService.on('update', nodeUpdateHandler);
- const dataSourceAddHandler = async (config: DataSourceSchema) => {
- initDataSourceDepTarget(config);
- const app = await getTMagicApp();
+ const dataSourceAddHandler = (config: DataSourceSchema) => {
+ const handler = async () => {
+ initDataSourceDepTarget(config);
+ const app = await getTMagicApp();
- if (!app?.dataSourceManager) {
- return;
- }
+ if (!app?.dataSourceManager) {
+ return;
+ }
- app.dataSourceManager.addDataSource(config);
+ app.dataSourceManager.addDataSource(config);
- const newDs = app.dataSourceManager.get(config.id);
+ const newDs = app.dataSourceManager.get(config.id);
- if (newDs) {
- app.dataSourceManager.init(newDs);
- }
+ if (newDs) {
+ app.dataSourceManager.init(newDs);
+ }
+ };
+
+ handler();
};
- const dataSourceUpdateHandler = async (
- config: DataSourceSchema,
- { changeRecords }: { changeRecords: ChangeRecord[] },
- ) => {
+ const dataSourceUpdateHandler = (config: DataSourceSchema, { changeRecords }: { changeRecords: ChangeRecord[] }) => {
const updateDsData = async () => {
const app = await getTMagicApp();
@@ -565,29 +571,33 @@ export const initServiceEvents = (
depService.removeTarget(id, DepTargetType.DATA_SOURCE_METHOD);
};
- const dataSourceRemoveHandler = async (id: string) => {
+ const dataSourceRemoveHandler = (id: string) => {
const root = editorService.get('root');
if (!root) {
return;
}
- const nodeIds = Object.keys(root.dataSourceDeps?.[id] || {});
- const nodes = getNodes(nodeIds, root.items);
+ const handler = async () => {
+ const nodeIds = Object.keys(root.dataSourceDeps?.[id] || {});
+ const nodes = getNodes(nodeIds, root.items);
- await Promise.all([
- collectIdle(nodes, false, DepTargetType.DATA_SOURCE),
- collectIdle(nodes, false, DepTargetType.DATA_SOURCE_COND),
- collectIdle(nodes, false, DepTargetType.DATA_SOURCE_METHOD),
- ]);
+ await Promise.all([
+ collectIdle(nodes, false, DepTargetType.DATA_SOURCE),
+ collectIdle(nodes, false, DepTargetType.DATA_SOURCE_COND),
+ collectIdle(nodes, false, DepTargetType.DATA_SOURCE_METHOD),
+ ]);
- updateDataSourceSchema();
+ updateDataSourceSchema();
- const app = await getTMagicApp();
- app?.dataSourceManager?.removeDataSource(id);
+ const app = await getTMagicApp();
+ app?.dataSourceManager?.removeDataSource(id);
- updateStageNodes(nodes);
- removeDataSourceTarget(id);
+ updateStageNodes(nodes);
+ removeDataSourceTarget(id);
+ };
+
+ handler();
};
dataSourceService.on('add', dataSourceAddHandler);
diff --git a/packages/editor/src/layouts/Framework.vue b/packages/editor/src/layouts/Framework.vue
index 49ee2a92..123fc189 100644
--- a/packages/editor/src/layouts/Framework.vue
+++ b/packages/editor/src/layouts/Framework.vue
@@ -91,7 +91,7 @@ defineOptions({
defineProps<{
disabledPageFragment: boolean;
pageBarSortOptions?: PageBarSortOptions;
- pageFilterFunction?: (page: MPage | MPageFragment, keyword: string) => boolean;
+ pageFilterFunction?: (_page: MPage | MPageFragment, _keyword: string) => boolean;
}>();
const codeOptions = inject('codeOptions', {});
diff --git a/packages/editor/src/layouts/NavMenu.vue b/packages/editor/src/layouts/NavMenu.vue
index 5588480b..6fa5da3a 100644
--- a/packages/editor/src/layouts/NavMenu.vue
+++ b/packages/editor/src/layouts/NavMenu.vue
@@ -69,7 +69,7 @@ const getConfig = (item: MenuItem): (MenuButton | MenuComponent)[] => {
type: 'button',
className: 'delete',
icon: markRaw(Delete),
- tooltip: `刪除(Delete)`,
+ tooltip: '刪除(Delete)',
disabled: () => editorService.get('node')?.type === NodeType.PAGE,
handler: () => {
const node = editorService.get('node');
diff --git a/packages/editor/src/layouts/page-bar/PageBar.vue b/packages/editor/src/layouts/page-bar/PageBar.vue
index dcd2e482..e6b83b61 100644
--- a/packages/editor/src/layouts/page-bar/PageBar.vue
+++ b/packages/editor/src/layouts/page-bar/PageBar.vue
@@ -91,7 +91,7 @@ const props = withDefaults(
defineProps<{
disabledPageFragment: boolean;
pageBarSortOptions?: PageBarSortOptions;
- filterFunction?: (page: MPage | MPageFragment, keyword: string) => boolean;
+ filterFunction?: (_page: MPage | MPageFragment, _keyword: string) => boolean;
}>(),
{
filterFunction: (page, keyword) => page.name?.includes(keyword) || `${page.id}`.includes(keyword),
diff --git a/packages/editor/src/layouts/props-panel/FormPanel.vue b/packages/editor/src/layouts/props-panel/FormPanel.vue
index 65c03a6f..92d23e4e 100644
--- a/packages/editor/src/layouts/props-panel/FormPanel.vue
+++ b/packages/editor/src/layouts/props-panel/FormPanel.vue
@@ -56,7 +56,7 @@ import { useServices } from '@editor/hooks/use-services';
import CodeEditor from '../CodeEditor.vue';
defineSlots<{
- 'props-form-panel-header'(props: {}): any;
+ 'props-form-panel-header'(_props: {}): any;
}>();
defineOptions({
@@ -70,7 +70,7 @@ const props = defineProps<{
labelWidth?: string;
codeValueKey?: string;
labelPosition?: string;
- extendState?: (state: FormState) => Record | Promise>;
+ extendState?: (_state: FormState) => Record | Promise>;
}>();
const emit = defineEmits<{
diff --git a/packages/editor/src/layouts/props-panel/PropsPanel.vue b/packages/editor/src/layouts/props-panel/PropsPanel.vue
index ba9c2c4b..4a9b56d0 100644
--- a/packages/editor/src/layouts/props-panel/PropsPanel.vue
+++ b/packages/editor/src/layouts/props-panel/PropsPanel.vue
@@ -82,7 +82,7 @@ defineOptions({
defineProps<{
disabledShowSrc?: boolean;
- extendState?: (state: FormState) => Record | Promise>;
+ extendState?: (_state: FormState) => Record | Promise>;
}>();
const emit = defineEmits<{
diff --git a/packages/editor/src/layouts/sidebar/ComponentListPanel.vue b/packages/editor/src/layouts/sidebar/ComponentListPanel.vue
index 28aca978..abe1fe3c 100644
--- a/packages/editor/src/layouts/sidebar/ComponentListPanel.vue
+++ b/packages/editor/src/layouts/sidebar/ComponentListPanel.vue
@@ -80,7 +80,7 @@ const collapseValue = computed(() =>
.map((x, i) => `${i}`),
);
-let timeout: NodeJS.Timeout | undefined;
+let timeout: ReturnType | undefined;
let clientX: number;
let clientY: number;
diff --git a/packages/editor/src/layouts/sidebar/code-block/CodeBlockList.vue b/packages/editor/src/layouts/sidebar/code-block/CodeBlockList.vue
index c0ab5367..8f9376eb 100644
--- a/packages/editor/src/layouts/sidebar/code-block/CodeBlockList.vue
+++ b/packages/editor/src/layouts/sidebar/code-block/CodeBlockList.vue
@@ -55,7 +55,7 @@ defineOptions({
const props = defineProps<{
indent?: number;
nextLevelIndentIncrement?: number;
- customError?: (id: Id, errorType: CodeDeleteErrorType) => any;
+ customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
}>();
const emit = defineEmits<{
diff --git a/packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue b/packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue
index bd8ee66d..945c8274 100644
--- a/packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue
+++ b/packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue
@@ -79,7 +79,7 @@ defineOptions({
const props = defineProps<{
indent?: number;
nextLevelIndentIncrement?: number;
- customError?: (id: Id, errorType: CodeDeleteErrorType) => any;
+ customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
customContentMenu: CustomContentMenuFunction;
}>();
diff --git a/packages/editor/src/layouts/workspace/viewer/Stage.vue b/packages/editor/src/layouts/workspace/viewer/Stage.vue
index d98d5ea3..9b2ae33b 100644
--- a/packages/editor/src/layouts/workspace/viewer/Stage.vue
+++ b/packages/editor/src/layouts/workspace/viewer/Stage.vue
@@ -149,7 +149,7 @@ watch(zoom, (zoom) => {
stage.setZoom(zoom);
});
-let timeoutId: NodeJS.Timeout | null = null;
+let timeoutId: ReturnType | null = null;
watch(page, (page) => {
if (runtime && page) {
editorService.set('stageLoading', true);
diff --git a/packages/editor/src/services/BaseService.ts b/packages/editor/src/services/BaseService.ts
index 9cd18ca7..20bd6805 100644
--- a/packages/editor/src/services/BaseService.ts
+++ b/packages/editor/src/services/BaseService.ts
@@ -1,3 +1,4 @@
+/* eslint-disable @typescript-eslint/no-misused-promises */
/*
* Tencent is pleased to support the open source community by making TMagicEditor available.
*
diff --git a/packages/editor/src/services/editor.ts b/packages/editor/src/services/editor.ts
index 260be3a8..8cfd36e4 100644
--- a/packages/editor/src/services/editor.ts
+++ b/packages/editor/src/services/editor.ts
@@ -1088,10 +1088,11 @@ class Editor extends BaseService {
this.isHistoryStateChange = true;
await this.update(value.data);
this.set('modifiedNodeIds', value.modifiedNodeIds);
- setTimeout(async () => {
+ setTimeout(() => {
if (!value.nodeId) return;
- await this.select(value.nodeId);
- this.get('stage')?.select(value.nodeId);
+ this.select(value.nodeId).then(() => {
+ this.get('stage')?.select(value.nodeId);
+ });
}, 0);
this.emit('history-change', value.data);
}
diff --git a/packages/editor/src/type.ts b/packages/editor/src/type.ts
index 339ae008..096c724d 100644
--- a/packages/editor/src/type.ts
+++ b/packages/editor/src/type.ts
@@ -65,6 +65,15 @@ import type { StageOverlayService } from './services/stageOverlay';
import type { StorageService } from './services/storage';
import type { UiService } from './services/ui';
import type { UndoRedo } from './utils/undo-redo';
+
+export type EditorSlots = FrameworkSlots &
+ WorkspaceSlots &
+ SidebarSlots &
+ PropsPanelSlots & {
+ workspace(props: { editorService: EditorService }): any;
+ 'workspace-content'(props: { editorService: EditorService }): any;
+ };
+
export interface FrameworkSlots {
header(props: {}): any;
nav(props: {}): any;
diff --git a/packages/editor/src/utils/props.ts b/packages/editor/src/utils/props.ts
index 0f1d954b..b27c7784 100644
--- a/packages/editor/src/utils/props.ts
+++ b/packages/editor/src/utils/props.ts
@@ -179,13 +179,15 @@ export const fillConfig = (config: FormConfig = [], labelWidth = '80px'): FormCo
append: {
type: 'button',
text: '复制',
- handler: async (vm, { model }) => {
- try {
- await navigator.clipboard.writeText(`${model.id}`);
- tMagicMessage.success('已复制');
- } catch (err) {
- tMagicMessage.error('复制失败');
- }
+ handler: (vm, { model }) => {
+ navigator.clipboard
+ .writeText(`${model.id}`)
+ .then(() => {
+ tMagicMessage.success('已复制');
+ })
+ .catch(() => {
+ tMagicMessage.error('复制失败');
+ });
},
},
},
diff --git a/packages/form/src/Form.vue b/packages/form/src/Form.vue
index aae3f495..3824d78a 100644
--- a/packages/form/src/Form.vue
+++ b/packages/form/src/Form.vue
@@ -63,7 +63,7 @@ const props = withDefaults(
keyProp?: string;
popperClass?: string;
preventSubmitDefault?: boolean;
- extendState?: (state: FormState) => Record | Promise>;
+ extendState?: (_state: FormState) => Record | Promise>;
}>(),
{
config: () => [],
@@ -101,7 +101,7 @@ const formState: FormState = reactive({
parentValues: props.parentValues,
values,
lastValuesProcessed,
- $emit: emit as (event: string, ...args: any[]) => void,
+ $emit: emit as (_event: string, ..._args: any[]) => void,
fields,
setField: (prop: string, field: any) => fields.set(prop, field),
getField: (prop: string) => fields.get(prop),
diff --git a/packages/form/src/FormDrawer.vue b/packages/form/src/FormDrawer.vue
index 649473de..c7ad3a00 100644
--- a/packages/form/src/FormDrawer.vue
+++ b/packages/form/src/FormDrawer.vue
@@ -82,7 +82,7 @@ withDefaults(
labelPosition?: string;
preventSubmitDefault?: boolean;
/** 关闭前的回调,会暂停 Drawer 的关闭; done 是个 function type 接受一个 boolean 参数, 执行 done 使用 true 参数或不提供参数将会终止关闭 */
- beforeClose?: (done: (cancel?: boolean) => void) => void;
+ beforeClose?: (_done: (_cancel?: boolean) => void) => void;
}>(),
{
closeOnPressEscape: true,
diff --git a/packages/form/src/containers/Container.vue b/packages/form/src/containers/Container.vue
index e3d334db..55a1e21c 100644
--- a/packages/form/src/containers/Container.vue
+++ b/packages/form/src/containers/Container.vue
@@ -449,7 +449,6 @@ const onChangeHandler = async function (v: any, eventData: ContainerChangeEventD
valueProp = valueProp ? `${valueProp}.${eventData.modifyKey}` : eventData.modifyKey!;
// 需要清除掉modifyKey,不然往上层抛出后还会被认为需要修改
- // eslint-disable-next-line no-param-reassign
delete eventData.modifyKey;
} else if (isValidName() && props.model !== value && (v !== value || props.model[name.value] !== value)) {
// field内容下包含field-link时,model===value, 这里避免循环引用
diff --git a/packages/form/src/containers/Table.vue b/packages/form/src/containers/Table.vue
index 27e4c19c..c047b844 100644
--- a/packages/form/src/containers/Table.vue
+++ b/packages/form/src/containers/Table.vue
@@ -273,22 +273,18 @@ const isFullscreen = ref(false);
const modelName = computed(() => props.name || props.config.name || '');
-const data = computed(() =>
- props.config.pagination
- ? (props.model[modelName.value] || []).filter(
- (item: any, index: number) =>
- index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value,
- )
- : props.model[modelName.value],
-);
+const getDataByPage = (data: any[] = []) =>
+ data.filter(
+ (item: any, index: number) =>
+ index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value,
+ );
+
+const pageinationData = computed(() => getDataByPage(props.model[modelName.value]));
+
+const data = computed(() => (props.config.pagination ? pageinationData.value : props.model[modelName.value]));
const lastData = computed(() =>
- props.config.pagination
- ? (props.lastValues[modelName.value] || []).filter(
- (item: any, index: number) =>
- index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value,
- )
- : props.lastValues[modelName.value] || [],
+ props.config.pagination ? getDataByPage(props.lastValues[modelName.value]) : props.lastValues[modelName.value] || [],
);
const sortChange = ({ prop, order }: SortProp) => {
diff --git a/packages/form/src/containers/Tabs.vue b/packages/form/src/containers/Tabs.vue
index a5632c3d..f5d77f87 100644
--- a/packages/form/src/containers/Tabs.vue
+++ b/packages/form/src/containers/Tabs.vue
@@ -41,21 +41,21 @@
config.dynamic
? (name ? model[name] : model)[tabIndex]
: tab.name
- ? (name ? model[name] : model)[tab.name]
- : name
- ? model[name]
- : model
+ ? (name ? model[name] : model)[tab.name]
+ : name
+ ? model[name]
+ : model
"
:last-values="
isEmpty(lastValues)
? {}
: config.dynamic
- ? (name ? lastValues[name] : lastValues)[tabIndex]
- : tab.name
- ? (name ? lastValues[name] : lastValues)[tab.name]
- : name
- ? lastValues[name]
- : lastValues
+ ? (name ? lastValues[name] : lastValues)[tabIndex]
+ : tab.name
+ ? (name ? lastValues[name] : lastValues)[tab.name]
+ : name
+ ? lastValues[name]
+ : lastValues
"
:is-compare="isCompare"
:prop="config.dynamic ? `${prop}${prop ? '.' : ''}${String(tabIndex)}` : prop"
diff --git a/packages/form/src/fields/Display.vue b/packages/form/src/fields/Display.vue
index d3073d2c..c9bb96ae 100644
--- a/packages/form/src/fields/Display.vue
+++ b/packages/form/src/fields/Display.vue
@@ -13,7 +13,6 @@ defineOptions({
const props = defineProps>();
if (props.config.initValue && props.model) {
- // eslint-disable-next-line vue/no-setup-props-destructure
props.model[props.name] = props.config.initValue;
}
diff --git a/packages/form/src/fields/Select.vue b/packages/form/src/fields/Select.vue
index bdb110dc..ecd64a63 100644
--- a/packages/form/src/fields/Select.vue
+++ b/packages/form/src/fields/Select.vue
@@ -21,7 +21,7 @@
>
([]);
diff --git a/packages/form/src/index.ts b/packages/form/src/index.ts
index 7e395be2..77cf0cff 100644
--- a/packages/form/src/index.ts
+++ b/packages/form/src/index.ts
@@ -101,7 +101,6 @@ export default {
install(app: App, opt: FormInstallOptions = {}) {
const option = Object.assign(defaultInstallOpt, opt);
- // eslint-disable-next-line no-param-reassign
app.config.globalProperties.$MAGIC_FORM = option;
setConfig(option);
diff --git a/packages/form/src/schema.ts b/packages/form/src/schema.ts
index 6e2092e3..f1b74ee5 100644
--- a/packages/form/src/schema.ts
+++ b/packages/form/src/schema.ts
@@ -196,6 +196,7 @@ export interface OnChangeHandlerData {
config: any;
prop: string;
changeRecords: ChangeRecord[];
+ setModel: (prop: string, value: any) => void;
}
export type OnChangeHandler = (mForm: FormState | undefined, value: any, data: OnChangeHandlerData) => any;
diff --git a/packages/form/src/utils/form.ts b/packages/form/src/utils/form.ts
index 0a6e1998..a3d51cde 100644
--- a/packages/form/src/utils/form.ts
+++ b/packages/form/src/utils/form.ts
@@ -16,7 +16,6 @@
* limitations under the License.
*/
-/* eslint-disable no-param-reassign */
import { toRaw } from 'vue';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
diff --git a/packages/stage/src/ActionManager.ts b/packages/stage/src/ActionManager.ts
index 67f6bfbf..7bea0d2c 100644
--- a/packages/stage/src/ActionManager.ts
+++ b/packages/stage/src/ActionManager.ts
@@ -92,20 +92,24 @@ export default class ActionManager extends EventEmitter {
private disabledMultiSelect = false;
private config: ActionManagerConfig;
- private mouseMoveHandler = throttle(async (event: MouseEvent): Promise => {
- if ((event.target as HTMLDivElement)?.classList?.contains('moveable-direction')) {
- return;
- }
+ private mouseMoveHandler = throttle((event: MouseEvent): void => {
+ const handler = async () => {
+ if ((event.target as HTMLDivElement)?.classList?.contains('moveable-direction')) {
+ return;
+ }
- const el = await this.getElementFromPoint(event);
- const id = getIdFromEl()(el);
- if (!id) {
- this.clearHighlight();
- return;
- }
+ const el = await this.getElementFromPoint(event);
+ const id = getIdFromEl()(el);
+ if (!id) {
+ this.clearHighlight();
+ return;
+ }
- this.emit('mousemove', event);
- this.highlight(id);
+ this.emit('mousemove', event);
+ this.highlight(id);
+ };
+
+ handler();
}, throttleTime);
constructor(config: ActionManagerConfig) {
@@ -299,6 +303,7 @@ export default class ActionManager extends EventEmitter {
el = this.getTargetElement(id);
} catch (error) {
this.clearHighlight();
+ console.warn('getTargetElement error:', error);
return;
}
@@ -606,29 +611,33 @@ export default class ActionManager extends EventEmitter {
/**
* 在down事件中集中cpu处理画布中选中操作渲染,在up事件中再通知外面的编辑器更新
*/
- private mouseDownHandler = async (event: MouseEvent): Promise => {
- this.clearHighlight();
- event.stopImmediatePropagation();
- event.stopPropagation();
+ private mouseDownHandler = (event: MouseEvent): void => {
+ const handler = async () => {
+ this.clearHighlight();
+ event.stopImmediatePropagation();
+ event.stopPropagation();
- if (this.isStopTriggerSelect(event)) return;
+ if (this.isStopTriggerSelect(event)) return;
- // 点击状态下不触发高亮事件
- this.container.removeEventListener('mousemove', this.mouseMoveHandler);
+ // 点击状态下不触发高亮事件
+ this.container.removeEventListener('mousemove', this.mouseMoveHandler);
- // 判断触发多选还是单选
- if (this.isMultiSelectStatus) {
- await this.beforeMultiSelect(event);
- if (this.selectedElList.length > 0) {
- this.emit('before-multi-select', this.selectedElList);
+ // 判断触发多选还是单选
+ if (this.isMultiSelectStatus) {
+ await this.beforeMultiSelect(event);
+ if (this.selectedElList.length > 0) {
+ this.emit('before-multi-select', this.selectedElList);
+ }
+ } else {
+ const el = await this.getElementFromPoint(event);
+ if (!el) return;
+ this.emit('before-select', el, event);
}
- } else {
- const el = await this.getElementFromPoint(event);
- if (!el) return;
- this.emit('before-select', el, event);
- }
- getDocument().addEventListener('mouseup', this.mouseUpHandler);
+ getDocument().addEventListener('mouseup', this.mouseUpHandler);
+ };
+
+ handler();
};
private isStopTriggerSelect(event: MouseEvent): boolean {
diff --git a/packages/stage/src/DragResizeHelper.ts b/packages/stage/src/DragResizeHelper.ts
index a80a6584..372afbf3 100644
--- a/packages/stage/src/DragResizeHelper.ts
+++ b/packages/stage/src/DragResizeHelper.ts
@@ -285,13 +285,18 @@ export default class DragResizeHelper {
getIdFromEl()(ev.target)?.startsWith(DRAG_EL_ID_PREFIX) && getIdFromEl()(ev.target)?.endsWith(frameItem.id),
);
if (!frameSnapShot) return;
- const targeEl = this.targetList.find(
- (targetItem) =>
- getIdFromEl()(ev.target)?.startsWith(DRAG_EL_ID_PREFIX) &&
- getIdFromEl()(targetItem) &&
- getIdFromEl()(ev.target)?.endsWith(getIdFromEl()(targetItem)!),
- );
+
+ const findTargetElFuctin = (targetItem: HTMLElement) => {
+ const getId = getIdFromEl();
+ const targetId = getId(ev.target);
+ const targetItemId = getId(targetItem);
+ return targetId?.startsWith(DRAG_EL_ID_PREFIX) && targetItemId && targetId?.endsWith(targetItemId);
+ };
+
+ const targeEl = this.targetList.find(findTargetElFuctin);
+
if (!targeEl) return;
+
// 元素与其所属组同时加入多选列表时,只更新父元素
const isParentIncluded = this.targetList.find(
(targetItem) => getIdFromEl()(targetItem) === getIdFromEl()(targeEl.parentElement),
diff --git a/packages/stage/src/StageDragResize.ts b/packages/stage/src/StageDragResize.ts
index cf6c6793..0af01c13 100644
--- a/packages/stage/src/StageDragResize.ts
+++ b/packages/stage/src/StageDragResize.ts
@@ -16,7 +16,6 @@
* limitations under the License.
*/
-/* eslint-disable no-param-reassign */
import Moveable, { MoveableOptions } from 'moveable';
import { getIdFromEl } from '@tmagic/core';
diff --git a/packages/stage/src/StageRender.ts b/packages/stage/src/StageRender.ts
index bb96501b..7b92c17f 100644
--- a/packages/stage/src/StageRender.ts
+++ b/packages/stage/src/StageRender.ts
@@ -235,22 +235,26 @@ export default class StageRender extends EventEmitter {
}
}
- private iframeLoadHandler = async () => {
- if (!this.contentWindow?.magic) {
- this.postTmagicRuntimeReady();
- }
-
- if (!this.contentWindow) return;
-
- if (this.customizedRender) {
- const el = await this.customizedRender();
- if (el) {
- this.contentWindow.document?.body?.appendChild(el);
+ private iframeLoadHandler = () => {
+ const handler = async () => {
+ if (!this.contentWindow?.magic) {
+ this.postTmagicRuntimeReady();
}
- }
- this.emit('onload');
+ if (!this.contentWindow) return;
- injectStyle(this.contentWindow.document, style);
+ if (this.customizedRender) {
+ const el = await this.customizedRender();
+ if (el) {
+ this.contentWindow.document?.body?.appendChild(el);
+ }
+ }
+
+ this.emit('onload');
+
+ injectStyle(this.contentWindow.document, style);
+ };
+
+ handler();
};
}
diff --git a/packages/stage/tests/unit/util.spec.ts b/packages/stage/tests/unit/util.spec.ts
index d946629d..3458004a 100644
--- a/packages/stage/tests/unit/util.spec.ts
+++ b/packages/stage/tests/unit/util.spec.ts
@@ -61,7 +61,7 @@ Object.defineProperties(globalThis.HTMLElement.prototype, {
const createElement = () => {
const el = globalThis.document.createElement('div');
- el.style.cssText = `width: 100px; height: 100px; position: absolute; left: 100px; top: 100px;`;
+ el.style.cssText = 'width: 100px; height: 100px; position: absolute; left: 100px; top: 100px;';
return el;
};
@@ -78,7 +78,7 @@ describe('getOffset', () => {
});
test('没有offsetParent, 没有left、top', () => {
- div.style.cssText = `width: 100px; height: 100px`;
+ div.style.cssText = 'width: 100px; height: 100px';
root.appendChild(div);
const offset = util.getOffset(div);
expect(offset.left).toBe(0);
@@ -95,7 +95,7 @@ describe('getOffset', () => {
test('有offsetParent, 没有left、top', () => {
const parent = createElement();
- div.style.cssText = `width: 100px; height: 100px`;
+ div.style.cssText = 'width: 100px; height: 100px';
parent.appendChild(div);
root.appendChild(parent);
@@ -119,7 +119,7 @@ describe('getAbsolutePosition', () => {
test('有offsetParent', () => {
const parent = createElement();
- div.style.cssText = `width: 100px; height: 100px`;
+ div.style.cssText = 'width: 100px; height: 100px';
parent.appendChild(div);
root.appendChild(parent);
const offset = util.getAbsolutePosition(div, { left: 100, top: 100 });
diff --git a/packages/table/src/Table.vue b/packages/table/src/Table.vue
index be84b439..4beee85a 100644
--- a/packages/table/src/Table.vue
+++ b/packages/table/src/Table.vue
@@ -84,7 +84,7 @@ const props = withDefaults(
data: any[];
columns?: ColumnConfig[];
/** 合并行或列的计算方法 */
- spanMethod?: (data: { row: any; column: any; rowIndex: number; columnIndex: number }) => [number, number];
+ spanMethod?: (_data: { row: any; column: any; rowIndex: number; columnIndex: number }) => [number, number];
loading?: boolean;
/** Table 的最大高度。合法的值为数字或者单位为 px 的高度 */
bodyHeight?: string | number;
diff --git a/packages/table/src/utils.ts b/packages/table/src/utils.ts
index b6456c90..8f180d67 100644
--- a/packages/table/src/utils.ts
+++ b/packages/table/src/utils.ts
@@ -25,12 +25,12 @@ export const formatter = (item: ColumnConfig, row: any, data: { index: number })
if (item.formatter) {
if (item.formatter === 'datetime') {
- // eslint-disable-next-line no-param-reassign
item.formatter = (value: string) => datetimeFormatter(value);
}
try {
return item.formatter(row[item.prop], row, data);
} catch (e) {
+ console.error('Formatter error:', e);
return row[item.prop];
}
} else {
diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts
index 0a44b016..51c466d8 100644
--- a/packages/utils/src/index.ts
+++ b/packages/utils/src/index.ts
@@ -40,6 +40,7 @@ export * from './dom';
// for typeof global checks without @types/node
declare let global: {};
+// eslint-disable-next-line @typescript-eslint/naming-convention
let _globalThis: any;
export const getGlobalThis = (): any =>
_globalThis ||
@@ -47,12 +48,12 @@ export const getGlobalThis = (): any =>
typeof globalThis !== 'undefined'
? globalThis
: typeof self !== 'undefined'
- ? self
- : typeof window !== 'undefined'
- ? window
- : typeof global !== 'undefined'
- ? global
- : {});
+ ? self
+ : typeof window !== 'undefined'
+ ? window
+ : typeof global !== 'undefined'
+ ? global
+ : {});
export const sleep = (ms: number): Promise =>
new Promise((resolve) => {
@@ -410,6 +411,7 @@ export const getDefaultValueFromFields = (fields: DataSchema[]) => {
data[field.name] = JSON.parse(field.defaultValue);
} catch (e) {
data[field.name] = defaultValue.object;
+ console.warn('defaultValue 解析失败', field.defaultValue, e);
}
return;
}
diff --git a/packages/utils/tests/unit/index.spec.ts b/packages/utils/tests/unit/index.spec.ts
index b7781a6c..b4b9d3a2 100644
--- a/packages/utils/tests/unit/index.spec.ts
+++ b/packages/utils/tests/unit/index.spec.ts
@@ -172,8 +172,8 @@ describe('filterXSS', () => {
expect(value).toBe('<div></div>');
});
- test(`'"`, () => {
- const value = util.filterXSS(`'div'"span"`);
+ test('\'"', () => {
+ const value = util.filterXSS('\'div\'"span"');
expect(value).toBe(''div'"span"');
});
});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 10220abb..509c32fd 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -17,15 +17,12 @@ importers:
'@rollup/plugin-alias':
specifier: ^5.1.1
version: 5.1.1(rollup@4.38.0)
+ '@tmagic/eslint-config':
+ specifier: 'workspace: ^*'
+ version: link:eslint-config
'@types/node':
specifier: 18.19.61
version: 18.19.61
- '@typescript-eslint/eslint-plugin':
- specifier: ^5.62.0
- version: 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2))(eslint@8.57.1)(typescript@5.8.2)
- '@typescript-eslint/parser':
- specifier: ^5.62.0
- version: 5.62.0(eslint@8.57.1)(typescript@5.8.2)
'@vitejs/plugin-vue':
specifier: ^5.2.3
version: 5.2.3(vite@6.2.4(@types/node@18.19.61)(jiti@2.4.2)(sass@1.83.4)(terser@5.37.0))(vue@3.5.13(typescript@5.8.2))
@@ -57,23 +54,8 @@ importers:
specifier: ^2.4.1
version: 2.4.1
eslint:
- specifier: ^8.57.1
- version: 8.57.1
- eslint-config-tencent:
- specifier: ^1.1.2
- version: 1.1.2(@babel/core@7.26.0)(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2))(eslint@8.57.1)(prettier@2.8.8)(typescript@5.8.2)
- eslint-plugin-import:
- specifier: ^2.31.0
- version: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2))(eslint@8.57.1)
- eslint-plugin-prettier:
- specifier: ^4.2.1
- version: 4.2.1(eslint@8.57.1)(prettier@2.8.8)
- eslint-plugin-simple-import-sort:
- specifier: ^10.0.0
- version: 10.0.0(eslint@8.57.1)
- eslint-plugin-vue:
- specifier: ^9.33.0
- version: 9.33.0(eslint@8.57.1)
+ specifier: ^9.25.0
+ version: 9.25.0(jiti@2.4.2)
execa:
specifier: ^4.1.0
version: 4.1.0
@@ -96,8 +78,8 @@ importers:
specifier: ^1.1.1
version: 1.1.1
prettier:
- specifier: ^2.8.8
- version: 2.8.8
+ specifier: ^3.5.3
+ version: 3.5.3
recast:
specifier: ^0.23.11
version: 0.23.11
@@ -138,6 +120,51 @@ importers:
specifier: ^2.2.8
version: 2.2.8(typescript@5.8.2)
+ eslint-config:
+ dependencies:
+ '@eslint/js':
+ specifier: ^9.24.0
+ version: 9.25.0
+ '@stylistic/eslint-plugin':
+ specifier: ^4.2.0
+ version: 4.2.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ '@stylistic/eslint-plugin-ts':
+ specifier: ^4.2.0
+ version: 4.2.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/eslint-plugin':
+ specifier: ^8.30.1
+ version: 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/parser':
+ specifier: ^8.30.1
+ version: 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ eslint:
+ specifier: '>=9.24.0'
+ version: 9.25.0(jiti@2.4.2)
+ eslint-config-prettier:
+ specifier: ^10.1.2
+ version: 10.1.2(eslint@9.25.0(jiti@2.4.2))
+ eslint-plugin-import:
+ specifier: ^2.31.0
+ version: 2.31.0(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.25.0(jiti@2.4.2))
+ eslint-plugin-prettier:
+ specifier: ^5.2.6
+ version: 5.2.6(eslint-config-prettier@10.1.2(eslint@9.25.0(jiti@2.4.2)))(eslint@9.25.0(jiti@2.4.2))(prettier@3.5.3)
+ eslint-plugin-simple-import-sort:
+ specifier: ^12.1.1
+ version: 12.1.1(eslint@9.25.0(jiti@2.4.2))
+ eslint-plugin-vue:
+ specifier: ^10.0.0
+ version: 10.0.0(eslint@9.25.0(jiti@2.4.2))(vue-eslint-parser@9.4.3(eslint@9.25.0(jiti@2.4.2)))
+ globals:
+ specifier: ^16.0.0
+ version: 16.0.0
+ prettier:
+ specifier: '>=3.5.3'
+ version: 3.5.3
+ typescript-eslint:
+ specifier: ^8.30.1
+ version: 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+
packages/cli:
dependencies:
cac:
@@ -1393,13 +1420,6 @@ packages:
resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==}
engines: {node: '>=6.9.0'}
- '@babel/eslint-parser@7.27.0':
- resolution: {integrity: sha512-dtnzmSjXfgL/HDgMcmsLSzyGbEosi4DrGWoCNfuI+W4IkVJw6izpTe7LtOdwAXnkDqw5yweboYCTkM2rQizCng==}
- engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0}
- peerDependencies:
- '@babel/core': ^7.11.0
- eslint: ^7.5.0 || ^8.0.0 || ^9.0.0
-
'@babel/generator@7.26.5':
resolution: {integrity: sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==}
engines: {node: '>=6.9.0'}
@@ -2364,13 +2384,33 @@ packages:
resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
- '@eslint/eslintrc@2.1.4':
- resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ '@eslint/config-array@0.20.0':
+ resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@eslint/js@8.57.1':
- resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ '@eslint/config-helpers@0.2.1':
+ resolution: {integrity: sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
+ '@eslint/core@0.13.0':
+ resolution: {integrity: sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
+ '@eslint/eslintrc@3.3.1':
+ resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
+ '@eslint/js@9.25.0':
+ resolution: {integrity: sha512-iWhsUS8Wgxz9AXNfvfOPFSW4VfMXdVhp1hjkZVhXCrpgh/aLcc45rX6MPu+tIVUWDw0HfNwth7O28M1xDxNf9w==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
+ '@eslint/object-schema@2.1.6':
+ resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
+ '@eslint/plugin-kit@0.2.8':
+ resolution: {integrity: sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@floating-ui/core@1.6.9':
resolution: {integrity: sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==}
@@ -2381,18 +2421,25 @@ packages:
'@floating-ui/utils@0.2.9':
resolution: {integrity: sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==}
- '@humanwhocodes/config-array@0.13.0':
- resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==}
- engines: {node: '>=10.10.0'}
- deprecated: Use @eslint/config-array instead
+ '@humanfs/core@0.19.1':
+ resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==}
+ engines: {node: '>=18.18.0'}
+
+ '@humanfs/node@0.16.6':
+ resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==}
+ engines: {node: '>=18.18.0'}
'@humanwhocodes/module-importer@1.0.1':
resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
engines: {node: '>=12.22'}
- '@humanwhocodes/object-schema@2.0.3':
- resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==}
- deprecated: Use @eslint/object-schema instead
+ '@humanwhocodes/retry@0.3.1':
+ resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==}
+ engines: {node: '>=18.18'}
+
+ '@humanwhocodes/retry@0.4.2':
+ resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==}
+ engines: {node: '>=18.18'}
'@hutson/parse-repository-url@5.0.0':
resolution: {integrity: sha512-e5+YUKENATs1JgYHMzTr2MW/NDcXGfYFAuOQU8gJgF/kEh4EqKgfGrfLI67bMD4tbhZVlkigz/9YYwWcbOFthg==}
@@ -2433,9 +2480,6 @@ packages:
'@jridgewell/trace-mapping@0.3.25':
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
- '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1':
- resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==}
-
'@nodelib/fs.scandir@2.1.5':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@@ -2537,6 +2581,10 @@ packages:
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
+ '@pkgr/core@0.2.4':
+ resolution: {integrity: sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==}
+ engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
+
'@popperjs/core@2.11.8':
resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
@@ -2707,6 +2755,18 @@ packages:
'@shikijs/vscode-textmate@10.0.2':
resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}
+ '@stylistic/eslint-plugin-ts@4.2.0':
+ resolution: {integrity: sha512-j2o2GvOx9v66x8hmp/HJ+0T+nOppiO5ycGsCkifh7JPGgjxEhpkGmIGx3RWsoxpWbad3VCX8e8/T8n3+7ze1Zg==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ peerDependencies:
+ eslint: '>=9.0.0'
+
+ '@stylistic/eslint-plugin@4.2.0':
+ resolution: {integrity: sha512-8hXezgz7jexGHdo5WN6JBEIPHCSFyyU4vgbxevu4YLVS5vl+sxqAAGyXSzfNDyR6xMNSH5H1x67nsXcYMOHtZA==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ peerDependencies:
+ eslint: '>=9.0.0'
+
'@sxzz/popperjs-es@2.11.7':
resolution: {integrity: sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==}
@@ -3078,9 +3138,6 @@ packages:
'@types/react@18.3.18':
resolution: {integrity: sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==}
- '@types/semver@7.7.0':
- resolution: {integrity: sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==}
-
'@types/serialize-javascript@5.0.4':
resolution: {integrity: sha512-Z2R7UKFuNWCP8eoa2o9e5rkD3hmWxx/1L0CYz0k2BZzGh0PhEVMp9kfGiqEml/0IglwNERXZ2hwNzIrSz/KHTA==}
@@ -3102,121 +3159,52 @@ packages:
'@types/web-bluetooth@0.0.21':
resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==}
- '@typescript-eslint/eslint-plugin@5.62.0':
- resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ '@typescript-eslint/eslint-plugin@8.30.1':
+ resolution: {integrity: sha512-v+VWphxMjn+1t48/jO4t950D6KR8JaJuNXzi33Ve6P8sEmPr5k6CEXjdGwT6+LodVnEa91EQCtwjWNUCPweo+Q==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- '@typescript-eslint/parser': ^5.0.0
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
+ '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
+ eslint: ^8.57.0 || ^9.0.0
+ typescript: '>=4.8.4 <5.9.0'
- '@typescript-eslint/eslint-plugin@7.18.0':
- resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==}
- engines: {node: ^18.18.0 || >=20.0.0}
+ '@typescript-eslint/parser@8.30.1':
+ resolution: {integrity: sha512-H+vqmWwT5xoNrXqWs/fesmssOW70gxFlgcMlYcBaWNPIEWDgLa4W9nkSPmhuOgLnXq9QYgkZ31fhDyLhleCsAg==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- '@typescript-eslint/parser': ^7.0.0
- eslint: ^8.56.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
+ eslint: ^8.57.0 || ^9.0.0
+ typescript: '>=4.8.4 <5.9.0'
- '@typescript-eslint/parser@5.62.0':
- resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ '@typescript-eslint/scope-manager@8.30.1':
+ resolution: {integrity: sha512-+C0B6ChFXZkuaNDl73FJxRYT0G7ufVPOSQkqkpM/U198wUwUFOtgo1k/QzFh1KjpBitaK7R1tgjVz6o9HmsRPg==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
+ '@typescript-eslint/type-utils@8.30.1':
+ resolution: {integrity: sha512-64uBF76bfQiJyHgZISC7vcNz3adqQKIccVoKubyQcOnNcdJBvYOILV1v22Qhsw3tw3VQu5ll8ND6hycgAR5fEA==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
+ eslint: ^8.57.0 || ^9.0.0
+ typescript: '>=4.8.4 <5.9.0'
- '@typescript-eslint/parser@7.18.0':
- resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==}
- engines: {node: ^18.18.0 || >=20.0.0}
+ '@typescript-eslint/types@8.30.1':
+ resolution: {integrity: sha512-81KawPfkuulyWo5QdyG/LOKbspyyiW+p4vpn4bYO7DM/hZImlVnFwrpCTnmNMOt8CvLRr5ojI9nU1Ekpw4RcEw==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
+ '@typescript-eslint/typescript-estree@8.30.1':
+ resolution: {integrity: sha512-kQQnxymiUy9tTb1F2uep9W6aBiYODgq5EMSk6Nxh4Z+BDUoYUSa029ISs5zTzKBFnexQEh71KqwjKnRz58lusQ==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- eslint: ^8.56.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
+ typescript: '>=4.8.4 <5.9.0'
- '@typescript-eslint/scope-manager@5.62.0':
- resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
-
- '@typescript-eslint/scope-manager@7.18.0':
- resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==}
- engines: {node: ^18.18.0 || >=20.0.0}
-
- '@typescript-eslint/type-utils@5.62.0':
- resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ '@typescript-eslint/utils@8.30.1':
+ resolution: {integrity: sha512-T/8q4R9En2tcEsWPQgB5BQ0XJVOtfARcUvOa8yJP3fh9M/mXraLxZrkCfGb6ChrO/V3W+Xbd04RacUEqk1CFEQ==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- eslint: '*'
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
+ eslint: ^8.57.0 || ^9.0.0
+ typescript: '>=4.8.4 <5.9.0'
- '@typescript-eslint/type-utils@7.18.0':
- resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- eslint: ^8.56.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
-
- '@typescript-eslint/types@5.62.0':
- resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
-
- '@typescript-eslint/types@7.18.0':
- resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==}
- engines: {node: ^18.18.0 || >=20.0.0}
-
- '@typescript-eslint/typescript-estree@5.62.0':
- resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- peerDependencies:
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
-
- '@typescript-eslint/typescript-estree@7.18.0':
- resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
-
- '@typescript-eslint/utils@5.62.0':
- resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
-
- '@typescript-eslint/utils@7.18.0':
- resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==}
- engines: {node: ^18.18.0 || >=20.0.0}
- peerDependencies:
- eslint: ^8.56.0
-
- '@typescript-eslint/visitor-keys@5.62.0':
- resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
-
- '@typescript-eslint/visitor-keys@7.18.0':
- resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==}
- engines: {node: ^18.18.0 || >=20.0.0}
+ '@typescript-eslint/visitor-keys@8.30.1':
+ resolution: {integrity: sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@ungap/structured-clone@1.3.0':
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
@@ -3555,14 +3543,6 @@ packages:
resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==}
engines: {node: '>= 0.4'}
- array-union@2.1.0:
- resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
- engines: {node: '>=8'}
-
- array.prototype.findlast@1.2.5:
- resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==}
- engines: {node: '>= 0.4'}
-
array.prototype.findlastindex@1.2.6:
resolution: {integrity: sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==}
engines: {node: '>= 0.4'}
@@ -3575,10 +3555,6 @@ packages:
resolution: {integrity: sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==}
engines: {node: '>= 0.4'}
- array.prototype.tosorted@1.1.4:
- resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==}
- engines: {node: '>= 0.4'}
-
arraybuffer.prototype.slice@1.0.4:
resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==}
engines: {node: '>= 0.4'}
@@ -4147,18 +4123,10 @@ packages:
dijkstrajs@1.0.3:
resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==}
- dir-glob@3.0.1:
- resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
- engines: {node: '>=8'}
-
doctrine@2.1.0:
resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==}
engines: {node: '>=0.10.0'}
- doctrine@3.0.0:
- resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
- engines: {node: '>=6.0.0'}
-
domexception@4.0.0:
resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==}
engines: {node: '>=12'}
@@ -4240,10 +4208,6 @@ packages:
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
engines: {node: '>= 0.4'}
- es-iterator-helpers@1.2.1:
- resolution: {integrity: sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==}
- engines: {node: '>= 0.4'}
-
es-module-lexer@1.6.0:
resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==}
@@ -4297,11 +4261,11 @@ packages:
engines: {node: '>=6.0'}
hasBin: true
- eslint-config-tencent@1.1.2:
- resolution: {integrity: sha512-dUww15dl168Lobeev8qU87hNITN7mFTCs+Ftr3UFQHhzEHm2BVb2ieg/ABV2yji/H/vsrGBCGIcqUT/R3XcxxQ==}
+ eslint-config-prettier@10.1.2:
+ resolution: {integrity: sha512-Epgp/EofAUeEpIdZkW60MHKvPyru1ruQJxPL+WIycnaPApuseK0Zpkrh/FwL9oIpQvIhJwV7ptOy0DWUjTlCiA==}
+ hasBin: true
peerDependencies:
- '@babel/core': ^7.14.6
- eslint: '>= 7.28.0 < 10.0.0'
+ eslint: '>=7.0.0'
eslint-import-resolver-node@0.3.9:
resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
@@ -4327,12 +4291,6 @@ packages:
eslint-import-resolver-webpack:
optional: true
- eslint-plugin-chalk@1.0.0:
- resolution: {integrity: sha512-FTi6Wi5dSrkXEVHHojRwyRZZnNFXGnTytuWlrJ3P9HkmMZWTZC3vUaDpyb6jNkumdlrqK0FN8eI3XJG70FwBNA==}
- engines: {node: '>=12'}
- peerDependencies:
- eslint: '>=1.0.0'
-
eslint-plugin-import@2.31.0:
resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==}
engines: {node: '>=4'}
@@ -4343,66 +4301,61 @@ packages:
'@typescript-eslint/parser':
optional: true
- eslint-plugin-prettier@3.4.1:
- resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==}
- engines: {node: '>=6.0.0'}
+ eslint-plugin-prettier@5.2.6:
+ resolution: {integrity: sha512-mUcf7QG2Tjk7H055Jk0lGBjbgDnfrvqjhXh9t2xLMSCjZVcw9Rb1V6sVNXO0th3jgeO7zllWPTNRil3JW94TnQ==}
+ engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
- eslint: '>=5.0.0'
- eslint-config-prettier: '*'
- prettier: '>=1.13.0'
+ '@types/eslint': '>=8.0.0'
+ eslint: '>=8.0.0'
+ eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0'
+ prettier: '>=3.0.0'
peerDependenciesMeta:
+ '@types/eslint':
+ optional: true
eslint-config-prettier:
optional: true
- eslint-plugin-prettier@4.2.1:
- resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==}
- engines: {node: '>=12.0.0'}
- peerDependencies:
- eslint: '>=7.28.0'
- eslint-config-prettier: '*'
- prettier: '>=2.0.0'
- peerDependenciesMeta:
- eslint-config-prettier:
- optional: true
-
- eslint-plugin-react@7.37.4:
- resolution: {integrity: sha512-BGP0jRmfYyvOyvMoRX/uoUeW+GqNj9y16bPQzqAHf3AYII/tDs+jMN0dBVkl88/OZwNGwrVFxE7riHsXVfy/LQ==}
- engines: {node: '>=4'}
- peerDependencies:
- eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7
-
- eslint-plugin-simple-import-sort@10.0.0:
- resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==}
+ eslint-plugin-simple-import-sort@12.1.1:
+ resolution: {integrity: sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==}
peerDependencies:
eslint: '>=5.0.0'
- eslint-plugin-vue@9.33.0:
- resolution: {integrity: sha512-174lJKuNsuDIlLpjeXc5E2Tss8P44uIimAfGD0b90k0NoirJqpG7stLuU9Vp/9ioTOrQdWVREc4mRd1BD+CvGw==}
- engines: {node: ^14.17.0 || >=16.0.0}
+ eslint-plugin-vue@10.0.0:
+ resolution: {integrity: sha512-XKckedtajqwmaX6u1VnECmZ6xJt+YvlmMzBPZd+/sI3ub2lpYZyFnsyWo7c3nMOQKJQudeyk1lw/JxdgeKT64w==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0
-
- eslint-scope@5.1.1:
- resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
- engines: {node: '>=8.0.0'}
+ eslint: ^8.57.0 || ^9.0.0
+ vue-eslint-parser: ^10.0.0
eslint-scope@7.2.2:
resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- eslint-visitor-keys@2.1.0:
- resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==}
- engines: {node: '>=10'}
+ eslint-scope@8.3.0:
+ resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
eslint-visitor-keys@3.4.3:
resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- eslint@8.57.1:
- resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options.
+ eslint-visitor-keys@4.2.0:
+ resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
+ eslint@9.25.0:
+ resolution: {integrity: sha512-MsBdObhM4cEwkzCiraDv7A6txFXEqtNXOb877TsSp2FCkBNl8JfVQrmiuDqC1IkejT6JLPzYBXx/xAiYhyzgGA==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
hasBin: true
+ peerDependencies:
+ jiti: '*'
+ peerDependenciesMeta:
+ jiti:
+ optional: true
+
+ espree@10.3.0:
+ resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
espree@9.6.1:
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
@@ -4421,10 +4374,6 @@ packages:
resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
engines: {node: '>=4.0'}
- estraverse@4.3.0:
- resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==}
- engines: {node: '>=4.0'}
-
estraverse@5.3.0:
resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}
engines: {node: '>=4.0'}
@@ -4489,9 +4438,9 @@ packages:
resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==}
engines: {node: '>=8'}
- file-entry-cache@6.0.1:
- resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
- engines: {node: ^10.12.0 || >=12.0.0}
+ file-entry-cache@8.0.0:
+ resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==}
+ engines: {node: '>=16.0.0'}
fill-range@7.1.1:
resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}
@@ -4519,9 +4468,9 @@ packages:
resolution: {integrity: sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==}
engines: {node: '>= 8'}
- flat-cache@3.2.0:
- resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==}
- engines: {node: ^10.12.0 || >=12.0.0}
+ flat-cache@4.0.1:
+ resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==}
+ engines: {node: '>=16'}
flatted@3.3.3:
resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==}
@@ -4668,18 +4617,18 @@ packages:
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
- globals@13.24.0:
- resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
- engines: {node: '>=8'}
+ globals@14.0.0:
+ resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
+ engines: {node: '>=18'}
+
+ globals@16.0.0:
+ resolution: {integrity: sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==}
+ engines: {node: '>=18'}
globalthis@1.0.4:
resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==}
engines: {node: '>= 0.4'}
- globby@11.1.0:
- resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
- engines: {node: '>=10'}
-
gopd@1.2.0:
resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
engines: {node: '>= 0.4'}
@@ -4942,10 +4891,6 @@ packages:
resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==}
engines: {node: '>=8'}
- is-path-inside@3.0.3:
- resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
- engines: {node: '>=8'}
-
is-plain-obj@1.1.0:
resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==}
engines: {node: '>=0.10.0'}
@@ -5041,10 +4986,6 @@ packages:
resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==}
engines: {node: '>=8'}
- iterator.prototype@1.1.5:
- resolution: {integrity: sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==}
- engines: {node: '>= 0.4'}
-
jackspeak@3.4.3:
resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
@@ -5129,10 +5070,6 @@ packages:
resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==}
engines: {'0': node >= 0.2.0}
- jsx-ast-utils@3.3.5:
- resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==}
- engines: {node: '>=4.0'}
-
keycode@2.2.1:
resolution: {integrity: sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg==}
@@ -5424,9 +5361,6 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
- natural-compare-lite@1.4.0:
- resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
-
natural-compare@1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
@@ -5472,10 +5406,6 @@ packages:
nwsapi@2.2.20:
resolution: {integrity: sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==}
- object-assign@4.1.1:
- resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
- engines: {node: '>=0.10.0'}
-
object-inspect@1.13.4:
resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==}
engines: {node: '>= 0.4'}
@@ -5488,10 +5418,6 @@ packages:
resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==}
engines: {node: '>= 0.4'}
- object.entries@1.1.9:
- resolution: {integrity: sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==}
- engines: {node: '>= 0.4'}
-
object.fromentries@2.0.8:
resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==}
engines: {node: '>= 0.4'}
@@ -5689,8 +5615,10 @@ packages:
engines: {node: '>=10.13.0'}
hasBin: true
- prop-types@15.8.1:
- resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==}
+ prettier@3.5.3:
+ resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==}
+ engines: {node: '>=14'}
+ hasBin: true
property-information@7.0.0:
resolution: {integrity: sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg==}
@@ -5734,9 +5662,6 @@ packages:
peerDependencies:
react: ^18.3.1
- react-is@16.13.1:
- resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}
-
react-moveable@0.56.0:
resolution: {integrity: sha512-FmJNmIOsOA36mdxbrc/huiE4wuXSRlmon/o+/OrfNhSiYYYL0AV5oObtPluEhb2Yr/7EfYWBHTxF5aWAvjg1SA==}
@@ -5867,10 +5792,6 @@ packages:
engines: {node: '>= 0.4'}
hasBin: true
- resolve@2.0.0-next.5:
- resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==}
- hasBin: true
-
restore-cursor@3.1.0:
resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==}
engines: {node: '>=8'}
@@ -6045,10 +5966,6 @@ packages:
simple-swizzle@0.2.2:
resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==}
- slash@3.0.0:
- resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
- engines: {node: '>=8'}
-
slice-ansi@3.0.0:
resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==}
engines: {node: '>=8'}
@@ -6115,13 +6032,6 @@ packages:
resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
engines: {node: '>=12'}
- string.prototype.matchall@4.0.12:
- resolution: {integrity: sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==}
- engines: {node: '>= 0.4'}
-
- string.prototype.repeat@1.0.0:
- resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==}
-
string.prototype.trim@1.2.10:
resolution: {integrity: sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==}
engines: {node: '>= 0.4'}
@@ -6201,6 +6111,10 @@ packages:
symbol-tree@3.2.4:
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
+ synckit@0.11.4:
+ resolution: {integrity: sha512-Q/XQKRaJiLiFIBNN+mndW7S/RHxvwzuZS6ZwmRzUBqJBv/5QIKCEwkBC8GBf8EQJKYnaFs0wOZbKTXBPj8L9oQ==}
+ engines: {node: ^14.18.0 || >=16.0.0}
+
systemjs@6.15.1:
resolution: {integrity: sha512-Nk8c4lXvMB98MtbmjX7JwJRgJOL8fluecYCfCeYBznwmpOs8Bf15hLM6z4z71EDAhQVrQrI+wt1aLWSXZq+hXA==}
@@ -6242,9 +6156,6 @@ packages:
resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==}
engines: {node: '>=8'}
- text-table@0.2.0:
- resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
-
through2@4.0.2:
resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==}
@@ -6302,27 +6213,18 @@ packages:
resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==}
engines: {node: '>=8'}
- ts-api-utils@1.4.3:
- resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==}
- engines: {node: '>=16'}
+ ts-api-utils@2.1.0:
+ resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==}
+ engines: {node: '>=18.12'}
peerDependencies:
- typescript: '>=4.2.0'
+ typescript: '>=4.8.4'
tsconfig-paths@3.15.0:
resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==}
- tslib@1.14.1:
- resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
-
tslib@2.8.1:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
- tsutils@3.21.0:
- resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
- engines: {node: '>= 6'}
- peerDependencies:
- typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
-
type-check@0.4.0:
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
engines: {node: '>= 0.8.0'}
@@ -6331,10 +6233,6 @@ packages:
resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==}
engines: {node: '>=10'}
- type-fest@0.20.2:
- resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==}
- engines: {node: '>=10'}
-
type-fest@0.21.3:
resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==}
engines: {node: '>=10'}
@@ -6375,15 +6273,12 @@ packages:
resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==}
engines: {node: '>= 0.4'}
- typescript-eslint@7.18.0:
- resolution: {integrity: sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==}
- engines: {node: ^18.18.0 || >=20.0.0}
+ typescript-eslint@8.30.1:
+ resolution: {integrity: sha512-D7lC0kcehVH7Mb26MRQi64LMyRJsj3dToJxM1+JVTl53DQSV5/7oUGWQLcKl1C1KnoVHxMMU2FNQMffr7F3Row==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- eslint: ^8.56.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
+ eslint: ^8.57.0 || ^9.0.0
+ typescript: '>=4.8.4 <5.9.0'
typescript@5.7.3:
resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==}
@@ -6974,14 +6869,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@babel/eslint-parser@7.27.0(@babel/core@7.26.0)(eslint@8.57.1)':
- dependencies:
- '@babel/core': 7.26.0
- '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1
- eslint: 8.57.1
- eslint-visitor-keys: 2.1.0
- semver: 6.3.1
-
'@babel/generator@7.26.5':
dependencies:
'@babel/parser': 7.26.5
@@ -8001,19 +7888,33 @@ snapshots:
'@esbuild/win32-x64@0.25.2':
optional: true
- '@eslint-community/eslint-utils@4.5.1(eslint@8.57.1)':
+ '@eslint-community/eslint-utils@4.5.1(eslint@9.25.0(jiti@2.4.2))':
dependencies:
- eslint: 8.57.1
+ eslint: 9.25.0(jiti@2.4.2)
eslint-visitor-keys: 3.4.3
'@eslint-community/regexpp@4.12.1': {}
- '@eslint/eslintrc@2.1.4':
+ '@eslint/config-array@0.20.0':
+ dependencies:
+ '@eslint/object-schema': 2.1.6
+ debug: 4.4.0(supports-color@8.1.1)
+ minimatch: 3.1.2
+ transitivePeerDependencies:
+ - supports-color
+
+ '@eslint/config-helpers@0.2.1': {}
+
+ '@eslint/core@0.13.0':
+ dependencies:
+ '@types/json-schema': 7.0.15
+
+ '@eslint/eslintrc@3.3.1':
dependencies:
ajv: 6.12.6
debug: 4.4.0(supports-color@8.1.1)
- espree: 9.6.1
- globals: 13.24.0
+ espree: 10.3.0
+ globals: 14.0.0
ignore: 5.3.2
import-fresh: 3.3.1
js-yaml: 4.1.0
@@ -8022,7 +7923,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@eslint/js@8.57.1': {}
+ '@eslint/js@9.25.0': {}
+
+ '@eslint/object-schema@2.1.6': {}
+
+ '@eslint/plugin-kit@0.2.8':
+ dependencies:
+ '@eslint/core': 0.13.0
+ levn: 0.4.1
'@floating-ui/core@1.6.9':
dependencies:
@@ -8035,17 +7943,18 @@ snapshots:
'@floating-ui/utils@0.2.9': {}
- '@humanwhocodes/config-array@0.13.0':
+ '@humanfs/core@0.19.1': {}
+
+ '@humanfs/node@0.16.6':
dependencies:
- '@humanwhocodes/object-schema': 2.0.3
- debug: 4.4.0(supports-color@8.1.1)
- minimatch: 3.1.2
- transitivePeerDependencies:
- - supports-color
+ '@humanfs/core': 0.19.1
+ '@humanwhocodes/retry': 0.3.1
'@humanwhocodes/module-importer@1.0.1': {}
- '@humanwhocodes/object-schema@2.0.3': {}
+ '@humanwhocodes/retry@0.3.1': {}
+
+ '@humanwhocodes/retry@0.4.2': {}
'@hutson/parse-repository-url@5.0.0': {}
@@ -8088,10 +7997,6 @@ snapshots:
'@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.5.0
- '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1':
- dependencies:
- eslint-scope: 5.1.1
-
'@nodelib/fs.scandir@2.1.5':
dependencies:
'@nodelib/fs.stat': 2.0.5
@@ -8170,6 +8075,8 @@ snapshots:
'@pkgjs/parseargs@0.11.0':
optional: true
+ '@pkgr/core@0.2.4': {}
+
'@popperjs/core@2.11.8': {}
'@rollup/plugin-alias@5.1.1(rollup@4.38.0)':
@@ -8325,6 +8232,28 @@ snapshots:
'@shikijs/vscode-textmate@10.0.2': {}
+ '@stylistic/eslint-plugin-ts@4.2.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)':
+ dependencies:
+ '@typescript-eslint/utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ eslint: 9.25.0(jiti@2.4.2)
+ eslint-visitor-keys: 4.2.0
+ espree: 10.3.0
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+
+ '@stylistic/eslint-plugin@4.2.0(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)':
+ dependencies:
+ '@typescript-eslint/utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ eslint: 9.25.0(jiti@2.4.2)
+ eslint-visitor-keys: 4.2.0
+ espree: 10.3.0
+ estraverse: 5.3.0
+ picomatch: 4.0.2
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+
'@sxzz/popperjs-es@2.11.7': {}
'@tmagic/cli@1.5.13(typescript@5.8.2)':
@@ -8728,8 +8657,6 @@ snapshots:
'@types/prop-types': 15.7.14
csstype: 3.1.3
- '@types/semver@7.7.0': {}
-
'@types/serialize-javascript@5.0.4': {}
'@types/sortablejs@1.15.8': {}
@@ -8744,170 +8671,82 @@ snapshots:
'@types/web-bluetooth@0.0.21': {}
- '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2))(eslint@8.57.1)(typescript@5.8.2)':
+ '@typescript-eslint/eslint-plugin@8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)':
dependencies:
'@eslint-community/regexpp': 4.12.1
- '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.8.2)
- '@typescript-eslint/scope-manager': 5.62.0
- '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.1)(typescript@5.8.2)
- '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.8.2)
- debug: 4.4.0(supports-color@8.1.1)
- eslint: 8.57.1
- graphemer: 1.4.0
- ignore: 5.3.2
- natural-compare-lite: 1.4.0
- semver: 7.7.1
- tsutils: 3.21.0(typescript@5.8.2)
- optionalDependencies:
- typescript: 5.8.2
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.2))(eslint@8.57.1)(typescript@5.8.2)':
- dependencies:
- '@eslint-community/regexpp': 4.12.1
- '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.2)
- '@typescript-eslint/scope-manager': 7.18.0
- '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.8.2)
- '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.2)
- '@typescript-eslint/visitor-keys': 7.18.0
- eslint: 8.57.1
+ '@typescript-eslint/parser': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/scope-manager': 8.30.1
+ '@typescript-eslint/type-utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/visitor-keys': 8.30.1
+ eslint: 9.25.0(jiti@2.4.2)
graphemer: 1.4.0
ignore: 5.3.2
natural-compare: 1.4.0
- ts-api-utils: 1.4.3(typescript@5.8.2)
- optionalDependencies:
+ ts-api-utils: 2.1.0(typescript@5.8.2)
typescript: 5.8.2
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2)':
+ '@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)':
dependencies:
- '@typescript-eslint/scope-manager': 5.62.0
- '@typescript-eslint/types': 5.62.0
- '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.2)
+ '@typescript-eslint/scope-manager': 8.30.1
+ '@typescript-eslint/types': 8.30.1
+ '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.2)
+ '@typescript-eslint/visitor-keys': 8.30.1
debug: 4.4.0(supports-color@8.1.1)
- eslint: 8.57.1
- optionalDependencies:
+ eslint: 9.25.0(jiti@2.4.2)
typescript: 5.8.2
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.2)':
+ '@typescript-eslint/scope-manager@8.30.1':
dependencies:
- '@typescript-eslint/scope-manager': 7.18.0
- '@typescript-eslint/types': 7.18.0
- '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.2)
- '@typescript-eslint/visitor-keys': 7.18.0
+ '@typescript-eslint/types': 8.30.1
+ '@typescript-eslint/visitor-keys': 8.30.1
+
+ '@typescript-eslint/type-utils@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)':
+ dependencies:
+ '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.2)
+ '@typescript-eslint/utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
debug: 4.4.0(supports-color@8.1.1)
- eslint: 8.57.1
- optionalDependencies:
+ eslint: 9.25.0(jiti@2.4.2)
+ ts-api-utils: 2.1.0(typescript@5.8.2)
typescript: 5.8.2
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/scope-manager@5.62.0':
- dependencies:
- '@typescript-eslint/types': 5.62.0
- '@typescript-eslint/visitor-keys': 5.62.0
+ '@typescript-eslint/types@8.30.1': {}
- '@typescript-eslint/scope-manager@7.18.0':
+ '@typescript-eslint/typescript-estree@8.30.1(typescript@5.8.2)':
dependencies:
- '@typescript-eslint/types': 7.18.0
- '@typescript-eslint/visitor-keys': 7.18.0
-
- '@typescript-eslint/type-utils@5.62.0(eslint@8.57.1)(typescript@5.8.2)':
- dependencies:
- '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.2)
- '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.8.2)
+ '@typescript-eslint/types': 8.30.1
+ '@typescript-eslint/visitor-keys': 8.30.1
debug: 4.4.0(supports-color@8.1.1)
- eslint: 8.57.1
- tsutils: 3.21.0(typescript@5.8.2)
- optionalDependencies:
- typescript: 5.8.2
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.8.2)':
- dependencies:
- '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.2)
- '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.2)
- debug: 4.4.0(supports-color@8.1.1)
- eslint: 8.57.1
- ts-api-utils: 1.4.3(typescript@5.8.2)
- optionalDependencies:
- typescript: 5.8.2
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/types@5.62.0': {}
-
- '@typescript-eslint/types@7.18.0': {}
-
- '@typescript-eslint/typescript-estree@5.62.0(typescript@5.8.2)':
- dependencies:
- '@typescript-eslint/types': 5.62.0
- '@typescript-eslint/visitor-keys': 5.62.0
- debug: 4.4.0(supports-color@8.1.1)
- globby: 11.1.0
- is-glob: 4.0.3
- semver: 7.7.1
- tsutils: 3.21.0(typescript@5.8.2)
- optionalDependencies:
- typescript: 5.8.2
- transitivePeerDependencies:
- - supports-color
-
- '@typescript-eslint/typescript-estree@7.18.0(typescript@5.8.2)':
- dependencies:
- '@typescript-eslint/types': 7.18.0
- '@typescript-eslint/visitor-keys': 7.18.0
- debug: 4.4.0(supports-color@8.1.1)
- globby: 11.1.0
+ fast-glob: 3.3.3
is-glob: 4.0.3
minimatch: 9.0.5
semver: 7.7.1
- ts-api-utils: 1.4.3(typescript@5.8.2)
- optionalDependencies:
+ ts-api-utils: 2.1.0(typescript@5.8.2)
typescript: 5.8.2
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@5.8.2)':
+ '@typescript-eslint/utils@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)':
dependencies:
- '@eslint-community/eslint-utils': 4.5.1(eslint@8.57.1)
- '@types/json-schema': 7.0.15
- '@types/semver': 7.7.0
- '@typescript-eslint/scope-manager': 5.62.0
- '@typescript-eslint/types': 5.62.0
- '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.8.2)
- eslint: 8.57.1
- eslint-scope: 5.1.1
- semver: 7.7.1
+ '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2))
+ '@typescript-eslint/scope-manager': 8.30.1
+ '@typescript-eslint/types': 8.30.1
+ '@typescript-eslint/typescript-estree': 8.30.1(typescript@5.8.2)
+ eslint: 9.25.0(jiti@2.4.2)
+ typescript: 5.8.2
transitivePeerDependencies:
- supports-color
- - typescript
- '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.8.2)':
+ '@typescript-eslint/visitor-keys@8.30.1':
dependencies:
- '@eslint-community/eslint-utils': 4.5.1(eslint@8.57.1)
- '@typescript-eslint/scope-manager': 7.18.0
- '@typescript-eslint/types': 7.18.0
- '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.8.2)
- eslint: 8.57.1
- transitivePeerDependencies:
- - supports-color
- - typescript
-
- '@typescript-eslint/visitor-keys@5.62.0':
- dependencies:
- '@typescript-eslint/types': 5.62.0
- eslint-visitor-keys: 3.4.3
-
- '@typescript-eslint/visitor-keys@7.18.0':
- dependencies:
- '@typescript-eslint/types': 7.18.0
- eslint-visitor-keys: 3.4.3
+ '@typescript-eslint/types': 8.30.1
+ eslint-visitor-keys: 4.2.0
'@ungap/structured-clone@1.3.0': {}
@@ -9376,17 +9215,6 @@ snapshots:
get-intrinsic: 1.3.0
is-string: 1.1.1
- array-union@2.1.0: {}
-
- array.prototype.findlast@1.2.5:
- dependencies:
- call-bind: 1.0.8
- define-properties: 1.2.1
- es-abstract: 1.23.9
- es-errors: 1.3.0
- es-object-atoms: 1.1.1
- es-shim-unscopables: 1.1.0
-
array.prototype.findlastindex@1.2.6:
dependencies:
call-bind: 1.0.8
@@ -9411,14 +9239,6 @@ snapshots:
es-abstract: 1.23.9
es-shim-unscopables: 1.1.0
- array.prototype.tosorted@1.1.4:
- dependencies:
- call-bind: 1.0.8
- define-properties: 1.2.1
- es-abstract: 1.23.9
- es-errors: 1.3.0
- es-shim-unscopables: 1.1.0
-
arraybuffer.prototype.slice@1.0.4:
dependencies:
array-buffer-byte-length: 1.0.2
@@ -10055,18 +9875,10 @@ snapshots:
dijkstrajs@1.0.3: {}
- dir-glob@3.0.1:
- dependencies:
- path-type: 4.0.0
-
doctrine@2.1.0:
dependencies:
esutils: 2.0.3
- doctrine@3.0.0:
- dependencies:
- esutils: 2.0.3
-
domexception@4.0.0:
dependencies:
webidl-conversions: 7.0.0
@@ -10226,25 +10038,6 @@ snapshots:
es-errors@1.3.0: {}
- es-iterator-helpers@1.2.1:
- dependencies:
- call-bind: 1.0.8
- call-bound: 1.0.4
- define-properties: 1.2.1
- es-abstract: 1.23.9
- es-errors: 1.3.0
- es-set-tostringtag: 2.1.0
- function-bind: 1.1.2
- get-intrinsic: 1.3.0
- globalthis: 1.0.4
- gopd: 1.2.0
- has-property-descriptors: 1.0.2
- has-proto: 1.2.0
- has-symbols: 1.1.0
- internal-slot: 1.1.0
- iterator.prototype: 1.1.5
- safe-array-concat: 1.1.3
-
es-module-lexer@1.6.0: {}
es-object-atoms@1.1.1:
@@ -10340,26 +10133,9 @@ snapshots:
optionalDependencies:
source-map: 0.6.1
- eslint-config-tencent@1.1.2(@babel/core@7.26.0)(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2))(eslint@8.57.1)(prettier@2.8.8)(typescript@5.8.2):
+ eslint-config-prettier@10.1.2(eslint@9.25.0(jiti@2.4.2)):
dependencies:
- '@babel/core': 7.26.0
- '@babel/eslint-parser': 7.27.0(@babel/core@7.26.0)(eslint@8.57.1)
- '@eslint/js': 8.57.1
- eslint: 8.57.1
- eslint-plugin-chalk: 1.0.0(eslint@8.57.1)
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2))(eslint@8.57.1)
- eslint-plugin-prettier: 3.4.1(eslint@8.57.1)(prettier@2.8.8)
- eslint-plugin-react: 7.37.4(eslint@8.57.1)
- eslint-plugin-vue: 9.33.0(eslint@8.57.1)
- typescript-eslint: 7.18.0(eslint@8.57.1)(typescript@5.8.2)
- transitivePeerDependencies:
- - '@typescript-eslint/parser'
- - eslint-config-prettier
- - eslint-import-resolver-typescript
- - eslint-import-resolver-webpack
- - prettier
- - supports-color
- - typescript
+ eslint: 9.25.0(jiti@2.4.2)
eslint-import-resolver-node@0.3.9:
dependencies:
@@ -10369,22 +10145,17 @@ snapshots:
transitivePeerDependencies:
- supports-color
- eslint-module-utils@2.12.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1):
+ eslint-module-utils@2.12.0(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint@9.25.0(jiti@2.4.2)):
dependencies:
debug: 3.2.7
optionalDependencies:
- '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.8.2)
- eslint: 8.57.1
+ '@typescript-eslint/parser': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ eslint: 9.25.0(jiti@2.4.2)
eslint-import-resolver-node: 0.3.9
transitivePeerDependencies:
- supports-color
- eslint-plugin-chalk@1.0.0(eslint@8.57.1):
- dependencies:
- chalk: 4.1.2
- eslint: 8.57.1
-
- eslint-plugin-import@2.31.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2))(eslint@8.57.1):
+ eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.25.0(jiti@2.4.2)):
dependencies:
'@rtsao/scc': 1.1.0
array-includes: 3.1.8
@@ -10393,9 +10164,9 @@ snapshots:
array.prototype.flatmap: 1.3.3
debug: 3.2.7
doctrine: 2.1.0
- eslint: 8.57.1
+ eslint: 9.25.0(jiti@2.4.2)
eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1)
+ eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint@9.25.0(jiti@2.4.2))
hasown: 2.0.2
is-core-module: 2.16.1
is-glob: 4.0.3
@@ -10407,121 +10178,98 @@ snapshots:
string.prototype.trimend: 1.0.9
tsconfig-paths: 3.15.0
optionalDependencies:
- '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.8.2)
+ '@typescript-eslint/parser': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
transitivePeerDependencies:
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- supports-color
- eslint-plugin-prettier@3.4.1(eslint@8.57.1)(prettier@2.8.8):
+ eslint-plugin-prettier@5.2.6(eslint-config-prettier@10.1.2(eslint@9.25.0(jiti@2.4.2)))(eslint@9.25.0(jiti@2.4.2))(prettier@3.5.3):
dependencies:
- eslint: 8.57.1
- prettier: 2.8.8
+ eslint: 9.25.0(jiti@2.4.2)
+ prettier: 3.5.3
prettier-linter-helpers: 1.0.0
+ synckit: 0.11.4
+ optionalDependencies:
+ eslint-config-prettier: 10.1.2(eslint@9.25.0(jiti@2.4.2))
- eslint-plugin-prettier@4.2.1(eslint@8.57.1)(prettier@2.8.8):
+ eslint-plugin-simple-import-sort@12.1.1(eslint@9.25.0(jiti@2.4.2)):
dependencies:
- eslint: 8.57.1
- prettier: 2.8.8
- prettier-linter-helpers: 1.0.0
+ eslint: 9.25.0(jiti@2.4.2)
- eslint-plugin-react@7.37.4(eslint@8.57.1):
+ eslint-plugin-vue@10.0.0(eslint@9.25.0(jiti@2.4.2))(vue-eslint-parser@9.4.3(eslint@9.25.0(jiti@2.4.2))):
dependencies:
- array-includes: 3.1.8
- array.prototype.findlast: 1.2.5
- array.prototype.flatmap: 1.3.3
- array.prototype.tosorted: 1.1.4
- doctrine: 2.1.0
- es-iterator-helpers: 1.2.1
- eslint: 8.57.1
- estraverse: 5.3.0
- hasown: 2.0.2
- jsx-ast-utils: 3.3.5
- minimatch: 3.1.2
- object.entries: 1.1.9
- object.fromentries: 2.0.8
- object.values: 1.2.1
- prop-types: 15.8.1
- resolve: 2.0.0-next.5
- semver: 6.3.1
- string.prototype.matchall: 4.0.12
- string.prototype.repeat: 1.0.0
-
- eslint-plugin-simple-import-sort@10.0.0(eslint@8.57.1):
- dependencies:
- eslint: 8.57.1
-
- eslint-plugin-vue@9.33.0(eslint@8.57.1):
- dependencies:
- '@eslint-community/eslint-utils': 4.5.1(eslint@8.57.1)
- eslint: 8.57.1
- globals: 13.24.0
+ '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2))
+ eslint: 9.25.0(jiti@2.4.2)
natural-compare: 1.4.0
nth-check: 2.1.1
postcss-selector-parser: 6.1.2
semver: 7.7.1
- vue-eslint-parser: 9.4.3(eslint@8.57.1)
+ vue-eslint-parser: 9.4.3(eslint@9.25.0(jiti@2.4.2))
xml-name-validator: 4.0.0
- transitivePeerDependencies:
- - supports-color
-
- eslint-scope@5.1.1:
- dependencies:
- esrecurse: 4.3.0
- estraverse: 4.3.0
eslint-scope@7.2.2:
dependencies:
esrecurse: 4.3.0
estraverse: 5.3.0
- eslint-visitor-keys@2.1.0: {}
+ eslint-scope@8.3.0:
+ dependencies:
+ esrecurse: 4.3.0
+ estraverse: 5.3.0
eslint-visitor-keys@3.4.3: {}
- eslint@8.57.1:
+ eslint-visitor-keys@4.2.0: {}
+
+ eslint@9.25.0(jiti@2.4.2):
dependencies:
- '@eslint-community/eslint-utils': 4.5.1(eslint@8.57.1)
+ '@eslint-community/eslint-utils': 4.5.1(eslint@9.25.0(jiti@2.4.2))
'@eslint-community/regexpp': 4.12.1
- '@eslint/eslintrc': 2.1.4
- '@eslint/js': 8.57.1
- '@humanwhocodes/config-array': 0.13.0
+ '@eslint/config-array': 0.20.0
+ '@eslint/config-helpers': 0.2.1
+ '@eslint/core': 0.13.0
+ '@eslint/eslintrc': 3.3.1
+ '@eslint/js': 9.25.0
+ '@eslint/plugin-kit': 0.2.8
+ '@humanfs/node': 0.16.6
'@humanwhocodes/module-importer': 1.0.1
- '@nodelib/fs.walk': 1.2.8
- '@ungap/structured-clone': 1.3.0
+ '@humanwhocodes/retry': 0.4.2
+ '@types/estree': 1.0.7
+ '@types/json-schema': 7.0.15
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.6
debug: 4.4.0(supports-color@8.1.1)
- doctrine: 3.0.0
escape-string-regexp: 4.0.0
- eslint-scope: 7.2.2
- eslint-visitor-keys: 3.4.3
- espree: 9.6.1
+ eslint-scope: 8.3.0
+ eslint-visitor-keys: 4.2.0
+ espree: 10.3.0
esquery: 1.6.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
- file-entry-cache: 6.0.1
+ file-entry-cache: 8.0.0
find-up: 5.0.0
glob-parent: 6.0.2
- globals: 13.24.0
- graphemer: 1.4.0
ignore: 5.3.2
imurmurhash: 0.1.4
is-glob: 4.0.3
- is-path-inside: 3.0.3
- js-yaml: 4.1.0
json-stable-stringify-without-jsonify: 1.0.1
- levn: 0.4.1
lodash.merge: 4.6.2
minimatch: 3.1.2
natural-compare: 1.4.0
optionator: 0.9.4
- strip-ansi: 6.0.1
- text-table: 0.2.0
+ optionalDependencies:
+ jiti: 2.4.2
transitivePeerDependencies:
- supports-color
+ espree@10.3.0:
+ dependencies:
+ acorn: 8.14.1
+ acorn-jsx: 5.3.2(acorn@8.14.1)
+ eslint-visitor-keys: 4.2.0
+
espree@9.6.1:
dependencies:
acorn: 8.14.1
@@ -10538,8 +10286,6 @@ snapshots:
dependencies:
estraverse: 5.3.0
- estraverse@4.3.0: {}
-
estraverse@5.3.0: {}
estree-walker@2.0.2: {}
@@ -10614,9 +10360,9 @@ snapshots:
dependencies:
escape-string-regexp: 1.0.5
- file-entry-cache@6.0.1:
+ file-entry-cache@8.0.0:
dependencies:
- flat-cache: 3.2.0
+ flat-cache: 4.0.1
fill-range@7.1.1:
dependencies:
@@ -10651,11 +10397,10 @@ snapshots:
micromatch: 4.0.8
resolve-dir: 1.0.1
- flat-cache@3.2.0:
+ flat-cache@4.0.1:
dependencies:
flatted: 3.3.3
keyv: 4.5.4
- rimraf: 3.0.2
flatted@3.3.3: {}
@@ -10830,24 +10575,15 @@ snapshots:
globals@11.12.0: {}
- globals@13.24.0:
- dependencies:
- type-fest: 0.20.2
+ globals@14.0.0: {}
+
+ globals@16.0.0: {}
globalthis@1.0.4:
dependencies:
define-properties: 1.2.1
gopd: 1.2.0
- globby@11.1.0:
- dependencies:
- array-union: 2.1.0
- dir-glob: 3.0.1
- fast-glob: 3.3.3
- ignore: 5.3.2
- merge2: 1.4.1
- slash: 3.0.0
-
gopd@1.2.0: {}
graceful-fs@4.2.11: {}
@@ -11104,8 +10840,6 @@ snapshots:
is-obj@2.0.0: {}
- is-path-inside@3.0.3: {}
-
is-plain-obj@1.1.0: {}
is-potential-custom-element-name@1.0.1: {}
@@ -11194,15 +10928,6 @@ snapshots:
html-escaper: 2.0.2
istanbul-lib-report: 3.0.1
- iterator.prototype@1.1.5:
- dependencies:
- define-data-property: 1.1.4
- es-object-atoms: 1.1.1
- get-intrinsic: 1.3.0
- get-proto: 1.0.1
- has-symbols: 1.1.0
- set-function-name: 2.0.2
-
jackspeak@3.4.3:
dependencies:
'@isaacs/cliui': 8.0.2
@@ -11296,13 +11021,6 @@ snapshots:
jsonparse@1.3.1: {}
- jsx-ast-utils@3.3.5:
- dependencies:
- array-includes: 3.1.8
- array.prototype.flat: 1.3.3
- object.assign: 4.1.7
- object.values: 1.2.1
-
keycode@2.2.1: {}
keycon@1.4.0:
@@ -11595,8 +11313,6 @@ snapshots:
nanoid@3.3.8: {}
- natural-compare-lite@1.4.0: {}
-
natural-compare@1.4.0: {}
neo-async@2.6.2: {}
@@ -11644,8 +11360,6 @@ snapshots:
nwsapi@2.2.20: {}
- object-assign@4.1.1: {}
-
object-inspect@1.13.4: {}
object-keys@1.1.1: {}
@@ -11659,13 +11373,6 @@ snapshots:
has-symbols: 1.1.0
object-keys: 1.1.1
- object.entries@1.1.9:
- dependencies:
- call-bind: 1.0.8
- call-bound: 1.0.4
- define-properties: 1.2.1
- es-object-atoms: 1.1.1
-
object.fromentries@2.0.8:
dependencies:
call-bind: 1.0.8
@@ -11864,13 +11571,10 @@ snapshots:
dependencies:
fast-diff: 1.3.0
- prettier@2.8.8: {}
+ prettier@2.8.8:
+ optional: true
- prop-types@15.8.1:
- dependencies:
- loose-envify: 1.4.0
- object-assign: 4.1.1
- react-is: 16.13.1
+ prettier@3.5.3: {}
property-information@7.0.0: {}
@@ -11914,8 +11618,6 @@ snapshots:
react: 18.3.1
scheduler: 0.23.2
- react-is@16.13.1: {}
-
react-moveable@0.56.0:
dependencies:
'@daybrush/utils': 1.13.0
@@ -12081,12 +11783,6 @@ snapshots:
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
- resolve@2.0.0-next.5:
- dependencies:
- is-core-module: 2.16.1
- path-parse: 1.0.7
- supports-preserve-symlinks-flag: 1.0.0
-
restore-cursor@3.1.0:
dependencies:
onetime: 5.1.2
@@ -12322,8 +12018,6 @@ snapshots:
dependencies:
is-arrayish: 0.3.2
- slash@3.0.0: {}
-
slice-ansi@3.0.0:
dependencies:
ansi-styles: 4.3.0
@@ -12389,27 +12083,6 @@ snapshots:
emoji-regex: 9.2.2
strip-ansi: 7.1.0
- string.prototype.matchall@4.0.12:
- dependencies:
- call-bind: 1.0.8
- call-bound: 1.0.4
- define-properties: 1.2.1
- es-abstract: 1.23.9
- es-errors: 1.3.0
- es-object-atoms: 1.1.1
- get-intrinsic: 1.3.0
- gopd: 1.2.0
- has-symbols: 1.1.0
- internal-slot: 1.1.0
- regexp.prototype.flags: 1.5.4
- set-function-name: 2.0.2
- side-channel: 1.1.0
-
- string.prototype.repeat@1.0.0:
- dependencies:
- define-properties: 1.2.1
- es-abstract: 1.23.9
-
string.prototype.trim@1.2.10:
dependencies:
call-bind: 1.0.8
@@ -12494,6 +12167,11 @@ snapshots:
symbol-tree@3.2.4: {}
+ synckit@0.11.4:
+ dependencies:
+ '@pkgr/core': 0.2.4
+ tslib: 2.8.1
+
systemjs@6.15.1: {}
tabbable@6.2.0: {}
@@ -12547,8 +12225,6 @@ snapshots:
text-extensions@2.4.0: {}
- text-table@0.2.0: {}
-
through2@4.0.2:
dependencies:
readable-stream: 3.6.2
@@ -12594,7 +12270,7 @@ snapshots:
trim-newlines@3.0.1: {}
- ts-api-utils@1.4.3(typescript@5.8.2):
+ ts-api-utils@2.1.0(typescript@5.8.2):
dependencies:
typescript: 5.8.2
@@ -12605,23 +12281,14 @@ snapshots:
minimist: 1.2.8
strip-bom: 3.0.0
- tslib@1.14.1: {}
-
tslib@2.8.1: {}
- tsutils@3.21.0(typescript@5.8.2):
- dependencies:
- tslib: 1.14.1
- typescript: 5.8.2
-
type-check@0.4.0:
dependencies:
prelude-ls: 1.2.1
type-fest@0.18.1: {}
- type-fest@0.20.2: {}
-
type-fest@0.21.3: {}
type-fest@0.6.0: {}
@@ -12667,13 +12334,12 @@ snapshots:
possible-typed-array-names: 1.1.0
reflect.getprototypeof: 1.0.10
- typescript-eslint@7.18.0(eslint@8.57.1)(typescript@5.8.2):
+ typescript-eslint@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2):
dependencies:
- '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.8.2))(eslint@8.57.1)(typescript@5.8.2)
- '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.8.2)
- '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.8.2)
- eslint: 8.57.1
- optionalDependencies:
+ '@typescript-eslint/eslint-plugin': 8.30.1(@typescript-eslint/parser@8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/parser': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/utils': 8.30.1(eslint@9.25.0(jiti@2.4.2))(typescript@5.8.2)
+ eslint: 9.25.0(jiti@2.4.2)
typescript: 5.8.2
transitivePeerDependencies:
- supports-color
@@ -12981,10 +12647,10 @@ snapshots:
optionalDependencies:
'@vue/composition-api': 1.7.2(vue@3.5.13(typescript@5.8.2))
- vue-eslint-parser@9.4.3(eslint@8.57.1):
+ vue-eslint-parser@9.4.3(eslint@9.25.0(jiti@2.4.2)):
dependencies:
debug: 4.4.0(supports-color@8.1.1)
- eslint: 8.57.1
+ eslint: 9.25.0(jiti@2.4.2)
eslint-scope: 7.2.2
eslint-visitor-keys: 3.4.3
espree: 9.6.1
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 3613c3e1..5a8e87ba 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -3,4 +3,6 @@ packages:
- 'playground'
- 'runtime/*'
- 'vue-components/*'
- - 'react-components/*'
\ No newline at end of file
+ - 'react-components/*'
+ - 'eslint-config'
+
\ No newline at end of file
diff --git a/react-components/iterator-container/src/IteratorContainer.tsx b/react-components/iterator-container/src/IteratorContainer.tsx
index 9856d7ae..4a52bfd0 100644
--- a/react-components/iterator-container/src/IteratorContainer.tsx
+++ b/react-components/iterator-container/src/IteratorContainer.tsx
@@ -67,7 +67,7 @@ const IteratorContainer: React.FC = ({
const configs: IteratorItemSchema[] = iteratorData.map((itemData: any, index: number) => {
const condResult =
app?.platform !== 'editor'
- ? app?.dataSourceManager?.compliedIteratorItemConds(itemData, itemConfig, dsField) ?? true
+ ? (app?.dataSourceManager?.compliedIteratorItemConds(itemData, itemConfig, dsField) ?? true)
: true;
const newItems = app?.dataSourceManager?.compliedIteratorItems(itemData, items, dsField) ?? items;
diff --git a/rollup.dts.config.js b/rollup.dts.config.js
index c395d4a1..09b84da0 100644
--- a/rollup.dts.config.js
+++ b/rollup.dts.config.js
@@ -22,7 +22,7 @@ const runtimes = readdirSync('temp/runtime');
const targets = process.env.TARGETS ? process.env.TARGETS.split(',') : null;
const targetPackages = targets ? packages.filter((pkg) => targets.includes(pkg)) : packages;
-const __dirname = path.dirname(fileURLToPath(import.meta.url));
+const dirname = path.dirname(fileURLToPath(import.meta.url));
function rollupConfig(pkg, base) {
return {
@@ -34,9 +34,9 @@ function rollupConfig(pkg, base) {
plugins: [
alias({
entries: [
- { find: /^@form/, replacement: path.join(__dirname, `./temp/packages/form/src`) },
- { find: /^@editor/, replacement: path.join(__dirname, `./temp/packages/editor/src`) },
- { find: /^@data-source/, replacement: path.join(__dirname, `./temp/packages/data-source/src`) },
+ { find: /^@form/, replacement: path.join(dirname, './temp/packages/form/src') },
+ { find: /^@editor/, replacement: path.join(dirname, './temp/packages/editor/src') },
+ { find: /^@data-source/, replacement: path.join(dirname, './temp/packages/data-source/src') },
],
}),
dts(),
@@ -57,5 +57,5 @@ export default [
];
function removeScss(path) {
- writeFileSync(path, readFileSync(path).toString().replace(`import './theme/index.scss';`, ''));
+ writeFileSync(path, readFileSync(path).toString().replace("import './theme/index.scss';", ''));
}
diff --git a/runtime/react-runtime-help/src/hooks/use-app.ts b/runtime/react-runtime-help/src/hooks/use-app.ts
index 8dde99b5..bfff8573 100644
--- a/runtime/react-runtime-help/src/hooks/use-app.ts
+++ b/runtime/react-runtime-help/src/hooks/use-app.ts
@@ -37,13 +37,15 @@ export interface UseAppOptions {
};
}
-export const useNode = (
+export const useNode = (
props: Pick,
app = useContext(AppContent),
-) =>
- isDslNode(props.config) && props.config.id
- ? app?.getNode(props.config.id, props.iteratorContainerId, props.iteratorIndex)
- : undefined;
+): T | undefined => {
+ if (isDslNode(props.config) && props.config.id) {
+ app?.getNode(props.config.id, props.iteratorContainerId, props.iteratorIndex);
+ }
+ return void 0;
+};
export const registerNodeHooks = (node?: TMagicNode, methods: Methods = {}) => {
if (!node) {
diff --git a/runtime/react/page/main.tsx b/runtime/react/page/main.tsx
index e86ee1f4..290d3f60 100644
--- a/runtime/react/page/main.tsx
+++ b/runtime/react/page/main.tsx
@@ -48,6 +48,7 @@ const getLocalConfig = (): MApp[] => {
// eslint-disable-next-line no-eval
return [eval(`(${configStr})`)];
} catch (err) {
+ console.error('Error parsing localStorage magicDSL:', err);
return [];
}
};
diff --git a/runtime/vue-runtime-help/src/hooks/use-app.ts b/runtime/vue-runtime-help/src/hooks/use-app.ts
index 0c79a635..071a87d5 100644
--- a/runtime/vue-runtime-help/src/hooks/use-app.ts
+++ b/runtime/vue-runtime-help/src/hooks/use-app.ts
@@ -33,13 +33,15 @@ interface UseAppOptions {
methods?: Methods;
}
-export const useNode = (
+export const useNode = (
props: Pick,
app = inject('app'),
-) =>
- isDslNode(props.config) && props.config.id
- ? app?.getNode(props.config.id, props.iteratorContainerId, props.iteratorIndex)
- : undefined;
+): T | undefined => {
+ if (isDslNode(props.config) && props.config.id) {
+ return app?.getNode(props.config.id, props.iteratorContainerId, props.iteratorIndex);
+ }
+ return void 0;
+};
export const registerNodeHooks = (node?: TMagicNode, methods: Methods = {}) => {
if (!node) {
diff --git a/runtime/vue-runtime-help/src/index.ts b/runtime/vue-runtime-help/src/index.ts
index 4fe44ad3..833a25f9 100644
--- a/runtime/vue-runtime-help/src/index.ts
+++ b/runtime/vue-runtime-help/src/index.ts
@@ -8,7 +8,7 @@ export * from './hooks/use-app';
export * from './hooks/use-component-status';
export { useComponent } from './hooks/use-component';
-export interface userRenderFunctionOptions {
+export interface UserRenderFunctionOptions {
h: typeof h;
type: Parameters[0];
props?: {
@@ -26,4 +26,4 @@ export interface userRenderFunctionOptions {
directives?: { name: string; value: any; modifiers: any }[];
}
-export type UserRenderFunction = (options: userRenderFunctionOptions) => any;
+export type UserRenderFunction = (options: UserRenderFunctionOptions) => any;
diff --git a/runtime/vue2/page/main.ts b/runtime/vue2/page/main.ts
index 500bd383..01c36b4e 100644
--- a/runtime/vue2/page/main.ts
+++ b/runtime/vue2/page/main.ts
@@ -19,7 +19,7 @@
import Vue from 'vue';
import TMagicApp, { DataSourceManager, DeepObservedData, getUrlParam, registerDataSourceOnDemand } from '@tmagic/core';
-import type { userRenderFunctionOptions } from '@tmagic/vue-runtime-help';
+import type { UserRenderFunctionOptions } from '@tmagic/vue-runtime-help';
import asyncDataSources from '../.tmagic/async-datasource-entry';
import components from '../.tmagic/comp-entry';
@@ -65,7 +65,7 @@ registerDataSourceOnDemand(dsl, asyncDataSources).then((dataSources) => {
const vueApp = new Vue({
provide: {
app,
- userRender: ({ h, type, props, attrs, style, className }: userRenderFunctionOptions) =>
+ userRender: ({ h, type, props, attrs, style, className }: UserRenderFunctionOptions) =>
// class作为保留字符,android 4.4以下不能直接使用, 需要加引号
// eslint-disable-next-line prettier/prettier
h(type, { props, attrs, style, 'class': className }),
diff --git a/runtime/vue2/page/utils/index.ts b/runtime/vue2/page/utils/index.ts
index 54fbcd7a..f7e7b198 100644
--- a/runtime/vue2/page/utils/index.ts
+++ b/runtime/vue2/page/utils/index.ts
@@ -25,6 +25,7 @@ export const getLocalConfig = (): MApp[] => {
// eslint-disable-next-line no-eval
return [eval(`(${configStr})`)];
} catch (err) {
+ console.error('Error parsing localStorage magicDSL:', err);
return [];
}
};
diff --git a/runtime/vue2/playground/main.ts b/runtime/vue2/playground/main.ts
index b3c65396..524df9d4 100644
--- a/runtime/vue2/playground/main.ts
+++ b/runtime/vue2/playground/main.ts
@@ -19,7 +19,7 @@
import Vue from 'vue';
import TMagicApp, { DataSourceManager, DeepObservedData } from '@tmagic/core';
-import type { userRenderFunctionOptions } from '@tmagic/vue-runtime-help';
+import type { UserRenderFunctionOptions } from '@tmagic/vue-runtime-help';
import App from './App.vue';
@@ -62,10 +62,8 @@ Promise.all([
render: (h) => h(App),
provide: {
app,
- userRender: ({ h, type, props, attrs, style, className }: userRenderFunctionOptions) =>
- // class作为保留字符,android 4.4以下不能直接使用, 需要加引号
- // eslint-disable-next-line prettier/prettier
- h(type, { props, attrs, style, 'class': className }),
+ userRender: ({ h, type, props, attrs, style, className }: UserRenderFunctionOptions) =>
+ h(type, { props, attrs, style, class: className }),
},
el: '#app',
});
diff --git a/runtime/vue3/page/App.vue b/runtime/vue3/page/App.vue
index 32e98c93..687193dd 100644
--- a/runtime/vue3/page/App.vue
+++ b/runtime/vue3/page/App.vue
@@ -1,5 +1,5 @@
-
+