Repository Analysis

NervJS/taro

开放式跨端跨框架解决方案,支持使用 React/Vue 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/

1.5 Likely human-written View on GitHub
1.5
Adjusted Score
1.5
Raw Score
100%
Time Factor
2026-05-28
Last Push
37,503
Stars
TypeScript
Language
386,575
Lines of Code
4405
Files
423
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 20HIGH 0MEDIUM 2LOW 401

Pattern Findings

423 matches across 7 categories. Click a row to expand file-level details.

Over-Commented Block230 hits · 226 pts
SeverityFileLineSnippet
LOWcrates/taro_init/README.md1# Taro init
LOWcrates/swc_plugin_define_config/src/lib.rs141/// if plugin need to handle low-level ptr directly via
LOWcrates/swc_plugin_compile_mode/src/lib.rs61/// `plugin_transform` macro interop pointers into deserialized structs, as well
LOWtests/__tests__/bundled/globby/index.js4201 // fatal for JavaScript regular expression, so eliminate it.
LOWtests/__tests__/bundled/globby/index.js4261 // > There are 12 characters with special meanings:
LOWtests/__tests__/bundled/globby/index.js4301
LOWtests/__tests__/bundled/globby/index.js4321 function startingReplacer () {
LOWtests/__tests__/bundled/globby/index.js4361
LOWtests/__tests__/bundled/globby/index.js4421 // Invalid range notaton
LOWtests/__tests__/bundled/globby/index.js4641
LOWexamples/custom-tabbar-vue3/config/prod.js21 // /**
LOWexamples/blended-taro-component-vue3/h5/config/prod.js21 // /**
LOW…lended-taro-component-vue3/taro-project/config/prod.js21 // /**
LOWexamples/mini-program-example/config/prod.js21 // /**
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx21export default class Index extends React.Component {
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx261// Taro.stopBluetoothDevicesDiscovery({
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx281// let services: Array<string> = []
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx301// },
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx321// },
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx341// id: 'offBluetoothDeviceFound',
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx361// if (deviceUuid == '') {
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx381// })
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx401// },
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx421// },
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx441// ],
LOW…xample/src/pages/api/device/bluetoothGeneral/index.tsx461// </View>
LOWexamples/input-readonly-taro4/config/prod.ts1import type { UserConfigExport } from "@tarojs/cli"
LOWexamples/input-readonly-taro4/config/prod.ts21 // const path = require('path')
LOWexamples/taro-list/config/prod.ts1import type { UserConfigExport } from "@tarojs/cli";
LOWexamples/taro-list/config/prod.ts21 // const path = require('path')
LOWexamples/swiper-effect/config/prod.ts1import type { UserConfigExport } from "@tarojs/cli";
LOWexamples/swiper-effect/config/prod.ts21 // const Prerender = require('prerender-spa-plugin')
LOW…s/external-prebundle/config/webpackDevServer.config.js21 // websites from potentially accessing local content through DNS rebinding:
LOW…s/external-prebundle/config/webpackDevServer.config.js41 'Access-Control-Allow-Methods': '*',
LOWexamples/external-prebundle/config/webpack.config.js541 },
LOWexamples/external-prebundle/config/webpack.config.js601 // It will be an empty string unless you specify "homepage"
LOWexamples/external-prebundle/config/env.js41});
LOWexamples/external-prebundle/src/setupTests.js1// jest-dom adds custom jest matchers for asserting on DOM nodes.
LOWpackages/taro-runtime/src/dom/node.ts201 }
LOWpackages/taro-runtime/src/dom/style_properties.ts61 // 'dominantBaseline',
LOWpackages/taro-runtime/src/dom/style_properties.ts201// combine('initialLetters', ['Align', 'Wrap'])
LOWpackages/taro-vite-runner/src/harmony/asset.ts261
LOWpackages/taro-vite-runner/src/harmony/style.ts301 let viteConfig: ResolvedConfig
LOWpackages/taro-vite-runner/src/harmony/style.ts421 // resolve asset URL placeholders to their built file URLs
LOWpackages/taro-vite-runner/src/harmony/style.ts441 // 'asset',
LOWpackages/taro-vite-runner/src/harmony/style.ts461 // () => `${relativePathToPublicFromCSS}/${publicUrl}`,
LOWpackages/taro-vite-runner/src/harmony/style.ts481 // : chunk.name
LOWpackages/taro-rn/__tests__/geolocation.test.ts1import * as Taro from '../src/lib/getLocation'
LOWpackages/taro-rn/__tests__/geolocation.test.ts21 // expect.assertions(6)
LOWpackages/taro-rn/__tests__/network.test.ts21 expect(fail.mock.calls.length).toBe(0)
LOWpackages/taro-rn/__tests__/network.test.ts41 // console.log("Connection type", state.type)
LOWpackages/taro-cli-convertor/src/index.ts461 }
LOWpackages/taro-cli-convertor/src/index.ts481 // })
LOWpackages/taro-cli-convertor/src/util/index.ts401 copyFileToTaro(matchUnconvertDir, outputFilePath)
LOWpackages/taro-plugin-http/src/index.ts41 // // taro webpack4 中, 未正确识别到 axios package.json 中的 browser 字段, 以致于打包进入了 node 相关的代码(https://github.com/axios/axi
LOWpackages/taro-plugin-http/src/runtime/XMLHttpRequest.ts101 }
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js2921 if (!document.queryCommandEnabled("copy") && sel.isCollapsed) {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js7641// Would show a preview of...
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js9221
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js12341 // earlier than the other. We assume that the sample is longer or the same
170 more matches not shown…
Hallucination Indicators20 hits · 200 pts
SeverityFileLineSnippet
CRITICAL…es/babel-plugin-transform-solid-jsx/src/ssr/element.js193 existingAttribute.node.value.expression.properties.push(...properties)
CRITICAL…es/babel-plugin-transform-solid-jsx/src/dom/element.js274 !a.node.value.expression.properties.some((p) => t.isSpreadElement(p))
CRITICAL…es/babel-plugin-transform-solid-jsx/src/dom/element.js279 styleAttribute.node.value.expression.properties.slice().forEach((p, index) => {
CRITICAL…es/babel-plugin-transform-solid-jsx/src/dom/element.js295 styleAttribute.node.value.expression.properties.splice(index - i - 1, 1)
CRITICAL…es/babel-plugin-transform-solid-jsx/src/dom/element.js311 !a.node.value.expression.properties.some(
CRITICALpackages/taro-transformer-wx/src/class.ts190 const _constructor = this.classPath.node.body.body.find((item) => {
CRITICALpackages/taro-transformer-wx/src/class.ts226 this.classPath.node.body.body.push($$componentPath)
CRITICALpackages/taro-transformer-wx/src/class.ts1077 this.classPath.node.body.body = this.classPath.node.body.body.concat(method)
CRITICALpackages/taro-transformer-wx/src/class.ts1101 this.classPath.node.body.body.push(
CRITICALpackages/taro-transformer-wx/src/class.ts1252 this.classPath.node.body.body = this.classPath.node.body.body.filter((m) => {
CRITICALpackages/taro-transformer-wx/src/utils.ts293 p.node.left.property.name.startsWith(''))
CRITICALpackages/taro-transformer-wx/src/render.ts638 this.renderPath.node.body.body.unshift(
CRITICALpackages/taro-transformer-wx/src/render.ts1458 this.renderPath.node.body.body.unshift(dcl)
CRITICALpackages/taro-transformer-wx/src/render.ts2296 this.renderPath.node.body.body.unshift(scopeDecl)
CRITICALpackages/taro-transformer-wx/src/render.ts2310 this.renderPath.node.body.body.push(decl)
CRITICALpackages/taro-transformer-wx/src/render.ts2542 this.renderPath.node.body.body.unshift(...Array.from(this.genCompidExprs))
CRITICALpackages/taro-transformer-wx/src/render.ts2545 this.renderPath.node.body.body.push(
CRITICALpackages/taro-transformer-wx/src/render.ts2557 this.renderPath.node.body.body = this.renderPath.node.body.body.concat(
CRITICALpackages/taro-transformer-wx/src/render.ts2569 this.renderPath.node.body.body.push(
CRITICALpackages/taro-transformer-wx/src/render.ts2632 this.renderPath.node.body.body.unshift(
Hyper-Verbose Identifiers166 hits · 150 pts
SeverityFileLineSnippet
LOWtests/__tests__/bundled/globby/index.js842function replacePathSegmentSeparator(filepath, separator) {
LOWtests/__tests__/bundled/globby/index.js2234function getNegativePatternsAsPositive(patterns, ignore) {
LOWtests/__tests__/bundled/globby/index.js2240function groupPatternsByBaseDirectory(patterns) {
LOWtests/__tests__/bundled/globby/index.js2254function convertPatternGroupsToTasks(positive, negative, dynamic) {
LOWtests/__tests__/bundled/globby/index.js2260function convertPatternGroupToTask(base, positive, negative, dynamic) {
LOWtests/__tests__/bundled/globby/index.js3234function convertWindowsPathToPattern(filepath) {
LOWtests/__tests__/bundled/globby/index.js3240function convertPosixPathToPattern(filepath) {
LOWtests/__tests__/bundled/globby/index.js3348function getPatternsInsideCurrentDirectory(patterns) {
LOWtests/__tests__/bundled/globby/index.js3359function getPatternsOutsideCurrentDirectory(patterns) {
LOWtests/__tests__/bundled/globby/index.js3363function isPatternRelatedToParentDirectory(pattern) {
LOWtests/__tests__/bundled/globby/index.js3379function isAffectDepthOfReadingPattern(pattern) {
LOWtests/__tests__/bundled/globby/index.js3384function expandPatternsWithBraceExpansion(patterns) {
LOWtests/__tests__/bundled/globby/index.js3443function partitionAbsoluteAndRelative(patterns) {
LOWtests/__tests__/bundled/globby/index.js3486function propagateCloseEventToSources(streams) {
LOW…bel-plugin-transform-solid-jsx/src/shared/component.js15function convertComponentIdentifier(node) {
LOW…bel-plugin-transform-solid-jsx/src/shared/component.js217function transformComponentChildren(children, config) {
LOW…abel-plugin-transform-solid-jsx/src/shared/fragment.js7export default function transformFragmentChildren(children, results, config) {
LOW…es/babel-plugin-transform-solid-jsx/src/dom/element.js222function detectResolvableEventHandler(attribute, handler) {
LOWpackages/taro-framework-vue3/src/webpack.harmony.ts9export function modifyHarmonyWebpackChain (ctx: IPluginContext, chain, data, config: IConfig) {
LOWpackages/taro-framework-vue3/src/utils.ts98export function getHarmonyVueLoaderOptions (ctx: IPluginContext, componentConfig, config: IConfig) {
LOW…ages/taro-framework-vue3/src/runtime/connect-native.ts152export function createNativeComponentConfig (component, h: typeof createElement, componentConfig) {
LOWpackages/taro-runtime/src/dom-external/element.ts6export function getBoundingClientRectImpl (this: TaroElement): Promise<null> {
LOWpackages/taro-runtime/src/polyfill/array.ts30export function handleArrayIncludesPolyfill () {
LOW…ges/taro-runtime/src/polyfill/intersection-observer.ts6export function handleIntersectionObserverPolyfill () {
LOW…ges/taro-runtime/src/polyfill/intersection-observer.ts28function handleIntersectionObserverObjectPolyfill () {
LOW…ges/taro-runtime/src/polyfill/intersection-observer.ts45 function IntersectionObserverEntry (entry: IntersectionObserverEntryInit) {
LOWpackages/taro-runtime/src/polyfill/object.ts3export function handleObjectAssignPolyfill () {
LOWpackages/taro-runtime/src/polyfill/object.ts30export function handleObjectEntriesPolyfill () {
LOWpackages/taro-runtime/src/polyfill/object.ts53export function handleObjectDefinePropertyPolyfill () {
LOWpackages/taro-runtime/src/dsl/common.ts367export function createRecursiveComponentConfig (componentName?: string) {
LOW…ckages/taro-vite-runner/src/harmony/postcss/compile.ts341function combineSourcemapsIfExists(
LOWpackages/taro-vite-runner/src/harmony/postcss/build.ts57export function createToImportMetaURLBasedRelativeRuntime(
LOWpackages/taro-vite-runner/src/harmony/postcss/build.ts70function toOutputFilePathWithoutRuntime(
LOWpackages/taro-vite-runner/src/utils/createFilter.ts79export function createFilterWithCompileOptions(compile: {
LOWpackages/taro-vite-runner/src/utils/index.ts78export function appendVirtualModulePrefix (id: string): string {
LOW…ner/src/common/babel-plugin-import-native-component.ts12 return function pluginImportNativeComponent (babel: typeof BabelCore): BabelCore.PluginObj<BabelCore.PluginPass> {
LOWpackages/taro-components-advanced/src/utils/helper.ts5export function getOffsetForIndexAndAlignment ({
LOWpackages/taro-rn/src/lib/deviceMotion.ts34function startDeviceMotionListening (object: Taro.startDeviceMotionListening.Option = {}): Promise<TaroGeneral.CallbackR
LOWpackages/taro-rn/src/lib/deviceMotion.ts60function stopDeviceMotionListening (object: Taro.stopDeviceMotionListening.Option = {}): Promise<TaroGeneral.CallbackRes
LOWpackages/taro-rn/src/lib/request/index.ts11function generateRequestUrlWithParams(url, params) {
LOW…ugin-transform-react-jsx-to-rn-stylesheet/src/index.ts174 function getArrayExpressionFromObjectProperty (value) {
LOWpackages/taro-cli-convertor/__tests__/util.ts5export function generateMinimalEscapeCode (ast: t.File) {
LOWpackages/taro-cli-convertor/src/util/index.ts560export function replacePluginComponentUrl (pluginComponentPath, pluginInfo) {
LOWpackages/taro-cli-convertor/src/util/astConvert.ts6export function generateMinimalEscapeCode (ast: t.File) {
LOWpackages/taro-framework-solid/src/webpack.harmony.ts6export function modifyHarmonyWebpackChain (chain) {
LOWpackages/taro-runner-utils/src/vite.ts14export async function getViteHarmonyCompilerContext (rollupPluginContext: PluginContext): Promise<ViteHarmonyCompilerCon
LOWpackages/taro-runner-utils/src/vite.ts22export function getViteMiniCompilerContext (rollupPluginContext: PluginContext): ViteMiniCompilerContext | void {
LOWpackages/taro-router/types/component.d.ts7 export function defineCustomElementTaroTabbar() {}
LOWpackages/taro-helper/src/utils.ts303export function getNpmPackageAbsolutePath (npmPath: string, defaultFile = 'index'): string | null {
LOWpackages/taro-helper/src/utils.ts416export function getInstalledNpmPkgVersion(pkgName: string, basedir: string): string | null {
LOWpackages/taro-plugin-http/src/runtime/XMLHttpRequest.ts62function createXMLHttpRequestEvent (event: string, target:XMLHttpRequest, loaded: number): XMLHttpRequestEvent {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js12393function describeClassComponentFrame(ctor, source, ownerFn, currentDispatcherRef) {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js12396function describeFunctionComponentFrame(fn, source, ownerFn, currentDispatcherRef) {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js12405function describeUnknownElementTypeFrameInDEV(type, source, ownerFn, currentDispatcherRef) {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js27(function webpackUniversalModuleDefinition(root, factory) {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js4080 function installNextTickImplementation() {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js4105 function installPostMessageImplementation() {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js4128 function installMessageChannelImplementation() {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js4141 function installReadyStateChangeImplementation() {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js4160 function installSetTimeoutImplementation() {
106 more matches not shown…
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMexamples/external-prebundle/config/webpack.config.js751 // Turn off performance processing because we utilize
MEDIUMpackages/eslint-config-taro/index.js33 // TypeScript's `noFallthroughCasesInSwitch` option is more robust (#6906)
Fake / Example Data2 hits · 3 pts
SeverityFileLineSnippet
LOWpackages/taro-components/types/ShareElement.d.ts164 * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nisl enim, sodales non augue efficitur
LOWpackages/taro-components/types/ShareElement.d.ts164 * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nisl enim, sodales non augue efficitur
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippet
LOW…components-library-vue3/src/vue-component-lib/utils.ts22 * we need to check if the key exists for Vue <3.1.0
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippet
LOWpackages/taro-cli-convertor/__tests__/convertor.test.ts258 function getData(url) {
LOW…ckages/taro-plugin-react-devtools/src/backend/index.js14100function getData(internalInstance) {