Skip to content

Conversation

exuan
Copy link
Contributor

@exuan exuan commented Jul 18, 2025

add tmui3.2 ui

Summary by CodeRabbit

  • New Features

    • Added support for the "tmui" UI component library, including template files, configuration, and dependencies for seamless integration.
    • Updated the UI component selection list to include "tmui" with relevant details and links.
  • Documentation

    • Added "tmui" to the components list in the documentation with a description and website link.

Copy link

coderabbitai bot commented Jul 18, 2025

Walkthrough

A new template for the "tmui" UI component library was integrated across documentation and code. The changes add "tmui" as an option in UI lists, introduce a dedicated template directory with configuration, dependencies, and example Vue files, and update project scripts to support "tmui" in build and development processes.

Changes

File(s) Change Summary
README.md Added "tmui" to the UI component library list with link, description, and parameter info.
packages/core/src/question/ui/ui.data.ts Added "tmui" entry to the exported UIList array with label, hint, and repository/website links.
packages/core/template/UI/tmui/index.html Created new HTML template for "tmui" with root div and script loader.
packages/core/template/UI/tmui/package.json Added dependencies for Vue 3, Pinia, ECharts, Sass, tmui-uni, and related libraries.
packages/core/template/UI/tmui/postcss.config.js Added PostCSS config with uniPostcssPlugin and autoprefixer.
packages/core/template/UI/tmui/src/App.vue Added root Vue component with launch hook and imported styles.
packages/core/template/UI/tmui/src/pages/index.vue Added demo Vue page using a tm-button component.
packages/core/template/UI/tmui/src/androidPrivacy.json Added privacy prompt JSON file.
packages/core/template/UI/tmui/jsconfig.json.data.mjs Added function to inject "tmui" config entry into config array before "baseConfig".
packages/core/template/UI/tmui/src/main.js.data.mjs Added function to ensure Pinia and tmui-uni are imported and used in main entry.
packages/core/template/UI/tmui/vite.config.js.data.mjs Added function to inject/merge TMUI resolver into Vite Components plugin and ensure Vue JSX plugin.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UIList
    participant TemplateGenerator
    participant tmui Template

    User->>UIList: Selects "tmui" as UI library
    UIList-->>TemplateGenerator: Provides "tmui" entry details
    TemplateGenerator->>tmui Template: Scaffolds files (index.html, App.vue, etc.)
    tmui Template-->>TemplateGenerator: Supplies config, dependencies, and example code
    TemplateGenerator-->>User: Delivers ready-to-use "tmui" project template
Loading

Poem

In the warren of code, a new friend appears,
TMUI hops in, greeted with cheers!
With Vue and Pinia, it joins the parade,
Buttons and colors in orange displayed.
Now rabbits can build with even more glee—
Hip-hop for TMUI, as bright as can be!
🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🧹 Nitpick comments (6)
packages/core/template/UI/tmui/src/main.js.data.mjs (1)

6-12: Consider using optional chaining for cleaner code.

The current logic is safe but could be more concise using optional chaining.

  const hasPiniaImport = oldData.entries.some(entry =>
-    entry.importer && entry.importer.includes('pinia'),
+    entry.importer?.includes('pinia'),
  )

  const hasTmuiImport = oldData.entries.some(entry =>
-    entry.importer && (entry.importer.includes('tmui') || entry.importer.includes('tm-ui')),
+    entry.importer?.includes('tmui') || entry.importer?.includes('tm-ui'),
  )
packages/core/template/UI/tmui/index.html (1)

8-9: Empty <title> risks an a11y / SEO lint failure
Give it a placeholder (e.g. “TMUI Demo”) or inject it from your template engine to avoid “document must have a title” warnings.

packages/core/template/UI/tmui/jsconfig.json.data.mjs (1)

8-10: Edge-case: baseConfig missing ⇒ TMUI config never injected
If an upstream template removes/renames baseConfig, the new entry is silently skipped.
Guard against that: prepend when no match is found.

-    config: oldData.config.flatMap(cfg =>
-      cfg.id === 'baseConfig' ? [tmuiConfig, cfg] : cfg,
-    ),
+    config: oldData.config.some(c => c.id === 'baseConfig')
+      ? oldData.config.flatMap(c => (c.id === 'baseConfig' ? [tmuiConfig, c] : c))
+      : [tmuiConfig, ...oldData.config],
packages/core/template/UI/tmui/vite.config.js.data.mjs (2)

46-56: Review proxy configuration for production readiness

The proxy configuration contains a hardcoded URL to https://cdn.tmui.design. Consider:

  1. Making this configurable via environment variables
  2. The rewrite function on line 52 doesn't actually rewrite the path (replaces /api with /api)
       proxy: {
         '/pag': {
-          target: 'https://cdn.tmui.design',
+          target: process.env.TMUI_CDN_URL || 'https://cdn.tmui.design',
           changeOrigin: true,
-          rewrite: path => path.replace(/^\/api/, '/api'),
+          rewrite: path => path.replace(/^\/pag/, ''),
         },
       },

90-136: Consider more robust configuration parsing

The current implementation uses regex to parse JavaScript configuration strings, which could be fragile for complex configurations. While this works for simple cases, consider using a proper AST parser for more reliability.

Would you like me to provide an implementation using an AST parser like @babel/parser for more robust configuration merging?

packages/core/template/UI/tmui/src/hybrid/html/js/colorview.js (1)

128-143: Use numeric array indices for clarity

The code uses string indices to access array elements, which works but is unconventional.

 window.tmColorView_getColor =  function(x,y,active){
 	var ctx = tmColorView_getCanvas();
 	let arg = ctx.getImageData(Number(x),Number(y),1,1);
 	uni.postMessage({
 	  data: {
 	    action: 'tmColorView_getColor',
 		tmColor:JSON.stringify({
-			r:arg.data["0"],
-			g:arg.data["1"],
-			b:arg.data["2"],
+			r:arg.data[0],
+			g:arg.data[1],
+			b:arg.data[2],
 			a:1
 		}),
 		tmColorActive:active
 	  }
 	})
 }

Comment on lines +2 to +11
"dependencies": {
"@vue/compiler-core": "^3.5.11",
"echarts": "5.4.2",
"pinia": "^2.0.33",
"sass": "^1.77.5",
"tmui-uni": "^3.2.7",
"vue": "^3.5.16",
"vue-docgen-api": "^4.79.2",
"vue-i18n": "^11.1.5"
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Several runtime-only deps look like build-time/dev deps
@vue/compiler-core, sass and vue-docgen-api inflate the production bundle when declared under dependencies. Move them to devDependencies unless they are required at runtime.

 {
   "dependencies": {
-    "@vue/compiler-core": "^3.5.11",
-    "sass": "^1.77.5",
-    "vue-docgen-api": "^4.79.2",
+  },
+  "devDependencies": {
+    "@vue/compiler-core": "^3.5.11",
+    "sass": "^1.77.5",
+    "vue-docgen-api": "^4.79.2"
   ...
 }

This keeps end-user installs leaner.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dependencies": {
"@vue/compiler-core": "^3.5.11",
"echarts": "5.4.2",
"pinia": "^2.0.33",
"sass": "^1.77.5",
"tmui-uni": "^3.2.7",
"vue": "^3.5.16",
"vue-docgen-api": "^4.79.2",
"vue-i18n": "^11.1.5"
}
"dependencies": {
"echarts": "5.4.2",
"pinia": "^2.0.33",
"tmui-uni": "^3.2.7",
"vue": "^3.5.16",
"vue-i18n": "^11.1.5"
},
"devDependencies": {
"@vue/compiler-core": "^3.5.11",
"sass": "^1.77.5",
"vue-docgen-api": "^4.79.2"
}
🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/package.json lines 2 to 11, the dependencies
@vue/compiler-core, sass, and vue-docgen-api are incorrectly listed under
"dependencies" but are only needed during build or development. Move these three
packages from "dependencies" to "devDependencies" to prevent inflating the
production bundle and keep end-user installs leaner.

Comment on lines 1 to 6
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Missing <!DOCTYPE html> & root <html> tags make the document invalid
Browsers will enter quirks mode, which can break layout calculations.
Add the standard boilerplate:

+<!DOCTYPE html>
+<html lang="en">
 <head>
   <meta charset="utf-8" />
   <meta
     name="viewport"
@@
   />
 ...
 </head>
+</html>

(Or, if this fragment is purposely injected into another page, rename it to .partial.html to make that intent clear.)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
/>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
/>
...
</head>
</html>
🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/src/hybrid/html/local.html at lines 1 to 6,
the document is missing the <!DOCTYPE html> declaration and the root <html>
tags, which makes it invalid and causes browsers to enter quirks mode. To fix
this, add <!DOCTYPE html> at the very top of the file and wrap the existing
content inside opening and closing <html> tags. If this file is intended as a
fragment to be injected into another page, rename it to have a .partial.html
extension to clarify its purpose.

@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).uni=n()}(this,(function(){"use strict";try{var e={};Object.defineProperty(e,"passive",{get:function(){!0}}),window.addEventListener("test-passive",null,e)}catch(e){}var n=Object.prototype.hasOwnProperty;function i(e,i){return n.call(e,i)}var t=[];function r(){return window.__dcloud_weex_postMessage||window.__dcloud_weex_}var o=function(e,n){var i={options:{timestamp:+new Date},name:e,arg:n};if(r()){if("postMessage"===e){var o={data:[n]};return window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(o):window.__dcloud_weex_.postMessage(JSON.stringify(o))}var a={type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessageToService(a):window.__dcloud_weex_.postMessageToService(JSON.stringify(a))}if(!window.plus)return window.parent.postMessage({type:"WEB_INVOKE_APPSERVICE",data:i,pageId:""},"*");if(0===t.length){var d=plus.webview.currentWebview();if(!d)throw new Error("plus.webview.currentWebview() is undefined");var s=d.parent(),w="";w=s?s.id:d.id,t.push(w)}if(plus.webview.getWebviewById("__uniapp__service"))plus.webview.postMessageToUniNView({type:"WEB_INVOKE_APPSERVICE",args:{data:i,webviewIds:t}},"__uniapp__service");else{var u=JSON.stringify(i);plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat("WEB_INVOKE_APPSERVICE",'",').concat(u,",").concat(JSON.stringify(t),");"))}},a={navigateTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;o("navigateTo",{url:encodeURI(n)})},navigateBack:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.delta;o("navigateBack",{delta:parseInt(n)||1})},switchTab:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;o("switchTab",{url:encodeURI(n)})},reLaunch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;o("reLaunch",{url:encodeURI(n)})},redirectTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;o("redirectTo",{url:encodeURI(n)})},getEnv:function(e){r()?e({nvue:!0}):window.plus?e({plus:!0}):e({h5:!0})},postMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o("postMessage",e.data||{})}},d=/uni-app/i.test(navigator.userAgent),s=/Html5Plus/i.test(navigator.userAgent),w=/complete|loaded|interactive/;var u=window.my&&navigator.userAgent.indexOf(["t","n","e","i","l","C","y","a","p","i","l","A"].reverse().join(""))>-1;var g=window.swan&&window.swan.webView&&/swan/i.test(navigator.userAgent);var v=window.qq&&window.qq.miniProgram&&/QQ/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var c=window.tt&&window.tt.miniProgram&&/toutiaomicroapp/i.test(navigator.userAgent);var m=window.wx&&window.wx.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var p=window.qa&&/quickapp/i.test(navigator.userAgent);var f=window.ks&&window.ks.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var l=window.tt&&window.tt.miniProgram&&/Lark|Feishu/i.test(navigator.userAgent);var _=window.jd&&window.jd.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var E=window.xhs&&window.xhs.miniProgram&&/xhsminiapp/i.test(navigator.userAgent);for(var h,P=function(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))},b=[function(e){if(d||s)return window.__dcloud_weex_postMessage||window.__dcloud_weex_?document.addEventListener("DOMContentLoaded",e):window.plus&&w.test(document.readyState)?setTimeout(e,0):document.addEventListener("plusready",e),a},function(e){if(m)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.wx.miniProgram},function(e){if(v)return window.QQJSBridge&&window.QQJSBridge.invoke?setTimeout(e,0):document.addEventListener("QQJSBridgeReady",e),window.qq.miniProgram},function(e){if(u){document.addEventListener("DOMContentLoaded",e);var n=window.my;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(g)return document.addEventListener("DOMContentLoaded",e),window.swan.webView},function(e){if(c)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(p){window.QaJSBridge&&window.QaJSBridge.invoke?setTimeout(e,0):document.addEventListener("QaJSBridgeReady",e);var n=window.qa;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(f)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.ks.miniProgram},function(e){if(l)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(_)return window.JDJSBridgeReady&&window.JDJSBridgeReady.invoke?setTimeout(e,0):document.addEventListener("JDJSBridgeReady",e),window.jd.miniProgram},function(e){if(E)return window.xhs.miniProgram},function(e){return document.addEventListener("DOMContentLoaded",e),a}],y=0;y<b.length&&!(h=b[y](P));y++);h||(h={});var B="undefined"!=typeof uni?uni:{};if(!B.navigateTo)for(var S in h)i(h,S)&&(B[S]=h[S]);return B.webView=h,B}));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider using a package manager for third-party libraries

This appears to be a minified vendor library (uni.webview v1.5.4). Instead of committing minified third-party code directly to the repository, consider:

  1. Installing it via npm/yarn if available
  2. Using a CDN link in production
  3. Adding it to .gitignore and documenting the download source

This approach would improve maintainability and make version updates easier.

🧰 Tools
🪛 Biome (1.9.4)

[error] 1-1: Redundant use strict directive.

The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.

(lint/suspicious/noRedundantUseStrict)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

🪛 ESLint

[error] 1-1: Expected an assignment or function call and instead saw an expression.

(no-unused-expressions)


[error] 1-1: Wrap an immediate function invocation in parentheses.

(style/wrap-iife)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected literal to be on the right side of ==.

(yoda)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: This line has 77 statements. Maximum allowed is 1.

(style/max-statements-per-line)


[error] 1-1: Operator '==' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Expected literal to be on the right side of !=.

(yoda)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Operator '!=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Expected literal to be on the right side of ==.

(yoda)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Operator '==' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: 'define' is not defined.

(no-undef)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: 'define' is not defined.

(no-undef)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '||' must be spaced.

(style/space-infix-ops)


[error] 1-1: Unexpected use of 'self'. Use globalThis instead.

(no-restricted-globals)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unnecessary parentheses around expression.

(style/no-extra-parens)


[error] 1-1: Unexpected function expression.

(prefer-arrow-callback)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected space(s) after "try".

(style/keyword-spacing)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected an assignment or function call and instead saw an expression.

(no-unused-expressions)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Expected method shorthand.

(object-shorthand)


[error] 1-1: Missing space before value for key 'get'.

(style/key-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected an assignment or function call and instead saw an expression.

(no-unused-expressions)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Closing curly brace appears on the same line as the subsequent block.

(style/brace-style)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Expected space(s) before "catch".

(style/keyword-spacing)


[error] 1-1: Expected space(s) after "catch".

(style/keyword-spacing)


[error] 1-1: 'e' is defined but never used.

(unused-imports/no-unused-vars)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) before "var".

(style/keyword-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Expected space(s) before "var".

(style/keyword-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Operator '||' must be spaced.

(style/space-infix-ops)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Split initialized 'var' declarations into multiple statements.

(one-var)


[error] 1-1: Expected space(s) before "var".

(style/keyword-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'options'.

(style/key-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'timestamp'.

(style/key-spacing)


[error] 1-1: Missing '()' invoking a constructor.

(style/new-parens)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'name'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'arg'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expected literal to be on the right side of ===.

(yoda)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Operator '===' must be spaced.

(style/space-infix-ops)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'data'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Expected space(s) before "var".

(style/keyword-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'type'.

(style/key-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'args'.

(style/key-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'data'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'webviewIds'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Expected space(s) before "if".

(style/keyword-spacing)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'type'.

(style/key-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'data'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'pageId'.

(style/key-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expected literal to be on the right side of ===.

(yoda)


[error] 1-1: Operator '===' must be spaced.

(style/space-infix-ops)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: 'plus' is not defined.

(no-undef)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "throw".

(style/keyword-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Split initialized 'var' declarations into multiple statements.

(one-var)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected an assignment or function call and instead saw an expression.

(no-unused-expressions)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Expected space(s) before "if".

(style/keyword-spacing)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: 'plus' is not defined.

(no-undef)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expect curly brackets

(antfu/curly)


[error] 1-1: 'plus' is not defined.

(no-undef)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'type'.

(style/key-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'args'.

(style/key-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'data'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'webviewIds'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected space(s) after "else".

(style/keyword-spacing)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: 'plus' is not defined.

(no-undef)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Expected method shorthand.

(object-shorthand)


[error] 1-1: Missing space before value for key 'navigateTo'.

(style/key-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Split initialized 'var' declarations into multiple statements.

(one-var)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '>' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '!==' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'url'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Expected method shorthand.

(object-shorthand)


[error] 1-1: Missing space before value for key 'navigateBack'.

(style/key-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Split initialized 'var' declarations into multiple statements.

(one-var)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '>' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '!==' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'delta'.

(style/key-spacing)


[error] 1-1: Prefer Number.parseInt over parseInt.

(unicorn/prefer-number-properties)


[error] 1-1: Operator '||' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Expected method shorthand.

(object-shorthand)


[error] 1-1: Missing space before value for key 'switchTab'.

(style/key-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Split initialized 'var' declarations into multiple statements.

(one-var)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '>' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '!==' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'url'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Expected method shorthand.

(object-shorthand)


[error] 1-1: Missing space before value for key 'reLaunch'.

(style/key-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Split initialized 'var' declarations into multiple statements.

(one-var)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '>' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '!==' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'url'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Expected method shorthand.

(object-shorthand)


[error] 1-1: Missing space before value for key 'redirectTo'.

(style/key-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Split initialized 'var' declarations into multiple statements.

(one-var)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '>' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '!==' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'url'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Expected method shorthand.

(object-shorthand)


[error] 1-1: Missing space before value for key 'getEnv'.

(style/key-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'nvue'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'plus'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'h5'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Expected method shorthand.

(object-shorthand)


[error] 1-1: Missing space before value for key 'postMessage'.

(style/key-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '>' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '!==' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use the rest parameters instead of 'arguments'.

(prefer-rest-params)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '||' must be spaced.

(style/space-infix-ops)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Use .includes(), rather than .indexOf(), when checking for existence.

(unicorn/prefer-includes)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Operator '>' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected space(s) after "for".

(style/keyword-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected an assignment or function call and instead saw an expression.

(no-unused-expressions)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'bubbles'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'cancelable'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Operator '||' must be spaced.

(style/space-infix-ops)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: Operator '||' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected space(s) after "return".

(style/keyword-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'navigateTo'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'navigateBack'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'switchTab'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'reLaunch'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'redirectTo'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'postMessage'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'getEnv'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected space(s) after "return".

(style/keyword-spacing)


[error] 1-1: A space is required after '{'.

(style/object-curly-spacing)


[error] 1-1: Missing space before value for key 'navigateTo'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'navigateBack'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'switchTab'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'reLaunch'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'redirectTo'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'postMessage'.

(style/key-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before value for key 'getEnv'.

(style/key-spacing)


[error] 1-1: A space is required before '}'.

(style/object-curly-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: 'e' is defined but never used. Allowed unused args must match /^_/u.

(unused-imports/no-unused-vars)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expected space(s) before "return".

(style/keyword-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 1-1: Requires a space after '{'.

(style/block-spacing)


[error] 1-1: Missing space before opening brace.

(style/space-before-blocks)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Operator '<' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Unexpected assignment within a 'for' statement.

(no-cond-assign)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: 'h' declared on line 1 column 3499 is used outside of binding context.

(block-scoped-var)


[error] 1-1: Operator '||' must be spaced.

(style/space-infix-ops)


[error] 1-1: 'h' declared on line 1 column 3499 is used outside of binding context.

(block-scoped-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Expected literal to be on the right side of !=.

(yoda)


[error] 1-1: Strings must use singlequote.

(style/quotes)


[error] 1-1: Operator '!=' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '?' must be spaced.

(style/space-infix-ops)


[error] 1-1: 'uni' is not defined.

(no-undef)


[error] 1-1: Operator ':' must be spaced.

(style/space-infix-ops)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Expected space(s) after "if".

(style/keyword-spacing)


[error] 1-1: Expect newline after if

(antfu/if-newline)


[error] 1-1: Expect curly brackets

(antfu/curly)


[error] 1-1: Expected space(s) before "for".

(style/keyword-spacing)


[error] 1-1: Expected space(s) after "for".

(style/keyword-spacing)


[error] 1-1: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 1-1: Unexpected var, use let or const instead.

(no-var)


[error] 1-1: 'h' declared on line 1 column 3499 is used outside of binding context.

(block-scoped-var)


[error] 1-1: 'h' declared on line 1 column 3499 is used outside of binding context.

(block-scoped-var)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Operator '&&' must be spaced.

(style/space-infix-ops)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: 'h' declared on line 1 column 3499 is used outside of binding context.

(block-scoped-var)


[error] 1-1: Missing whitespace after semicolon.

(style/semi-spacing)


[error] 1-1: Operator '=' must be spaced.

(style/space-infix-ops)


[error] 1-1: 'h' declared on line 1 column 3499 is used outside of binding context.

(block-scoped-var)


[error] 1-1: Unexpected use of comma operator.

(no-sequences)


[error] 1-1: A space is required after ','.

(style/comma-spacing)


[error] 1-1: Requires a space before '}'.

(style/block-spacing)


[error] 1-1: Extra semicolon.

(style/semi)

🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/src/hybrid/html/js/uni.webview.1.5.4.js at
line 1, the file contains minified third-party library code directly committed
to the repository. To fix this, remove the minified file from version control,
add it to .gitignore, and instead manage this dependency via a package manager
like npm or yarn if available, or use a CDN link in production. Also, document
the source and version of this library clearly for maintainability and easier
updates.

Comment on lines 11 to 13
document.all.addEventListener('touchmove', function(evt) {
evt.preventDefault();
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Replace deprecated document.all with standard DOM methods

document.all is deprecated and non-standard. Use document.documentElement or document.body instead.

-    document.all.addEventListener('touchmove', function(evt) {
+    document.documentElement.addEventListener('touchmove', function(evt) {
     	evt.preventDefault();
     });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
document.all.addEventListener('touchmove', function(evt) {
evt.preventDefault();
});
document.documentElement.addEventListener('touchmove', function(evt) {
evt.preventDefault();
});
🧰 Tools
🪛 ESLint

[error] 11-11: Expected indentation of 2 spaces but found 4.

(style/indent)


[error] 11-13: Unexpected function expression.

(prefer-arrow-callback)


[error] 11-11: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 12-12: Expected indentation of 4 spaces but found 4.

(style/indent)


[error] 12-12: Mixed spaces and tabs.

(style/no-mixed-spaces-and-tabs)


[error] 12-12: Unexpected tab character.

(style/no-tabs)


[error] 12-12: Extra semicolon.

(style/semi)


[error] 13-13: Expected indentation of 2 spaces but found 4.

(style/indent)


[error] 13-13: Extra semicolon.

(style/semi)

🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/src/hybrid/html/js/tmechart.js around lines 11
to 13, replace the deprecated and non-standard usage of document.all with a
standard DOM method such as document.documentElement or document.body to attach
the 'touchmove' event listener. Update the code to use
document.documentElement.addEventListener or document.body.addEventListener
instead of document.all.addEventListener to ensure compatibility and standards
compliance.

Comment on lines 29 to 50
function recoverEchartCBFn(opt) {
for (let key in opt) {
if (opt.hasOwnProperty(key)) {
const curr = opt[key]
if (typeof curr === 'string' && curr.includes('echartCbFn')) {
const fnObj = JSON.parse(curr);
tempFn = new Function(`return (${fnObj.fnString})`)();
opt[key] = function(...params) {
try {
return tempFn(...params)
} catch (error) {
return error.toString()
}
}
}

if (typeof curr === "object" && curr !== null) {
recoverEchartCBFn(curr);
}
}
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical security and code issues in function reconstruction

This function has several critical issues:

  1. Security Risk: Using new Function() is equivalent to eval and poses security risks if the input is not trusted
  2. Undeclared Variable: tempFn on line 35 is not declared, causing a global leak
  3. Prototype Pollution Risk: Direct use of hasOwnProperty can fail if overridden
 function recoverEchartCBFn(opt) {
     for (let key in opt) {
-        if (opt.hasOwnProperty(key)) {
+        if (Object.prototype.hasOwnProperty.call(opt, key)) {
             const curr = opt[key]
             if (typeof curr === 'string' && curr.includes('echartCbFn')) {
                 const fnObj = JSON.parse(curr);
-                tempFn = new Function(`return (${fnObj.fnString})`)();
+                const tempFn = new Function(`return (${fnObj.fnString})`)();
                 opt[key] = function(...params) {
                     try {
                         return tempFn(...params)

Consider implementing a safer alternative to dynamic function creation, such as using a predefined set of allowed functions or a more secure sandboxing approach.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function recoverEchartCBFn(opt) {
for (let key in opt) {
if (opt.hasOwnProperty(key)) {
const curr = opt[key]
if (typeof curr === 'string' && curr.includes('echartCbFn')) {
const fnObj = JSON.parse(curr);
tempFn = new Function(`return (${fnObj.fnString})`)();
opt[key] = function(...params) {
try {
return tempFn(...params)
} catch (error) {
return error.toString()
}
}
}
if (typeof curr === "object" && curr !== null) {
recoverEchartCBFn(curr);
}
}
}
}
function recoverEchartCBFn(opt) {
for (let key in opt) {
if (Object.prototype.hasOwnProperty.call(opt, key)) {
const curr = opt[key]
if (typeof curr === 'string' && curr.includes('echartCbFn')) {
const fnObj = JSON.parse(curr);
const tempFn = new Function(`return (${fnObj.fnString})`)();
opt[key] = function(...params) {
try {
return tempFn(...params)
} catch (error) {
return error.toString()
}
}
}
if (typeof curr === "object" && curr !== null) {
recoverEchartCBFn(curr);
}
}
}
}
🧰 Tools
🪛 Biome (1.9.4)

[error] 32-32: Do not access Object.prototype method 'hasOwnProperty' from target object.

It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.

(lint/suspicious/noPrototypeBuiltins)

🪛 ESLint

[error] 30-30: Expected indentation of 2 spaces but found 4.

(style/indent)


[error] 30-30: 'key' is never reassigned. Use 'const' instead.

(prefer-const)


[error] 31-31: Expected indentation of 4 spaces but found 8.

(style/indent)


[error] 31-31: Do not access Object.prototype method 'hasOwnProperty' from target object.

(no-prototype-builtins)


[error] 32-32: Expected indentation of 6 spaces but found 12.

(style/indent)


[error] 33-33: Expected indentation of 6 spaces but found 12.

(style/indent)


[error] 34-34: Expected indentation of 8 spaces but found 16.

(style/indent)


[error] 34-34: Extra semicolon.

(style/semi)


[error] 35-35: Expected indentation of 8 spaces but found 16.

(style/indent)


[error] 35-35: 'tempFn' is not defined.

(no-undef)


[error] 35-35: The Function constructor is eval.

(no-new-func)


[error] 35-35: Extra semicolon.

(style/semi)


[error] 36-36: Expected indentation of 8 spaces but found 16.

(style/indent)


[error] 36-36: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 37-37: Expected indentation of 10 spaces but found 20.

(style/indent)


[error] 38-38: Expected indentation of 12 spaces but found 24.

(style/indent)


[error] 38-38: 'tempFn' is not defined.

(no-undef)


[error] 39-39: Expected indentation of 10 spaces but found 20.

(style/indent)


[error] 39-39: Closing curly brace appears on the same line as the subsequent block.

(style/brace-style)


[error] 40-40: Expected indentation of 12 spaces but found 24.

(style/indent)


[error] 41-41: Expected indentation of 10 spaces but found 20.

(style/indent)


[error] 42-42: Expected indentation of 8 spaces but found 16.

(style/indent)


[error] 43-43: Expected indentation of 6 spaces but found 12.

(style/indent)


[error] 45-45: Expected indentation of 6 spaces but found 12.

(style/indent)


[error] 45-45: Strings must use singlequote.

(style/quotes)


[error] 46-46: Expected indentation of 8 spaces but found 16.

(style/indent)


[error] 46-46: Extra semicolon.

(style/semi)


[error] 47-47: Expected indentation of 6 spaces but found 12.

(style/indent)


[error] 48-48: Expected indentation of 4 spaces but found 8.

(style/indent)


[error] 49-49: Expected indentation of 2 spaces but found 4.

(style/indent)

Comment on lines 1 to 19

// 等待初始化完毕
document.addEventListener('UniAppJSBridgeReady', () => {

document.body.onclick = () =>
uni.postMessage({
data: {
action: 'onClick'
}
})
uni.postMessage({
data: {
action: 'onJSBridgeReady'
}
})
})
let options
let medias = []

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Wrap code in IIFE to avoid global variable pollution

The global variables options and medias could conflict with other scripts. Consider wrapping the entire module in an IIFE.

+(function() {
 // 等待初始化完毕
 document.addEventListener('UniAppJSBridgeReady', () => {
   
   document.body.onclick = () =>
     uni.postMessage({
       data: {
         action: 'onClick'
       }
     })
   // ... rest of the code
 })
 let options
 let medias = []
 // ... rest of the file
+})();
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// 等待初始化完毕
document.addEventListener('UniAppJSBridgeReady', () => {
document.body.onclick = () =>
uni.postMessage({
data: {
action: 'onClick'
}
})
uni.postMessage({
data: {
action: 'onJSBridgeReady'
}
})
})
let options
let medias = []
(function() {
// 等待初始化完毕
document.addEventListener('UniAppJSBridgeReady', () => {
document.body.onclick = () =>
uni.postMessage({
data: {
action: 'onClick'
}
})
uni.postMessage({
data: {
action: 'onJSBridgeReady'
}
})
})
let options
let medias = []
// ... rest of the file
})();
🧰 Tools
🪛 ESLint

[error] 1-2: Too many blank lines at the beginning of file. Max of 0 allowed.

(style/no-multiple-empty-lines)


[error] 3-5: Block must not be padded by blank lines.

(style/padded-blocks)


[error] 4-4: Unexpected tab character.

(style/no-tabs)


[error] 4-4: Trailing spaces not allowed.

(style/no-trailing-spaces)


[error] 6-6: 'uni' is not defined.

(no-undef)


[error] 8-9: Missing trailing comma.

(style/comma-dangle)


[error] 9-10: Missing trailing comma.

(style/comma-dangle)


[error] 11-11: 'uni' is not defined.

(no-undef)


[error] 13-14: Missing trailing comma.

(style/comma-dangle)


[error] 14-15: Missing trailing comma.

(style/comma-dangle)

🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/src/hybrid/html/js/handler.js lines 1 to 19,
the variables options and medias are declared globally, which risks polluting
the global namespace and causing conflicts. Wrap the entire code inside an
Immediately Invoked Function Expression (IIFE) to create a local scope,
preventing these variables from being accessible globally and avoiding potential
naming collisions.

Comment on lines 198 to 204
const ele = document.getElementById('content')
document.body.style.overflow = "scroll"
// 容器样式
if (opts[0]) {
document.body.style.cssText = opts[0]
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Avoid modifying global body styles

Setting document.body.style.overflow = "scroll" affects the entire page, not just the content area. This could interfere with other components.

 window.setContent = function (nodes, opts, append) {
   const ele = document.getElementById('content')
-  document.body.style.overflow = "scroll"
+  ele.style.overflow = "auto"
   // 容器样式
   if (opts[0]) {
-    document.body.style.cssText = opts[0]
+    ele.style.cssText = opts[0]
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const ele = document.getElementById('content')
document.body.style.overflow = "scroll"
// 容器样式
if (opts[0]) {
document.body.style.cssText = opts[0]
}
window.setContent = function (nodes, opts, append) {
const ele = document.getElementById('content')
ele.style.overflow = "auto"
// 容器样式
if (opts[0]) {
ele.style.cssText = opts[0]
}
}
🧰 Tools
🪛 ESLint

[error] 199-199: Strings must use singlequote.

(style/quotes)

🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/src/hybrid/html/js/handler.js around lines 198
to 204, avoid setting document.body.style.overflow = "scroll" directly as it
affects the entire page globally. Instead, apply the overflow style only to the
specific content container element (e.g., the element with id 'content') to
limit the style change to that area and prevent interference with other
components.

Comment on lines 1 to 20
// 这是nvue版本的colorview组件专用
var _tmColorView_w = 0
var _tmColorView_h = 0
var dpr = window.devicePixelRatio;
window.tmColorView_showdiv = function(w,h){
var ele = document.querySelector("#tmColorview");
var canvasdom = ele.querySelector("canvas")
ele.style.display = "block"
ele.style.width = w+'px'
ele.style.height = h+'px'
canvasdom.width = w
canvasdom.height = h
canvasdom.style.width = w+'px'
canvasdom.style.height = h+'px'
_tmColorView_w = w;
_tmColorView_h = h;
document.all.addEventListener('touchmove', function(evt) {
evt.preventDefault();
});
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove unused variable and replace deprecated API

  1. The dpr (device pixel ratio) variable is declared but never used
  2. document.all is deprecated
 var _tmColorView_w = 0
 var _tmColorView_h = 0
-var dpr = window.devicePixelRatio;
 window.tmColorView_showdiv = function(w,h){
 	var ele = document.querySelector("#tmColorview");
 	var canvasdom = ele.querySelector("canvas")
 	ele.style.display = "block"
 	ele.style.width = w+'px'
 	ele.style.height = h+'px'
 	canvasdom.width = w
 	canvasdom.height = h
 	canvasdom.style.width = w+'px'
 	canvasdom.style.height = h+'px'
 	_tmColorView_w = w;
 	_tmColorView_h = h;
-	document.all.addEventListener('touchmove', function(evt) {
+	document.documentElement.addEventListener('touchmove', function(evt) {
 		evt.preventDefault();
 	});
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// 这是nvue版本的colorview组件专用
var _tmColorView_w = 0
var _tmColorView_h = 0
var dpr = window.devicePixelRatio;
window.tmColorView_showdiv = function(w,h){
var ele = document.querySelector("#tmColorview");
var canvasdom = ele.querySelector("canvas")
ele.style.display = "block"
ele.style.width = w+'px'
ele.style.height = h+'px'
canvasdom.width = w
canvasdom.height = h
canvasdom.style.width = w+'px'
canvasdom.style.height = h+'px'
_tmColorView_w = w;
_tmColorView_h = h;
document.all.addEventListener('touchmove', function(evt) {
evt.preventDefault();
});
}
// 这是nvue版本的colorview组件专用
var _tmColorView_w = 0
var _tmColorView_h = 0
window.tmColorView_showdiv = function(w,h){
var ele = document.querySelector("#tmColorview");
var canvasdom = ele.querySelector("canvas")
ele.style.display = "block"
ele.style.width = w+'px'
ele.style.height = h+'px'
canvasdom.width = w
canvasdom.height = h
canvasdom.style.width = w+'px'
canvasdom.style.height = h+'px'
_tmColorView_w = w;
_tmColorView_h = h;
document.documentElement.addEventListener('touchmove', function(evt) {
evt.preventDefault();
});
}
🧰 Tools
🪛 GitHub Check: lint

[failure] 6-6:
Unexpected tab character


[failure] 5-5:
Missing space before opening brace


[failure] 5-5:
A space is required after ','


[failure] 5-5:
Missing space before function parentheses


[failure] 4-4:
Extra semicolon


[failure] 4-4:
'dpr' is assigned a value but never used. Allowed unused vars must match /^_/u


[failure] 4-4:
'dpr' is assigned a value but never used


[failure] 4-4:
Unexpected var, use let or const instead


[failure] 3-3:
Unexpected var, use let or const instead


[failure] 2-2:
Unexpected var, use let or const instead

🪛 ESLint

[error] 2-2: Unexpected var, use let or const instead.

(no-var)


[error] 3-3: Unexpected var, use let or const instead.

(no-var)


[error] 4-4: Unexpected var, use let or const instead.

(no-var)


[error] 4-4: 'dpr' is assigned a value but never used.

(no-unused-vars)


[error] 4-4: 'dpr' is assigned a value but never used. Allowed unused vars must match /^_/u.

(unused-imports/no-unused-vars)


[error] 4-4: Extra semicolon.

(style/semi)


[error] 5-5: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 5-5: A space is required after ','.

(style/comma-spacing)


[error] 5-20: Missing space before opening brace.

(style/space-before-blocks)


[error] 6-6: Unexpected tab character.

(style/no-tabs)


[error] 6-6: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 6-6: Unexpected var, use let or const instead.

(no-var)


[error] 6-6: Strings must use singlequote.

(style/quotes)


[error] 6-6: Extra semicolon.

(style/semi)


[error] 7-7: Unexpected tab character.

(style/no-tabs)


[error] 7-7: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 7-7: Unexpected var, use let or const instead.

(no-var)


[error] 7-7: Strings must use singlequote.

(style/quotes)


[error] 8-8: Unexpected tab character.

(style/no-tabs)


[error] 8-8: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 8-8: Strings must use singlequote.

(style/quotes)


[error] 9-9: Unexpected tab character.

(style/no-tabs)


[error] 9-9: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 9-9: Unexpected string concatenation.

(prefer-template)


[error] 9-9: Operator '+' must be spaced.

(style/space-infix-ops)


[error] 10-10: Unexpected tab character.

(style/no-tabs)


[error] 10-10: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 10-10: Unexpected string concatenation.

(prefer-template)


[error] 10-10: Operator '+' must be spaced.

(style/space-infix-ops)


[error] 11-11: Unexpected tab character.

(style/no-tabs)


[error] 11-11: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 12-12: Unexpected tab character.

(style/no-tabs)


[error] 12-12: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 13-13: Unexpected tab character.

(style/no-tabs)


[error] 13-13: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 13-13: Unexpected string concatenation.

(prefer-template)


[error] 13-13: Operator '+' must be spaced.

(style/space-infix-ops)


[error] 14-14: Unexpected tab character.

(style/no-tabs)


[error] 14-14: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 14-14: Unexpected string concatenation.

(prefer-template)


[error] 14-14: Operator '+' must be spaced.

(style/space-infix-ops)


[error] 15-15: Unexpected tab character.

(style/no-tabs)


[error] 15-15: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 15-15: Extra semicolon.

(style/semi)


[error] 16-16: Unexpected tab character.

(style/no-tabs)


[error] 16-16: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 16-16: Extra semicolon.

(style/semi)


[error] 17-17: Unexpected tab character.

(style/no-tabs)


[error] 17-17: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 17-19: Unexpected function expression.

(prefer-arrow-callback)


[error] 17-17: Missing space before function parentheses.

(style/space-before-function-paren)


[error] 18-18: Unexpected tab character.

(style/no-tabs)


[error] 18-18: Expected indentation of 4 spaces but found 2 tabs.

(style/indent)


[error] 18-18: Extra semicolon.

(style/semi)


[error] 19-19: Unexpected tab character.

(style/no-tabs)


[error] 19-19: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 19-19: Extra semicolon.

(style/semi)

🪛 GitHub Actions: Lint

[error] 2-2: ESLint: Unexpected var, use let or const instead (no-var)

🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/src/hybrid/html/js/colorview.js lines 1 to 20,
remove the unused variable `dpr` since it is declared but never used, and
replace the deprecated `document.all.addEventListener` call with a standard
event listener on `document` or `window` to handle the 'touchmove' event and
prevent its default behavior.

Comment on lines 63 to 104
function hslaToRgba(scolor) {
var { h, s, l, a } = scolor;
h = h / 360;
s = s / 100;
l = l / 100;
var rgb = [];

if (s == 0) {
rgb = [Math.round(l * 255), Math.round(l * 255), Math.round(l * 255)];
} else {
var q = l >= 0.5 ? (l + s - l * s) : (l * (1 + s));
var p = 2 * l - q;
var tr = rgb[0] = h + 1 / 3;
var tg = rgb[1] = h;
var tb = rgb[2] = h - 1 / 3;
for (var i = 0; i < rgb.length; i++) {
var tc = rgb[i];
if (tc < 0) {
tc = tc + 1;
} else if (tc > 1) {
tc = tc - 1;
}
switch (true) {
case (tc < (1 / 6)):
tc = p + (q - p) * 6 * tc;
break;
case ((1 / 6) <= tc && tc < 0.5):
tc = q;
break;
case (0.5 <= tc && tc < (2 / 3)):
tc = p + (q - p) * (4 - 6 * tc);
break;
default:
tc = p;
break;
}
rgb[i] = Math.round(tc * 255);
}
}

return { r: rgb[0], g: rgb[1], b: rgb[2], a: a };
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Clean up unused variables and use strict equality

The function has unused variable assignments and uses loose equality comparison.

 function hslaToRgba(scolor) {
 	var { h, s, l, a } = scolor;
 	h = h / 360;
 	s = s / 100;
 	l = l / 100;
 	var rgb = [];
 
-	if (s == 0) {
+	if (s === 0) {
 		rgb = [Math.round(l * 255), Math.round(l * 255), Math.round(l * 255)];
 	} else {
 		var q = l >= 0.5 ? (l + s - l * s) : (l * (1 + s));
 		var p = 2 * l - q;
-		var tr = rgb[0] = h + 1 / 3;
-		var tg = rgb[1] = h;
-		var tb = rgb[2] = h - 1 / 3;
+		rgb[0] = h + 1 / 3;
+		rgb[1] = h;
+		rgb[2] = h - 1 / 3;
 		for (var i = 0; i < rgb.length; i++) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function hslaToRgba(scolor) {
var { h, s, l, a } = scolor;
h = h / 360;
s = s / 100;
l = l / 100;
var rgb = [];
if (s == 0) {
rgb = [Math.round(l * 255), Math.round(l * 255), Math.round(l * 255)];
} else {
var q = l >= 0.5 ? (l + s - l * s) : (l * (1 + s));
var p = 2 * l - q;
var tr = rgb[0] = h + 1 / 3;
var tg = rgb[1] = h;
var tb = rgb[2] = h - 1 / 3;
for (var i = 0; i < rgb.length; i++) {
var tc = rgb[i];
if (tc < 0) {
tc = tc + 1;
} else if (tc > 1) {
tc = tc - 1;
}
switch (true) {
case (tc < (1 / 6)):
tc = p + (q - p) * 6 * tc;
break;
case ((1 / 6) <= tc && tc < 0.5):
tc = q;
break;
case (0.5 <= tc && tc < (2 / 3)):
tc = p + (q - p) * (4 - 6 * tc);
break;
default:
tc = p;
break;
}
rgb[i] = Math.round(tc * 255);
}
}
return { r: rgb[0], g: rgb[1], b: rgb[2], a: a };
}
function hslaToRgba(scolor) {
var { h, s, l, a } = scolor;
h = h / 360;
s = s / 100;
l = l / 100;
var rgb = [];
if (s === 0) {
rgb = [Math.round(l * 255), Math.round(l * 255), Math.round(l * 255)];
} else {
var q = l >= 0.5 ? (l + s - l * s) : (l * (1 + s));
var p = 2 * l - q;
rgb[0] = h + 1 / 3;
rgb[1] = h;
rgb[2] = h - 1 / 3;
for (var i = 0; i < rgb.length; i++) {
var tc = rgb[i];
if (tc < 0) {
tc = tc + 1;
} else if (tc > 1) {
tc = tc - 1;
}
switch (true) {
case (tc < (1 / 6)):
tc = p + (q - p) * 6 * tc;
break;
case ((1 / 6) <= tc && tc < 0.5):
tc = q;
break;
case (0.5 <= tc && tc < (2 / 3)):
tc = p + (q - p) * (4 - 6 * tc);
break;
default:
tc = p;
break;
}
rgb[i] = Math.round(tc * 255);
}
}
return { r: rgb[0], g: rgb[1], b: rgb[2], a: a };
}
🧰 Tools
🪛 ESLint

[error] 64-64: Unexpected tab character.

(style/no-tabs)


[error] 64-64: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 64-64: Unexpected var, use let or const instead.

(no-var)


[error] 64-64: Extra semicolon.

(style/semi)


[error] 65-65: Unexpected tab character.

(style/no-tabs)


[error] 65-65: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 65-65: Extra semicolon.

(style/semi)


[error] 66-66: Unexpected tab character.

(style/no-tabs)


[error] 66-66: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 66-66: Extra semicolon.

(style/semi)


[error] 67-67: Unexpected tab character.

(style/no-tabs)


[error] 67-67: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 67-67: Extra semicolon.

(style/semi)


[error] 68-68: Unexpected tab character.

(style/no-tabs)


[error] 68-68: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 68-68: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 68-68: Unexpected var, use let or const instead.

(no-var)


[error] 68-68: Extra semicolon.

(style/semi)


[error] 70-70: Unexpected tab character.

(style/no-tabs)


[error] 70-70: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 70-70: Expected '===' and instead saw '=='.

(eqeqeq)


[error] 71-71: Unexpected tab character.

(style/no-tabs)


[error] 71-71: Expected indentation of 4 spaces but found 2 tabs.

(style/indent)


[error] 71-71: Extra semicolon.

(style/semi)


[error] 72-72: Unexpected tab character.

(style/no-tabs)


[error] 72-72: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 72-72: Closing curly brace appears on the same line as the subsequent block.

(style/brace-style)


[error] 73-73: Unexpected tab character.

(style/no-tabs)


[error] 73-73: Expected indentation of 4 spaces but found 2 tabs.

(style/indent)


[error] 73-73: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 73-73: Unexpected var, use let or const instead.

(no-var)


[error] 73-73: Extra semicolon.

(style/semi)


[error] 74-74: Unexpected tab character.

(style/no-tabs)


[error] 74-74: Expected indentation of 4 spaces but found 2 tabs.

(style/indent)


[error] 74-74: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 74-74: Unexpected var, use let or const instead.

(no-var)


[error] 74-74: Extra semicolon.

(style/semi)


[error] 75-75: Unexpected tab character.

(style/no-tabs)


[error] 75-75: Expected indentation of 4 spaces but found 2 tabs.

(style/indent)


[error] 75-75: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 75-75: Unexpected var, use let or const instead.

(no-var)


[error] 75-75: 'tr' is assigned a value but never used.

(no-unused-vars)


[error] 75-75: 'tr' is assigned a value but never used. Allowed unused vars must match /^_/u.

(unused-imports/no-unused-vars)


[error] 75-75: Extra semicolon.

(style/semi)


[error] 76-76: Unexpected tab character.

(style/no-tabs)


[error] 76-76: Expected indentation of 4 spaces but found 2 tabs.

(style/indent)


[error] 76-76: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 76-76: Unexpected var, use let or const instead.

(no-var)


[error] 76-76: 'tg' is assigned a value but never used.

(no-unused-vars)


[error] 76-76: 'tg' is assigned a value but never used. Allowed unused vars must match /^_/u.

(unused-imports/no-unused-vars)


[error] 76-76: Extra semicolon.

(style/semi)


[error] 77-77: Unexpected tab character.

(style/no-tabs)


[error] 77-77: Expected indentation of 4 spaces but found 2 tabs.

(style/indent)


[error] 77-77: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 77-77: Unexpected var, use let or const instead.

(no-var)


[error] 77-77: 'tb' is assigned a value but never used.

(no-unused-vars)


[error] 77-77: 'tb' is assigned a value but never used. Allowed unused vars must match /^_/u.

(unused-imports/no-unused-vars)


[error] 77-77: Extra semicolon.

(style/semi)


[error] 78-78: Unexpected tab character.

(style/no-tabs)


[error] 78-78: Expected indentation of 4 spaces but found 2 tabs.

(style/indent)


[error] 78-78: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 78-78: Unexpected var, use let or const instead.

(no-var)


[error] 79-79: Unexpected tab character.

(style/no-tabs)


[error] 79-79: Expected indentation of 6 spaces but found 3 tabs.

(style/indent)


[error] 79-79: All 'var' declarations must be at the top of the function scope.

(vars-on-top)


[error] 79-79: Unexpected var, use let or const instead.

(no-var)


[error] 79-79: Extra semicolon.

(style/semi)


[error] 80-80: Unexpected tab character.

(style/no-tabs)


[error] 80-80: Expected indentation of 6 spaces but found 3 tabs.

(style/indent)


[error] 81-81: Unexpected tab character.

(style/no-tabs)


[error] 81-81: Expected indentation of 8 spaces but found 4 tabs.

(style/indent)


[error] 81-81: Extra semicolon.

(style/semi)


[error] 82-82: Unexpected tab character.

(style/no-tabs)


[error] 82-82: Expected indentation of 6 spaces but found 3 tabs.

(style/indent)


[error] 82-82: Closing curly brace appears on the same line as the subsequent block.

(style/brace-style)


[error] 83-83: Unexpected tab character.

(style/no-tabs)


[error] 83-83: Expected indentation of 8 spaces but found 4 tabs.

(style/indent)


[error] 83-83: Extra semicolon.

(style/semi)


[error] 84-84: Unexpected tab character.

(style/no-tabs)


[error] 84-84: Expected indentation of 6 spaces but found 3 tabs.

(style/indent)


[error] 85-85: Unexpected tab character.

(style/no-tabs)


[error] 85-85: Expected indentation of 6 spaces but found 3 tabs.

(style/indent)


[error] 86-86: Unexpected tab character.

(style/no-tabs)


[error] 86-86: Expected indentation of 8 spaces but found 4 tabs.

(style/indent)


[error] 87-87: Unexpected tab character.

(style/no-tabs)


[error] 87-87: Expected indentation of 10 spaces but found 5 tabs.

(style/indent)


[error] 87-87: Extra semicolon.

(style/semi)


[error] 88-88: Unexpected tab character.

(style/no-tabs)


[error] 88-88: Expected indentation of 10 spaces but found 5 tabs.

(style/indent)


[error] 88-88: Extra semicolon.

(style/semi)


[error] 89-89: Unexpected tab character.

(style/no-tabs)


[error] 89-89: Expected indentation of 8 spaces but found 4 tabs.

(style/indent)


[error] 90-90: Unexpected tab character.

(style/no-tabs)


[error] 90-90: Expected indentation of 10 spaces but found 5 tabs.

(style/indent)


[error] 90-90: Extra semicolon.

(style/semi)


[error] 91-91: Unexpected tab character.

(style/no-tabs)


[error] 91-91: Expected indentation of 10 spaces but found 5 tabs.

(style/indent)


[error] 91-91: Extra semicolon.

(style/semi)


[error] 92-92: Unexpected tab character.

(style/no-tabs)


[error] 92-92: Expected indentation of 8 spaces but found 4 tabs.

(style/indent)


[error] 92-92: Expected literal to be on the right side of <=.

(yoda)


[error] 93-93: Unexpected tab character.

(style/no-tabs)


[error] 93-93: Expected indentation of 10 spaces but found 5 tabs.

(style/indent)


[error] 93-93: Extra semicolon.

(style/semi)


[error] 94-94: Unexpected tab character.

(style/no-tabs)


[error] 94-94: Expected indentation of 10 spaces but found 5 tabs.

(style/indent)


[error] 94-94: Extra semicolon.

(style/semi)


[error] 95-95: Unexpected tab character.

(style/no-tabs)


[error] 95-95: Expected indentation of 8 spaces but found 4 tabs.

(style/indent)


[error] 96-96: Unexpected tab character.

(style/no-tabs)


[error] 96-96: Expected indentation of 10 spaces but found 5 tabs.

(style/indent)


[error] 96-96: Extra semicolon.

(style/semi)


[error] 97-97: Unexpected tab character.

(style/no-tabs)


[error] 97-97: Expected indentation of 10 spaces but found 5 tabs.

(style/indent)


[error] 97-97: Extra semicolon.

(style/semi)


[error] 98-98: Unexpected tab character.

(style/no-tabs)


[error] 98-98: Expected indentation of 6 spaces but found 3 tabs.

(style/indent)


[error] 99-99: Unexpected tab character.

(style/no-tabs)


[error] 99-99: Expected indentation of 6 spaces but found 3 tabs.

(style/indent)


[error] 99-99: Extra semicolon.

(style/semi)


[error] 100-100: Unexpected tab character.

(style/no-tabs)


[error] 100-100: Expected indentation of 4 spaces but found 2 tabs.

(style/indent)


[error] 101-101: Unexpected tab character.

(style/no-tabs)


[error] 101-101: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 102-102: Unexpected tab character.

(style/no-tabs)


[error] 102-102: Trailing spaces not allowed.

(style/no-trailing-spaces)


[error] 103-103: Unexpected tab character.

(style/no-tabs)


[error] 103-103: Expected indentation of 2 spaces but found 1 tab.

(style/indent)


[error] 103-103: Expected property shorthand.

(object-shorthand)


[error] 103-103: Extra semicolon.

(style/semi)

🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/src/hybrid/html/js/colorview.js between lines
63 and 104, the function hslaToRgba has variables tr, tg, and tb assigned but
never used, and it uses loose equality (==) for comparisons. Remove the unused
variable assignments for tr, tg, and tb, and replace all loose equality checks
(==) with strict equality (===) to improve code clarity and correctness.

@FliPPeDround
Copy link
Member

我认为你应该看看其他ui库是如何添加的

@exuan exuan force-pushed the feat-add-ui-tmui32 branch from 1e2fde0 to c60116c Compare July 18, 2025 08:25
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (5)
packages/core/template/UI/tmui/src/hybrid/html/js/uni.webview.1.5.4.js (1)

1-1: Consider using a package manager for third-party libraries

This minified vendor library should be managed via npm/yarn rather than being committed directly to the repository, as previously mentioned.

packages/core/template/UI/tmui/src/hybrid/html/js/tmechart.js (2)

11-13: Replace deprecated document.all with standard DOM methods

The usage of document.all is deprecated and should be replaced with standard DOM methods like document.documentElement or document.body.


29-50: Critical security and code issues in function reconstruction

The function has several critical issues including security risks from using new Function(), undeclared variables, and prototype pollution risks, as previously identified.

packages/core/template/UI/tmui/src/hybrid/html/js/handler.js (2)

1-19: Wrap code in IIFE to avoid global variable pollution

The global variables options and medias could conflict with other scripts and should be wrapped in an IIFE to prevent namespace pollution.


198-204: Avoid modifying global body styles

Setting document.body.style.overflow = "scroll" affects the entire page globally and could interfere with other components. Apply styles to the specific content container instead.

🧹 Nitpick comments (4)
packages/core/template/UI/tmui/src/main.js.data.mjs (2)

6-8: Apply optional chaining for cleaner code.

The static analysis tool correctly suggests using optional chaining for better readability and modern JavaScript practices.

Apply this diff to use optional chaining:

  const hasPiniaImport = oldData.entries.some(entry =>
-    entry.importer && entry.importer.includes('pinia'),
+    entry.importer?.includes('pinia'),
  )

10-12: Apply optional chaining for consistency.

Good coverage of both 'tmui' and 'tm-ui' variants. For consistency with the previous suggestion, apply optional chaining here as well.

Apply this diff:

  const hasTmuiImport = oldData.entries.some(entry =>
-    entry.importer && (entry.importer.includes('tmui') || entry.importer.includes('tm-ui')),
+    entry.importer?.includes('tmui') || entry.importer?.includes('tm-ui'),
  )
packages/core/template/UI/tmui/vite.config.js.data.mjs (2)

3-9: Consider improving package detection robustness.

The package detection logic is clever but has some potential edge cases:

  • Joining all importers with spaces (line 7) could cause false positive matches if package names appear in import paths
  • The regex only captures scoped packages (@scope/package) but might miss regular package names

Consider this more robust approach:

  const existing = new Set(
-    oldData.plugins
-      .filter(p => p.importer)
-      .map(p => p.importer)
-      .join(' ')
-      .match(/@[\w-]+\/[\w-]+/g) || [],
+    oldData.plugins
+      .filter(p => p.importer)
+      .flatMap(p => {
+        const matches = p.importer.match(/from\s+['"]([^'"]+)['"]/g) || []
+        return matches.map(match => match.replace(/from\s+['"]([^'"]+)['"]/, '$1'))
+      })
  )

91-136: Complex plugin merging logic with potential fragility.

The Components plugin merging logic is sophisticated but has some concerns:

Strengths:

  • Comprehensive handling of existing configurations
  • Proper resolver merging logic
  • Good duplicate prevention

Concerns:

  • Heavy reliance on regex parsing for configuration extraction could be fragile
  • Complex string manipulation for reconstructing configuration
  • Limited error handling for regex failures

Consider adding error handling for regex failures:

    const configMatch = plugin.initializer.match(/Components\(\{([^}]+)\}\)/)
    if (!configMatch) {
+      console.warn('Unable to parse Components plugin configuration, skipping merge')
      return plugin
    }

The current approach works but could be more robust with AST parsing instead of regex manipulation.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e2fde0 and c60116c.

⛔ Files ignored due to path filters (2)
  • packages/core/template/UI/tmui/src/hybrid/html/js/echarts.min.js is excluded by !**/*.min.js
  • packages/core/template/UI/tmui/src/hybrid/html/js/zrender.min.js is excluded by !**/*.min.js
📒 Files selected for processing (17)
  • README.md (1 hunks)
  • eslint.config.js (1 hunks)
  • packages/core/src/question/ui/ui.data.ts (1 hunks)
  • packages/core/template/UI/tmui/index.html (1 hunks)
  • packages/core/template/UI/tmui/jsconfig.json.data.mjs (1 hunks)
  • packages/core/template/UI/tmui/package.json (1 hunks)
  • packages/core/template/UI/tmui/postcss.config.js (1 hunks)
  • packages/core/template/UI/tmui/src/App.vue (1 hunks)
  • packages/core/template/UI/tmui/src/androidPrivacy.json (1 hunks)
  • packages/core/template/UI/tmui/src/hybrid/html/js/colorview.js (1 hunks)
  • packages/core/template/UI/tmui/src/hybrid/html/js/handler.js (1 hunks)
  • packages/core/template/UI/tmui/src/hybrid/html/js/tmechart.js (1 hunks)
  • packages/core/template/UI/tmui/src/hybrid/html/js/uni.webview.1.5.4.js (1 hunks)
  • packages/core/template/UI/tmui/src/hybrid/html/local.html (1 hunks)
  • packages/core/template/UI/tmui/src/main.js.data.mjs (1 hunks)
  • packages/core/template/UI/tmui/src/pages/index.vue (1 hunks)
  • packages/core/template/UI/tmui/vite.config.js.data.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • eslint.config.js
🚧 Files skipped from review as they are similar to previous changes (11)
  • packages/core/template/UI/tmui/src/androidPrivacy.json
  • README.md
  • packages/core/template/UI/tmui/src/pages/index.vue
  • packages/core/template/UI/tmui/postcss.config.js
  • packages/core/template/UI/tmui/src/App.vue
  • packages/core/template/UI/tmui/src/hybrid/html/local.html
  • packages/core/template/UI/tmui/index.html
  • packages/core/template/UI/tmui/jsconfig.json.data.mjs
  • packages/core/src/question/ui/ui.data.ts
  • packages/core/template/UI/tmui/package.json
  • packages/core/template/UI/tmui/src/hybrid/html/js/colorview.js
🧰 Additional context used
🧬 Code Graph Analysis (2)
packages/core/template/UI/tmui/vite.config.js.data.mjs (3)
packages/core/template/UI/tmui/jsconfig.json.data.mjs (1)
  • getData (1-12)
packages/core/template/UI/tmui/src/main.js.data.mjs (1)
  • getData (1-29)
scripts/dev.cjs (1)
  • path (3-3)
packages/core/template/UI/tmui/src/main.js.data.mjs (2)
packages/core/template/UI/tmui/jsconfig.json.data.mjs (1)
  • getData (1-12)
packages/core/template/UI/tmui/vite.config.js.data.mjs (1)
  • getData (1-170)
🪛 Biome (1.9.4)
packages/core/template/UI/tmui/src/hybrid/html/js/handler.js

[error] 147-151: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

packages/core/template/UI/tmui/src/hybrid/html/js/tmechart.js

[error] 32-32: Do not access Object.prototype method 'hasOwnProperty' from target object.

It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.

(lint/suspicious/noPrototypeBuiltins)

packages/core/template/UI/tmui/src/hybrid/html/js/uni.webview.1.5.4.js

[error] 1-1: Redundant use strict directive.

The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.

(lint/suspicious/noRedundantUseStrict)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)


[error] 1-1: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

packages/core/template/UI/tmui/src/main.js.data.mjs

[error] 7-7: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: stable - i686-pc-windows-msvc - node@20
  • GitHub Check: stable - x86_64-pc-windows-msvc - node@20
  • GitHub Check: stable - aarch64-pc-windows-msvc - node@20
🔇 Additional comments (8)
packages/core/template/UI/tmui/src/main.js.data.mjs (2)

1-4: Well-structured function initialization.

The function follows the established pattern from other template data files and properly initializes the entries array to prevent runtime errors.


14-29: Excellent conditional import logic.

The conditional additions are well-structured and follow best practices:

  • Only adds imports when they don't already exist
  • Uses proper import syntax for both Pinia and TMUI
  • Includes both import and usage statements appropriately
  • Clean return of the modified data structure
packages/core/template/UI/tmui/vite.config.js.data.mjs (6)

12-14: Clean plugin detection logic.

The Components plugin detection is well-implemented with proper optional chaining and clear intent.


17-21: Sophisticated component resolver with proper naming convention.

The TMUI resolver function correctly handles the component naming transformation:

  • Filters components starting with 'Tm' prefix
  • Properly converts PascalCase to kebab-case with 'tm-' prefix
  • Uses template literals for dynamic import paths

The regex replacement logic name.slice(2).replace(/([A-Z])/g, '-$1').toLowerCase().replace(/^-/, 'tm-') correctly transforms names like 'TmButton' to 'tm-button'.


24-57: Comprehensive base configuration with modern defaults.

The base configuration is well-structured with:

  • Proper Vue i18n flags for production optimization
  • Modern ES6 build target
  • SCSS modern compiler configuration with deprecation handling
  • Development server proxy for TMUI CDN resources
  • Proper configuration merging that preserves existing settings

60-88: Well-designed plugin factory with conditional imports.

The plugin creation logic demonstrates good design patterns:

  • Factory function approach for flexibility
  • Conditional import statements prevent duplicate imports
  • Proper plugin configuration with TypeScript support
  • Clean separation between Components and Vue JSX plugins

139-147: Smart plugin insertion with proper positioning.

The plugin insertion logic is well-designed:

  • Intelligently finds insertion points after autoImport or uni plugins
  • Handles edge cases where target plugins might not exist
  • Properly preserves existing plugin order
  • Uses splice correctly for array manipulation

150-170: Clear main logic flow with proper scenario handling.

The main logic flow effectively handles both scenarios:

  • Existing Components plugin: merges TMUI resolver and adds Vue JSX plugin
  • No Components plugin: adds complete plugin configuration
  • Proper configuration object construction with base config merging

@exuan exuan force-pushed the feat-add-ui-tmui32 branch from c60116c to 3c40b56 Compare July 18, 2025 08:29
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (5)
packages/core/template/UI/tmui/src/main.js.data.mjs (2)

6-8: Use optional chaining for cleaner code

The static analysis tool correctly identified that this can be simplified using optional chaining.

Apply this diff:

-  const hasPiniaImport = oldData.entries.some(entry =>
-    entry.importer && entry.importer.includes('pinia'),
-  )
+  const hasPiniaImport = oldData.entries.some(entry =>
+    entry.importer?.includes('pinia'),
+  )

10-12: Apply optional chaining consistently

For consistency with the previous suggestion, this should also use optional chaining.

Apply this diff:

-  const hasTmuiImport = oldData.entries.some(entry =>
-    entry.importer && (entry.importer.includes('tmui') || entry.importer.includes('tm-ui')),
-  )
+  const hasTmuiImport = oldData.entries.some(entry =>
+    entry.importer?.includes('tmui') || entry.importer?.includes('tm-ui'),
+  )
packages/core/template/UI/tmui/vite.config.js.data.mjs (3)

3-9: Consider regex robustness for package detection

The package detection logic works well for scoped packages, but the regex /@[\w-]+\/[\w-]+/g might not catch all package formats. Consider if non-scoped packages or packages with different naming patterns need to be detected.

The current implementation should work for the intended use case, but you might want to verify it handles all expected package naming patterns in your ecosystem.


49-53: Fix redundant proxy rewrite

The proxy rewrite rule appears redundant - it replaces /api with /api, which has no effect.

Either remove the rewrite or fix it to match the actual API path:

-        rewrite: path => path.replace(/^\/api/, '/api'),
+        rewrite: path => path.replace(/^\/pag/, '/api'),

Or if no rewriting is needed:

-        rewrite: path => path.replace(/^\/api/, '/api'),

96-123: String parsing approach is fragile but functional

The configuration merging logic uses string parsing to extract and modify existing plugin options. While this approach works, it's inherently fragile and could break if the configuration format changes.

Consider adding error handling or validation to make the parsing more robust:

  • Add try-catch around regex operations
  • Validate extracted configuration before using it
  • Consider alternative approaches if possible

The current implementation should work for typical use cases, but be aware of potential edge cases.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c60116c and 3c40b56.

📒 Files selected for processing (11)
  • README.md (1 hunks)
  • packages/core/src/question/ui/ui.data.ts (1 hunks)
  • packages/core/template/UI/tmui/index.html (1 hunks)
  • packages/core/template/UI/tmui/jsconfig.json.data.mjs (1 hunks)
  • packages/core/template/UI/tmui/package.json (1 hunks)
  • packages/core/template/UI/tmui/postcss.config.js (1 hunks)
  • packages/core/template/UI/tmui/src/App.vue (1 hunks)
  • packages/core/template/UI/tmui/src/androidPrivacy.json (1 hunks)
  • packages/core/template/UI/tmui/src/main.js.data.mjs (1 hunks)
  • packages/core/template/UI/tmui/src/pages/index.vue (1 hunks)
  • packages/core/template/UI/tmui/vite.config.js.data.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
  • packages/core/template/UI/tmui/src/androidPrivacy.json
  • README.md
  • packages/core/template/UI/tmui/src/pages/index.vue
  • packages/core/template/UI/tmui/src/App.vue
  • packages/core/template/UI/tmui/postcss.config.js
  • packages/core/template/UI/tmui/index.html
  • packages/core/template/UI/tmui/jsconfig.json.data.mjs
  • packages/core/src/question/ui/ui.data.ts
  • packages/core/template/UI/tmui/package.json
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/core/template/UI/tmui/src/main.js.data.mjs (2)
packages/core/template/UI/tmui/jsconfig.json.data.mjs (1)
  • getData (1-12)
packages/core/template/UI/tmui/vite.config.js.data.mjs (1)
  • getData (1-170)
🪛 Biome (1.9.4)
packages/core/template/UI/tmui/src/main.js.data.mjs

[error] 7-7: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

🔇 Additional comments (6)
packages/core/template/UI/tmui/src/main.js.data.mjs (2)

1-4: LGTM: Clean function initialization

The function properly initializes the oldData.entries array if it doesn't exist, which is good defensive programming.


14-26: LGTM: Proper import injection logic

The conditional import injection is well-structured:

  • Pinia import uses the correct namespace import syntax
  • TMUI import uses the appropriate default import
  • Both include proper app.use() calls
  • Logic prevents duplicate imports
packages/core/template/UI/tmui/vite.config.js.data.mjs (4)

17-21: LGTM: Well-designed component resolver

The TMUI resolver correctly:

  • Filters components by 'Tm' prefix
  • Transforms PascalCase to kebab-case with 'tm-' prefix
  • Constructs proper import paths for Vue components

The transformation logic handles the naming convention properly.


59-88: LGTM: Robust plugin factory

The plugin factory function is well-designed:

  • Conditionally adds plugins based on existing detection
  • Avoids duplicate imports when packages are already available
  • Proper plugin configuration with appropriate options

The conditional importer pattern is particularly good for avoiding redundant imports.


138-147: LGTM: Smart plugin insertion strategy

The plugin insertion logic is well-thought-out:

  • Prioritizes insertion after autoImport plugin
  • Falls back to uni plugin position if autoImport not found
  • Uses proper array manipulation to maintain plugin order

This ensures plugins are loaded in the correct sequence.


149-170: LGTM: Clear main logic flow

The main logic properly handles both scenarios:

  • When Components plugin exists: merges TMUI resolver and adds vueJsx
  • When no Components plugin exists: adds all new plugins

The conditional logic is clear and the return values are consistent.

@exuan exuan force-pushed the feat-add-ui-tmui32 branch from 3c40b56 to d1aff12 Compare July 18, 2025 08:44
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
packages/core/template/UI/tmui/vite.config.js.data.mjs (2)

91-136: Simplify the complex Components plugin merging logic.

This function is quite complex and handles string manipulation of plugin configurations. Consider extracting helper functions or using AST parsing for more robust configuration merging.

The current approach of regex-based configuration parsing could be fragile. Consider:

  1. Extracting configuration parsing into separate helper functions
  2. Using more robust parsing methods
  3. Adding error handling for malformed configurations

This would improve maintainability and reduce the risk of parsing errors.


1-170: Consider breaking down the large function.

While the logic is correct, this function is quite large and handles multiple responsibilities. Consider breaking it down into smaller, focused functions for better maintainability.

The function could be split into:

  • detectExistingPackages()
  • createBaseConfig()
  • createPluginFactory()
  • mergeComponentsPlugin()
  • insertPlugins()

This would improve readability and testability while maintaining the same functionality.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c40b56 and d1aff12.

📒 Files selected for processing (11)
  • README.md (1 hunks)
  • packages/core/src/question/ui/ui.data.ts (1 hunks)
  • packages/core/template/UI/tmui/index.html (1 hunks)
  • packages/core/template/UI/tmui/jsconfig.json.data.mjs (1 hunks)
  • packages/core/template/UI/tmui/package.json (1 hunks)
  • packages/core/template/UI/tmui/postcss.config.js (1 hunks)
  • packages/core/template/UI/tmui/src/App.vue (1 hunks)
  • packages/core/template/UI/tmui/src/androidPrivacy.json (1 hunks)
  • packages/core/template/UI/tmui/src/main.js.data.mjs (1 hunks)
  • packages/core/template/UI/tmui/src/pages/index.vue (1 hunks)
  • packages/core/template/UI/tmui/vite.config.js.data.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
  • packages/core/template/UI/tmui/src/androidPrivacy.json
  • README.md
  • packages/core/template/UI/tmui/postcss.config.js
  • packages/core/template/UI/tmui/src/pages/index.vue
  • packages/core/template/UI/tmui/index.html
  • packages/core/template/UI/tmui/src/App.vue
  • packages/core/template/UI/tmui/package.json
  • packages/core/src/question/ui/ui.data.ts
  • packages/core/template/UI/tmui/jsconfig.json.data.mjs
🧰 Additional context used
🧬 Code Graph Analysis (2)
packages/core/template/UI/tmui/vite.config.js.data.mjs (3)
packages/core/template/UI/tmui/jsconfig.json.data.mjs (1)
  • getData (1-12)
packages/core/template/UI/tmui/src/main.js.data.mjs (1)
  • getData (1-29)
scripts/dev.cjs (1)
  • path (3-3)
packages/core/template/UI/tmui/src/main.js.data.mjs (2)
packages/core/template/UI/tmui/jsconfig.json.data.mjs (1)
  • getData (1-12)
packages/core/template/UI/tmui/vite.config.js.data.mjs (1)
  • getData (1-170)
🪛 Biome (1.9.4)
packages/core/template/UI/tmui/src/main.js.data.mjs

[error] 7-7: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (--ts, -e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p ...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: test (-e, -p import -p pages -p layouts -p manifest -p filePlatform -p platformModifier -p middle...
  • GitHub Check: stable - i686-pc-windows-msvc - node@20
  • GitHub Check: stable - aarch64-pc-windows-msvc - node@20
  • GitHub Check: stable - aarch64-apple-darwin - node@20
  • GitHub Check: stable - x86_64-pc-windows-msvc - node@20
🔇 Additional comments (5)
packages/core/template/UI/tmui/src/main.js.data.mjs (1)

14-26: Conditional Import Patterns Verified

No other UI templates were found under packages/core/template/UI for comparison. In packages/core/template/UI/tmui/src/main.js.data.mjs, the conditional checks for existing Pinia and TMUI entries and then pushes the corresponding importer and use calls. This aligns with the expected structure and requires no changes.

packages/core/template/UI/tmui/vite.config.js.data.mjs (4)

3-9: Robust package detection implementation.

The package detection logic using regex and Set for deduplication is well-implemented. The regex pattern /@[\w-]+\/[\w-]+/g correctly matches scoped npm packages.


139-147: Correct plugin insertion logic.

The plugin insertion logic properly handles different scenarios for where to insert new plugins. The fallback to uniIndex when autoImportIndex is not found is appropriate.


149-170: Well-structured main logic flow.

The main logic correctly handles two scenarios: when Components plugin exists (merge mode) and when it doesn't exist (full creation mode). The conditional logic is clear and appropriate.


17-21: Validate TMUI resolver against actual tmui-uni file layout

Please confirm that the PascalCase→kebab-case conversion with a tm- prefix in your Vite resolver matches how tmui-uni actually lays out its components. In particular, review:

• File: packages/core/template/UI/tmui/vite.config.js.data.mjs
Lines 17–21

const tmuiResolver = `(name) => {
  if (!name.startsWith('Tm')) return
  const comp = name
    .slice(2)
    .replace(/([A-Z])/g, '-$1')
    .toLowerCase()
    .replace(/^-/, 'tm-')
  return { name, from: \`tmui-uni/components/${comp}/${comp}.vue\` }
}`

• Verify that each component in the published tmui-uni package lives under
components/<computed-kebab-name>/<computed-kebab-name>.vue.
• Watch for any deviations (nested subfolders, custom prefixes, catch-all components).
• If the real directory or file names differ, adjust the slice/replace logic or import path accordingly.

Comment on lines +6 to +8
const hasPiniaImport = oldData.entries.some(entry =>
entry.importer && entry.importer.includes('pinia'),
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Apply optional chaining to improve code safety.

The static analysis tool correctly identifies that optional chaining should be used here to prevent potential runtime errors if entry.importer is undefined.

Apply this fix:

-  const hasPiniaImport = oldData.entries.some(entry =>
-    entry.importer && entry.importer.includes('pinia'),
-  )
+  const hasPiniaImport = oldData.entries.some(entry =>
+    entry.importer?.includes('pinia'),
+  )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const hasPiniaImport = oldData.entries.some(entry =>
entry.importer && entry.importer.includes('pinia'),
)
const hasPiniaImport = oldData.entries.some(entry =>
entry.importer?.includes('pinia'),
)
🧰 Tools
🪛 Biome (1.9.4)

[error] 7-7: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/src/main.js.data.mjs around lines 6 to 8, the
code accesses entry.importer without checking if entry is defined, which can
cause runtime errors. Update the condition to use optional chaining by replacing
entry.importer with entry.importer?. This will safely handle cases where
importer might be undefined and prevent errors.

Comment on lines +10 to +12
const hasTmuiImport = oldData.entries.some(entry =>
entry.importer && (entry.importer.includes('tmui') || entry.importer.includes('tm-ui')),
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Apply optional chaining for consistency.

For consistency with the fix above, apply optional chaining here as well.

-  const hasTmuiImport = oldData.entries.some(entry =>
-    entry.importer && (entry.importer.includes('tmui') || entry.importer.includes('tm-ui')),
-  )
+  const hasTmuiImport = oldData.entries.some(entry =>
+    entry.importer?.includes('tmui') || entry.importer?.includes('tm-ui'),
+  )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const hasTmuiImport = oldData.entries.some(entry =>
entry.importer && (entry.importer.includes('tmui') || entry.importer.includes('tm-ui')),
)
const hasTmuiImport = oldData.entries.some(entry =>
entry.importer?.includes('tmui') || entry.importer?.includes('tm-ui'),
)
🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/src/main.js.data.mjs around lines 10 to 12,
the code checks entry.importer without optional chaining, which can cause errors
if importer is undefined. Update the condition to use optional chaining on
entry.importer before calling includes, ensuring consistent and safe property
access.

Comment on lines +48 to +54
proxy: {
'/pag': {
target: 'https://cdn.tmui.design',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '/api'),
},
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Review the proxy configuration for security.

The proxy configuration redirects /pag to https://cdn.tmui.design. However, there's a potential issue with the rewrite rule.

The rewrite rule on line 52 replaces /api with /api, which is redundant. If the intent is to proxy /pag requests, the rewrite should be:

-        rewrite: path => path.replace(/^\/api/, '/api'),
+        rewrite: path => path.replace(/^\/pag/, ''),

Or if no rewrite is needed:

-        rewrite: path => path.replace(/^\/api/, '/api'),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
proxy: {
'/pag': {
target: 'https://cdn.tmui.design',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '/api'),
},
},
proxy: {
'/pag': {
target: 'https://cdn.tmui.design',
changeOrigin: true,
rewrite: path => path.replace(/^\/pag/, ''),
},
},
🤖 Prompt for AI Agents
In packages/core/template/UI/tmui/vite.config.js.data.mjs around lines 48 to 54,
the proxy rewrite rule for '/pag' is redundant as it replaces '/api' with
'/api'. To fix this, either update the rewrite function to correctly transform
the '/pag' path as intended or remove the rewrite rule entirely if no path
modification is needed for the proxy target.

@FliPPeDround
Copy link
Member

欢迎你继续修改,但现阶段pr这样的实现会影响其他模块的引入,无法合并,先关闭了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants