Commit b891c63b by Jaxon

feat: 添加 WXML 格式化支持及相关配置

refactor: 重构 ESLint 配置以支持 WXML 文件检查

style: 格式化现有 WXML 文件代码

chore: 添加 prettier-plugin-wxml 及相关依赖

docs: 更新文档和注释说明

test: 添加 WXML 相关测试用例

build: 更新构建配置以支持 WXML 处理
1 parent 633192f7
Showing 43 changed files with 479 additions and 102 deletions
*.log
node_modules/
dist/
build/
miniprogram_npm
uni_modules
# 只格式化 wxml
!*.wxml
export { default } from "@venus/prettier-config";
{
"mcpServers": {
"figma": {
"httpUrl": "https://mcp.figma.com/mcp"
}
},
"$version": 2
}
\ No newline at end of file \ No newline at end of file
...@@ -64,6 +64,9 @@ ...@@ -64,6 +64,9 @@
"[vue]": { "[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint" "editor.defaultFormatter": "dbaeumer.vscode-eslint"
}, },
"[wxml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// extensions // extensions
"extensions.ignoreRecommendations": true, "extensions.ignoreRecommendations": true,
...@@ -188,6 +191,8 @@ ...@@ -188,6 +191,8 @@
"wxml" "wxml"
], ],
"eslint.format.enable": true,
"tailwindCSS.experimental.classRegex": [["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]], "tailwindCSS.experimental.classRegex": [["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]],
"github.copilot.enable": { "github.copilot.enable": {
...@@ -240,5 +245,5 @@ ...@@ -240,5 +245,5 @@
"nolebase", "nolebase",
"rollup", "rollup",
"vitest" "vitest"
] ],
} }
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// <wxs src="../../utils/tools.wxs" module="tools" /> // <wxs src="../../utils/tools.wxs" module="tools" />
// tools.tofix2(12.33333) // tools.tofix2(12.33333)
module.exports = { module.exports = {
msg: 'wxs-tools', msg: "wxs-tools",
tofix2: function(num) { tofix2: function (num) {
return num.toFixed(2) return num.toFixed(2);
} },
}; };
...@@ -5,12 +5,25 @@ ...@@ -5,12 +5,25 @@
<image src="/images/icon/close.svg" bindtap="close"></image> <image src="/images/icon/close.svg" bindtap="close"></image>
</view> </view>
<view class="tabs"> <view class="tabs">
<view wx:if="{{index <= tabIndex}}" wx:for="{{tabs}}" wx:key="*this" class="tab {{tabIndex === index?'active':''}}" data-index="{{index}}" bindtap="tabClick">{{ item }}</view> <view wx:if="{{index <= tabIndex}}"
wx:for="{{tabs}}"
wx:key="*this"
class="tab {{tabIndex === index?'active':''}}"
data-index="{{index}}"
bindtap="tabClick">
{{ item }}
</view>
</view> </view>
<view class="data"> <view class="data">
<scroll-view scroll-y scroll-with-animation> <scroll-view scroll-y scroll-with-animation>
<view class="inner-box"> <view class="inner-box">
<view class="{{item.active?'active':''}}" wx:for="{{redionData}}" wx:key="id" data-index="{{index}}" bindtap="_click">{{ item.name }}</view> <view class="{{item.active?'active':''}}"
wx:for="{{redionData}}"
wx:key="id"
data-index="{{index}}"
bindtap="_click">
{{ item.name }}
</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
......
<view class="container"> <view class="container">
<!-- <button wx:if="{{!addressData}}" type="primary" class="save-btn" bindtap="readFromWx"> <form bind:submit="bindSave" report-submit>
读取微信地址
</button> -->
<form bindsubmit="bindSave" report-submit="true">
<view class="form-box"> <view class="form-box">
<view class="row-wrap"> <view class="row-wrap">
<view class="label">联系人</view> <view class="label">联系人</view>
<view class="label-right"> <view class="label-right">
<input name="linkMan" class="input" type="text" placeholder="姓名" value="{{addressData.linkMan}}{{wxaddress.userName}}" /> <input
name="linkMan"
class="input"
type="text"
placeholder="姓名"
value="{{addressData.linkMan}}{{wxaddress.userName}}"
/>
</view> </view>
</view> </view>
<view />
<view class="row-wrap"> <view class="row-wrap">
<view class="label">手机号码</view> <view class="label">手机号码</view>
<view class="label-right"> <view class="label-right">
<input name="mobile" class="input" maxlength="11" type="number" placeholder="11位手机号码" value="{{addressData.mobile}}{{wxaddress.telNumber}}" /> <input name="mobile"
class="input"
maxlength="11"
type="number"
placeholder="11位手机号码"
value="{{addressData.mobile}}{{wxaddress.telNumber}}"
/>
</view> </view>
</view> </view>
<view class="row-wrap"> <view class="row-wrap">
<view class="label">选择地区</view> <view class="label">选择地区</view>
<view class="showRegionSelect" bindtap="showRegionSelect">{{showRegionStr}}</view> <view class="showRegionSelect" bind:tap="showRegionSelect"
>{{showRegionStr}}</view
>
</view> </view>
<view class="addr-details"> <view class="addr-details">
<view class="label">详细地址</view> <view class="label">详细地址</view>
<view class="label-right"> <view class="label-right">
<textarea name="address" auto-height placeholder="街道门牌信息" value="{{addressData.address}}{{wxaddress.detailInfo}}" /> <textarea
name="address"
auto-height
placeholder="街道门牌信息"
value="{{addressData.address}}{{wxaddress.detailInfo}}"
/>
</view> </view>
</view> </view>
</view> </view>
<button type="warn" class="save-btn" formType="submit">保存</button> <button type="warn" class="save-btn" formType="submit">保存</button>
<button type="default" class="save-btn" bindtap="deleteAddress" data-id="{{addressData.id}}" wx:if="{{addressData}}"> <button type="default" class="save-btn"
bind:tap="deleteAddress"
data-id="{{addressData.id}}"
wx:if="{{addressData}}">
删除该地址 删除该地址
</button> </button>
</form> </form>
</view> </view>
<float-menu /> <float-menu />
<region-picker wx:if="{{ showRegionSelect }}" bind:closeAddress="closeAddress" bind:selectAddress="selectAddress" />
\ No newline at end of file \ No newline at end of file
<region-picker
wx:if="{{ showRegionSelect }}"
bind:closeAddress="closeAddress"
bind:selectAddress="selectAddress"
/>
...@@ -35,11 +35,21 @@ ...@@ -35,11 +35,21 @@
<view class="goods_price_wrap"> <view class="goods_price_wrap">
<view class="goods_price">¥{{item.basicInfo.minPrice}}</view> <view class="goods_price">¥{{item.basicInfo.minPrice}}</view>
<view class="cart_num_tool"> <view class="cart_num_tool">
<view bindtap="handleItemNumEdit" data-id="{{item.basicInfo.id}}" data-operation="{{-1}}" class="num_edit"> <view
bindtap="handleItemNumEdit"
data-id="{{item.basicInfo.id}}"
data-operation="{{-1}}"
class="num_edit"
>
- -
</view> </view>
<view class="goods_num">{{item.num}}</view> <view class="goods_num">{{item.num}}</view>
<view bindtap="handleItemNumEdit" data-id="{{item.basicInfo.id}}" data-operation="{{1}}" class="num_edit"> <view
bindtap="handleItemNumEdit"
data-id="{{item.basicInfo.id}}"
data-operation="{{1}}"
class="num_edit"
>
+ +
</view> </view>
</view> </view>
......
// pages/collect/index.js // pages/collect/index.js
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
......
<!-- pages/collect/index.wxml --> <!-- pages/collect/index.wxml -->
<Tabs tabs="{{tabs}}" bindtabsItemChange="handleTabsItemChange"> <Tabs tabs="{{tabs}}" bind:tabsItemChange="handleTabsItemChange">
<view class="collect_main"> <view class="collect_main">
<view class="collect_title"> <view class="collect_title">
<text class="collect_tips active">全部</text> <text class="collect_tips active">
<text class="collect_tips">正在热卖</text> 全部
<text class="collect_tips">即将上线</text> </text>
<text class="collect_tips">
正在热卖
</text>
<text class="collect_tips">
即将上线
</text>
</view> </view>
<view class="collect_content"> <view class="collect_content">
<navigator class="goods_item" wx:for="{{collect}}" wx:key="goods_id" url="/pages/goods_detail/index?id={{item.basicInfo.id}}"> <navigator class="goods_item"
wx:for="{{collect}}"
wx:key="goods_id"
url="/pages/goods_detail/index?id={{item.basicInfo.id}}">
<!-- 左侧 图片容器 --> <!-- 左侧 图片容器 -->
<view class="goods_img_wrap"> <view class="goods_img_wrap">
<image mode="widthFix" src="{{item.basicInfo.pic?item.basicInfo.pic:'https://ww1.sinaimg.cn/large/007rAy9hgy1g24by9t530j30i20i2glm.jpg'}}"></image> <image mode="widthFix"
src="{{item.basicInfo.pic?item.basicInfo.pic:'https://ww1.sinaimg.cn/large/007rAy9hgy1g24by9t530j30i20i2glm.jpg'}}" />
</view> </view>
<!-- 右侧 商品容器 --> <!-- 右侧 商品容器 -->
<view class="goods_info_wrap"> <view class="goods_info_wrap">
<view class="goods_name">{{item.basicInfo.name}}</view> <view class="goods_name">
<view class="goods_price">¥{{item.basicInfo.minPrice}}</view> {{item.basicInfo.name}}
</view>
<view class="goods_price">
¥{{item.basicInfo.minPrice}}
</view>
</view> </view>
</navigator> </navigator>
</view> </view>
......
<!-- pages/feedback/index.wxml -->
<Tabs tabs="{{tabs}}" bindtabsItemChange="handleTabsItemChange"> <Tabs tabs="{{tabs}}" bindtabsItemChange="handleTabsItemChange">
<view class="fb_main"> <view class="fb_main">
<view class="fb_title">问题的种类</view> <view class="fb_title">问题的种类</view>
...@@ -11,8 +10,16 @@ ...@@ -11,8 +10,16 @@
<view class="fb_content"> <view class="fb_content">
<textarea value="{{textVal}}" bindinput="handleTextInput" placeholder="请描述一下您的问题"></textarea> <textarea value="{{textVal}}" bindinput="handleTextInput" placeholder="请描述一下您的问题"></textarea>
<view class="fb_tool"> <view class="fb_tool">
<button bindtap="handleChooseImg">+</button> <button bindtap="handleChooseImg">
<view class="up_img_item" wx:for="{{chooseImgs}}" wx:key="*this" bindtap="handleRemoveImg" data-index="{{index}}"> +
</button>
<view
class="up_img_item"
wx:for="{{chooseImgs}}"
wx:key="*this"
bindtap="handleRemoveImg"
data-index="{{index}}"
>
<UpImg src="{{item}}"></UpImg> <UpImg src="{{item}}"></UpImg>
</view> </view>
</view> </view>
......
<!-- pages/goods_detail/index.wxml --> <!-- pages/goods_detail/index.wxml -->
<import src="../../wxParse/wxParse.wxml" /> <import src="../../wxParse/wxParse.wxml" />
<view class="detail_swiper"> <view class="detail_swiper">
<swiper indicator-dots="{{true}}" autoplay="{{true}}" circular="{{true}}"> <swiper indicator-dots="{{true}}"
<swiper-item wx:for="{{goodsObj.pics}}" wx:key="id" bindtap="handlePrevewImage" data-url="{{item.pic}}"> autoplay="{{true}}"
<image src="{{item.pic}}" mode="widthFix"></image> circular="{{true}}">
<swiper-item wx:for="{{goodsObj.pics}}"
wx:key="id"
bindtap="handlePrevewImage"
data-url="{{item.pic}}">
<image src="{{item.pic}}" mode="widthFix">
</image>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view class="goods_price">¥{{goodsObj.goods_price}}</view> <view class="goods_price">
¥{{goodsObj.goods_price}}
</view>
<view class="goods_name_row"> <view class="goods_name_row">
<view class="goods_name">{{goodsObj.goods_name}}</view> <view class="goods_name">
{{goodsObj.goods_name}}
</view>
<view class="goods_collect" bindtap="handleCollect"> <view class="goods_collect" bindtap="handleCollect">
<text class="iconfont {{isCollect?'icon-shoucang1':'icon-shoucang'}}"></text> <text class="iconfont {{isCollect?'icon-shoucang1':'icon-shoucang'}}">
<view class="collect_text">收藏</view> </text>
<view class="collect_text">
收藏
</view>
</view> </view>
</view> </view>
<view class="goods_info"> <view class="goods_info">
<view class="goods_info_title">图文详情</view> <view class="goods_info_title">
图文详情
</view>
<view class="goods_info_content"> <view class="goods_info_content">
<!-- 富文本 --> <!-- 富文本 -->
<!-- {{goodsObj.goods_introduce}} --> <!-- {{goodsObj.goods_introduce}} -->
...@@ -26,19 +41,30 @@ ...@@ -26,19 +41,30 @@
</view> </view>
<view class="btm_tool"> <view class="btm_tool">
<view class="tool_item"> <view class="tool_item">
<view class="iconfont icon-kefu1"></view> <view class="iconfont icon-kefu1">
</view>
<view>客服</view> <view>客服</view>
<button open-type="contact"></button> <button open-type="contact">
</button>
</view> </view>
<view class="tool_item"> <view class="tool_item">
<view class="iconfont icon-fenxiang"></view> <view class="iconfont icon-fenxiang">
</view>
<view>分享</view> <view>分享</view>
<button open-type="share"></button> <button open-type="share">
</button>
</view>
<navigator open-type="switchTab"
url="/pages/cart/index"
class="tool_item">
<view class="iconfont .icon-shopcart">
</view> </view>
<navigator open-type="switchTab" url="/pages/cart/index" class="tool_item">
<view class="iconfont .icon-shopcart"></view>
<view>购物车</view> <view>购物车</view>
</navigator> </navigator>
<view class="tool_item btn_cart " bindtap="handleCartAdd">加入购物车</view> <view class="tool_item btn_cart " bindtap="handleCartAdd">
<view class="tool_item btn_buy" bindtap="handleBuyNow">立即购买</view> 加入购物车
</view>
<view class="tool_item btn_buy" bindtap="handleBuyNow">
立即购买
</view>
</view> </view>
...@@ -2,15 +2,24 @@ ...@@ -2,15 +2,24 @@
<Tabs tabs="{{tabs}}" bindtabsItemChange="handleTabsItemChange"> <Tabs tabs="{{tabs}}" bindtabsItemChange="handleTabsItemChange">
<block wx:if="{{tabs[0].isActive}}"> <block wx:if="{{tabs[0].isActive}}">
<view class="first_tab"> <view class="first_tab">
<navigator wx:for="{{goodsList}}" wx:key="id" class="goods_item" url="/pages/goods_detail/index?id={{item.id}}"> <navigator wx:for="{{goodsList}}"
wx:key="id"
class="goods_item"
url="/pages/goods_detail/index?id={{item.id}}">
<!-- 左侧 图片容器 --> <!-- 左侧 图片容器 -->
<view class="goods_img_wrap"> <view class="goods_img_wrap">
<image mode="widthFix" src="{{item.pic?item.pic:'https://ww1.sinaimg.cn/large/007rAy9hgy1g24by9t530j30i20i2glm.jpg'}}"></image> <image mode="widthFix"
src="{{item.pic?item.pic:'https://ww1.sinaimg.cn/large/007rAy9hgy1g24by9t530j30i20i2glm.jpg'}}">
</image>
</view> </view>
<!-- 右侧 商品容器 --> <!-- 右侧 商品容器 -->
<view class="goods_info_wrap"> <view class="goods_info_wrap">
<view class="goods_name">{{item.name}}</view> <view class="goods_name">
<view class="goods_price">¥{{item.minPrice}}</view> {{item.name}}
</view>
<view class="goods_price">
¥{{item.minPrice}}
</view>
</view> </view>
</navigator> </navigator>
</view> </view>
......
This diff could not be displayed because it is too large.
...@@ -50,6 +50,12 @@ ...@@ -50,6 +50,12 @@
} }
} }
}, },
"app-harmony": {
"distribute": {}
},
"mp-harmony": {
"distribute": {}
},
"quickapp": {}, "quickapp": {},
"mp-weixin": { "mp-weixin": {
"appid": "wxa2abb91f64032a2b", "appid": "wxa2abb91f64032a2b",
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
} }
] ]
}, },
"__esModule": true,
"pages": [ "pages": [
{ {
"path": "pages/index/index", "path": "pages/index/index",
......
...@@ -21,6 +21,14 @@ const routes: RouteRecordRaw[] = [ ...@@ -21,6 +21,14 @@ const routes: RouteRecordRaw[] = [
path: "/demos/ant-design", path: "/demos/ant-design",
component: () => import("#/views/demos/antd/index.vue"), component: () => import("#/views/demos/antd/index.vue"),
}, },
{
meta: {
title: "mcp演示",
},
name: "mcpDemo",
path: "/demos/mcp-demo",
component: () => import("#/views/demos/mcpDemo/index.vue"),
},
], ],
}, },
]; ];
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"language": "en,en-US", "language": "en,en-US",
"allowCompoundWords": true, "allowCompoundWords": true,
"words": [ "words": [
"wxml",
"acmr", "acmr",
"antd", "antd",
"antdv", "antdv",
...@@ -57,6 +58,11 @@ ...@@ -57,6 +58,11 @@
"yxxx" "yxxx"
], ],
"ignorePaths": [ "ignorePaths": [
"**/uni_modules/**",
"**/miniprogram_npm/**",
"**/node_modules/**",
"**/node_modules/**", "**/node_modules/**",
"**/dist/**", "**/dist/**",
"**/*-dist/**", "**/*-dist/**",
......
import { defineConfig } from "@vben/eslint-config"; import { defineConfig } from "@vben/eslint-config";
export default defineConfig(); export default defineConfig();
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
} }
}, },
"dependencies": { "dependencies": {
"@wxml/parser": "^0.4.0",
"eslint": "catalog:", "eslint": "catalog:",
"eslint-config-turbo": "catalog:", "eslint-config-turbo": "catalog:",
"eslint-plugin-command": "catalog:", "eslint-plugin-command": "catalog:",
......
...@@ -58,6 +58,7 @@ export async function ignores(): Promise<Linter.Config[]> { ...@@ -58,6 +58,7 @@ export async function ignores(): Promise<Linter.Config[]> {
"**/*.sh", "**/*.sh",
"**/*.ttf", "**/*.ttf",
"**/*.woff", "**/*.woff",
"**/*.wxml",
], ],
}, },
]; ];
......
...@@ -15,7 +15,7 @@ export * from "./turbo"; ...@@ -15,7 +15,7 @@ export * from "./turbo";
export * from "./typescript"; export * from "./typescript";
export * from "./unicorn"; export * from "./unicorn";
export * from "./vue"; export * from "./vue";
export * from "./wxml";
/* /*
eslint-config/src/configs/index.ts eslint-config/src/configs/index.ts
......
...@@ -39,6 +39,7 @@ export async function javascript(): Promise<Linter.Config[]> { ...@@ -39,6 +39,7 @@ export async function javascript(): Promise<Linter.Config[]> {
linterOptions: { linterOptions: {
reportUnusedDisableDirectives: true, reportUnusedDisableDirectives: true,
}, },
ignores: [ "**/*.wxml" ],
plugins: { plugins: {
"unused-imports": pluginUnusedImports, "unused-imports": pluginUnusedImports,
}, },
......
...@@ -17,6 +17,7 @@ export async function prettier(): Promise<Linter.Config[]> { ...@@ -17,6 +17,7 @@ export async function prettier(): Promise<Linter.Config[]> {
] as const); ] as const);
return [ return [
{ {
files:[ "**/*.wxml", "**/*.wxs" ],
plugins: { plugins: {
prettier: pluginPrettier, prettier: pluginPrettier,
}, },
......
...@@ -20,10 +20,10 @@ export async function unicorn(): Promise<Linter.Config[]> { ...@@ -20,10 +20,10 @@ export async function unicorn(): Promise<Linter.Config[]> {
plugins: { plugins: {
unicorn: pluginUnicorn, unicorn: pluginUnicorn,
}, },
ignores: [ "**/*.wxml" ],
rules: { rules: {
...pluginUnicorn.configs.recommended.rules, ...pluginUnicorn.configs.recommended.rules,
"unicorn/no-abusive-eslint-disable":"off", "unicorn/no-abusive-eslint-disable":"off",
"unicorn/no-this-assignment":"warn", "unicorn/no-this-assignment":"warn",
"unicorn/no-empty-file":"off", "unicorn/no-empty-file":"off",
"unicorn/prefer-ternary":"off", "unicorn/prefer-ternary":"off",
......
...@@ -27,7 +27,9 @@ import { ...@@ -27,7 +27,9 @@ import {
typescript, typescript,
unicorn, unicorn,
vue, vue,
wxmlConfig,
} from "./configs"; } from "./configs";
import { prettier } from "./configs/prettier";
import { customConfig } from "./custom-config"; import { customConfig } from "./custom-config";
type FlatConfig = Linter.Config; type FlatConfig = Linter.Config;
...@@ -39,7 +41,7 @@ async function defineConfig(config: FlatConfig[] = []) { ...@@ -39,7 +41,7 @@ async function defineConfig(config: FlatConfig[] = []) {
vue(), vue(),
javascript(), javascript(),
ignores(), ignores(),
// prettier(), prettier(),
typescript(), typescript(),
jsonc(), jsonc(),
disableds(), disableds(),
...@@ -53,6 +55,7 @@ async function defineConfig(config: FlatConfig[] = []) { ...@@ -53,6 +55,7 @@ async function defineConfig(config: FlatConfig[] = []) {
regexp(), regexp(),
command(), command(),
turbo(), turbo(),
wxmlConfig(),
...customConfig, ...customConfig,
...config, ...config,
]; ];
......
declare module "@wxml/parser" {
export default any;
}
declare module "eslint-plugin-wxml" {
export default any;
}
export default {
printWidth: 120,
tabWidth: 4,
useTabs: true,
semi: true,
singleQuote: false,
htmlWhitespaceSensitivity: "ignore",
bracketSameLine: true,
plugins: [
"prettier-plugin-tailwindcss",
"@venus/prettier-plugin-wxml",
],
overrides: [
{
files: [ "*.json5" ],
options: {
quoteProps: "preserve",
singleQuote: false,
},
},
{
files: [ "*.wxml" ],
options: {
parser: "wxml",
},
},
],
};
{
"name": "@venus/prettier-config",
"version": "5.0.0",
"private": true,
"homepage": "https://github.com/venusjs/vue-venus-admin",
"bugs": "https://github.com/venusjs/vue-venus-admin/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/venusjs/vue-venus-admin.git",
"directory": "internal/lint-configs/prettier-config"
},
"license": "MIT",
"type": "module",
"files": [
"dist"
],
"main": "./index.mjs",
"module": "./index.mjs",
"exports": {
".": {
"default": "./index.mjs"
}
},
"dependencies": {
"@venus/prettier-plugin-wxml": "workspace:*",
"prettier": "catalog:",
"prettier-plugin-tailwindcss": "catalog:"
}
}
{
"name": "@venus/prettier-plugin-wxml",
"version": "1.0.0",
"type": "module",
"main": "index.js",
"exports": {
".": "./index.js"
},
"peerDependencies": {
"prettier": "^2.8.0 || ^3.0.0"
},
"dependencies": {
"@babel/generator": "^7.28.5",
"prettier-plugin-mp": "^2.5.0"
},
"devDependencies": {
"@babel/parser": "^7.28.5"
}
}
lockfileVersion: '9.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
dependencies:
'@babel/generator':
specifier: ^7.28.5
version: 7.28.5
prettier-plugin-mp:
specifier: ^2.5.0
version: 2.5.0(prettier@3.7.4)
devDependencies:
'@babel/parser':
specifier: ^7.28.5
version: 7.28.5
packages:
'@babel/generator@7.28.5':
resolution: {integrity: sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==}
engines: {node: '>=6.9.0'}
'@babel/helper-string-parser@7.27.1':
resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==}
engines: {node: '>=6.9.0'}
'@babel/helper-validator-identifier@7.28.5':
resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==}
engines: {node: '>=6.9.0'}
'@babel/parser@7.28.5':
resolution: {integrity: sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==}
engines: {node: '>=6.0.0'}
hasBin: true
'@babel/types@7.28.5':
resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==}
engines: {node: '>=6.9.0'}
'@jridgewell/gen-mapping@0.3.13':
resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}
'@jridgewell/resolve-uri@3.1.2':
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
engines: {node: '>=6.0.0'}
'@jridgewell/sourcemap-codec@1.5.5':
resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}
'@jridgewell/trace-mapping@0.3.31':
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
'@wxml/parser@0.4.0':
resolution: {integrity: sha512-pS0OPyKzCOhCPGlcfO9IDLZbqH4485bPdGDqaa+hYnI+cY/OW+GN4J88XpfdzM8wXJcJShFZy5F6MTUr2rysXg==}
jsesc@3.1.0:
resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==}
engines: {node: '>=6'}
hasBin: true
prettier-plugin-mp@2.5.0:
resolution: {integrity: sha512-xOACEwH19w211V8kkQEcrZnVQsP+g7/wepcJ2VM0ajLJdhQgcW4qJpD827vl28BYUuhkQ6dnyAAkeybJ3lzvzQ==}
peerDependencies:
prettier: ^3.0.0
prettier@3.7.4:
resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==}
engines: {node: '>=14'}
hasBin: true
snapshots:
'@babel/generator@7.28.5':
dependencies:
'@babel/parser': 7.28.5
'@babel/types': 7.28.5
'@jridgewell/gen-mapping': 0.3.13
'@jridgewell/trace-mapping': 0.3.31
jsesc: 3.1.0
'@babel/helper-string-parser@7.27.1': {}
'@babel/helper-validator-identifier@7.28.5': {}
'@babel/parser@7.28.5':
dependencies:
'@babel/types': 7.28.5
'@babel/types@7.28.5':
dependencies:
'@babel/helper-string-parser': 7.27.1
'@babel/helper-validator-identifier': 7.28.5
'@jridgewell/gen-mapping@0.3.13':
dependencies:
'@jridgewell/sourcemap-codec': 1.5.5
'@jridgewell/trace-mapping': 0.3.31
'@jridgewell/resolve-uri@3.1.2': {}
'@jridgewell/sourcemap-codec@1.5.5': {}
'@jridgewell/trace-mapping@0.3.31':
dependencies:
'@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.5.5
'@wxml/parser@0.4.0': {}
jsesc@3.1.0: {}
prettier-plugin-mp@2.5.0(prettier@3.7.4):
dependencies:
'@wxml/parser': 0.4.0
prettier: 3.7.4
prettier@3.7.4: {}
...@@ -6,7 +6,7 @@ export { getStagedFiles, add as gitAdd } from "./git"; ...@@ -6,7 +6,7 @@ export { getStagedFiles, add as gitAdd } from "./git";
export { generatorContentHash } from "./hash"; export { generatorContentHash } from "./hash";
export * from "./monorepo"; export * from "./monorepo";
export { toPosixPath } from "./path"; export { toPosixPath } from "./path";
// export { prettierFormat } from "./prettier"; export { prettierFormat } from "./prettier";
export * from "./spinner"; export * from "./spinner";
export type { Package } from "@manypkg/get-packages"; export type { Package } from "@manypkg/get-packages";
export { default as colors } from "chalk"; export { default as colors } from "chalk";
......
...@@ -69,6 +69,9 @@ ...@@ -69,6 +69,9 @@
"@vben/turbo-run": "workspace:*", "@vben/turbo-run": "workspace:*",
"@vben/vite-config": "workspace:*", "@vben/vite-config": "workspace:*",
"@vben/vsh": "workspace:*", "@vben/vsh": "workspace:*",
"@venus/prettier-config": "workspace:*",
"@venus/prettier-plugin-wxml": "workspace:*",
"@vitejs/plugin-vue": "catalog:", "@vitejs/plugin-vue": "catalog:",
"@vitejs/plugin-vue-jsx": "catalog:", "@vitejs/plugin-vue-jsx": "catalog:",
"@vue/test-utils": "catalog:", "@vue/test-utils": "catalog:",
...@@ -79,6 +82,9 @@ ...@@ -79,6 +82,9 @@
"is-ci": "catalog:", "is-ci": "catalog:",
"lefthook": "catalog:", "lefthook": "catalog:",
"playwright": "catalog:", "playwright": "catalog:",
"prettier": "catalog:",
"prettier-plugin-mp": "catalog:",
"prettier-plugin-tailwindcss": "catalog:",
"rimraf": "catalog:", "rimraf": "catalog:",
"tailwindcss": "catalog:", "tailwindcss": "catalog:",
"turbo": "catalog:", "turbo": "catalog:",
......
This diff could not be displayed because it is too large.
packages: packages:
- internal/lint-configs/prettier-config/plugin/*
- internal/* - internal/*
- internal/lint-configs/* - internal/lint-configs/*
- packages/* - packages/*
...@@ -144,6 +145,7 @@ catalog: ...@@ -144,6 +145,7 @@ catalog:
postcss-preset-env: ^10.2.4 postcss-preset-env: ^10.2.4
postcss-scss: ^4.0.9 postcss-scss: ^4.0.9
prettier: ^3.6.2 prettier: ^3.6.2
prettier-plugin-mp: ^2.5.0
prettier-plugin-tailwindcss: ^0.7.1 prettier-plugin-tailwindcss: ^0.7.1
publint: ^0.3.12 publint: ^0.3.12
qrcode: ^1.5.4 qrcode: ^1.5.4
......
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
getPackages, getPackages,
gitAdd, gitAdd,
outputJSON, outputJSON,
// prettierFormat, prettierFormat,
toPosixPath, toPosixPath,
} from "@vben/node-utils"; } from "@vben/node-utils";
...@@ -40,7 +40,7 @@ async function createCodeWorkspace({ ...@@ -40,7 +40,7 @@ async function createCodeWorkspace({
const outputPath = join(monorepoRoot, CODE_WORKSPACE_FILE); const outputPath = join(monorepoRoot, CODE_WORKSPACE_FILE);
await outputJSON(outputPath, { folders }, spaces); await outputJSON(outputPath, { folders }, spaces);
// await prettierFormat(outputPath); await prettierFormat(outputPath);
if (autoCommit) { if (autoCommit) {
await gitAdd(CODE_WORKSPACE_FILE, monorepoRoot); await gitAdd(CODE_WORKSPACE_FILE, monorepoRoot);
} }
......
...@@ -2,171 +2,179 @@ ...@@ -2,171 +2,179 @@
"folders": [ "folders": [
{ {
"name": "@vben/backend-mock", "name": "@vben/backend-mock",
"path": "apps/backend-mock" "path": "apps/backend-mock",
}, },
{ {
"name": "wechat-app-mall", "name": "wechat-app-mall",
"path": "apps/miniprogram/wechat-app-mall-master" "path": "apps/miniprogram/wechat-app-mall-master",
}, },
{ {
"name": "wx-mall", "name": "wx-mall",
"path": "apps/miniprogram/wx-mall-master" "path": "apps/miniprogram/wx-mall-master",
}, },
{ {
"name": "unibest", "name": "unibest",
"path": "apps/uniapp/unidemo" "path": "apps/uniapp/unidemo",
}, },
{ {
"name": "@vben/playground", "name": "@vben/playground",
"path": "apps/web/playground" "path": "apps/web/playground",
}, },
{ {
"name": "@vben/web-antd", "name": "@vben/web-antd",
"path": "apps/web/web-antd" "path": "apps/web/web-antd",
}, },
{ {
"name": "@vben/docs", "name": "@vben/docs",
"path": "docs" "path": "docs",
}, },
{ {
"name": "@vben/commitlint-config", "name": "@vben/commitlint-config",
"path": "internal/lint-configs/commitlint-config" "path": "internal/lint-configs/commitlint-config",
}, },
{ {
"name": "@vben/eslint-config", "name": "@vben/eslint-config",
"path": "internal/lint-configs/eslint-config" "path": "internal/lint-configs/eslint-config",
},
{
"name": "@venus/prettier-config",
"path": "internal/lint-configs/prettier-config",
},
{
"name": "@venus/prettier-plugin-wxml",
"path": "internal/lint-configs/prettier-config/plugin/prettier-plugin-wxml",
}, },
{ {
"name": "@vben/stylelint-config", "name": "@vben/stylelint-config",
"path": "internal/lint-configs/stylelint-config" "path": "internal/lint-configs/stylelint-config",
}, },
{ {
"name": "@vben/node-utils", "name": "@vben/node-utils",
"path": "internal/node-utils" "path": "internal/node-utils",
}, },
{ {
"name": "@vben/tailwind-config", "name": "@vben/tailwind-config",
"path": "internal/tailwind-config" "path": "internal/tailwind-config",
}, },
{ {
"name": "@vben/tsconfig", "name": "@vben/tsconfig",
"path": "internal/tsconfig" "path": "internal/tsconfig",
}, },
{ {
"name": "@vben/vite-config", "name": "@vben/vite-config",
"path": "internal/vite-config" "path": "internal/vite-config",
}, },
{ {
"name": "@vben-core/design", "name": "@vben-core/design",
"path": "packages/@core/base/design" "path": "packages/@core/base/design",
}, },
{ {
"name": "@vben-core/icons", "name": "@vben-core/icons",
"path": "packages/@core/base/icons" "path": "packages/@core/base/icons",
}, },
{ {
"name": "@vben-core/shared", "name": "@vben-core/shared",
"path": "packages/@core/base/shared" "path": "packages/@core/base/shared",
}, },
{ {
"name": "@vben-core/typings", "name": "@vben-core/typings",
"path": "packages/@core/base/typings" "path": "packages/@core/base/typings",
}, },
{ {
"name": "@vben-core/composables", "name": "@vben-core/composables",
"path": "packages/@core/composables" "path": "packages/@core/composables",
}, },
{ {
"name": "@vben-core/preferences", "name": "@vben-core/preferences",
"path": "packages/@core/preferences" "path": "packages/@core/preferences",
}, },
{ {
"name": "@vben-core/form-ui", "name": "@vben-core/form-ui",
"path": "packages/@core/ui-kit/form-ui" "path": "packages/@core/ui-kit/form-ui",
}, },
{ {
"name": "@vben-core/layout-ui", "name": "@vben-core/layout-ui",
"path": "packages/@core/ui-kit/layout-ui" "path": "packages/@core/ui-kit/layout-ui",
}, },
{ {
"name": "@vben-core/menu-ui", "name": "@vben-core/menu-ui",
"path": "packages/@core/ui-kit/menu-ui" "path": "packages/@core/ui-kit/menu-ui",
}, },
{ {
"name": "@vben-core/popup-ui", "name": "@vben-core/popup-ui",
"path": "packages/@core/ui-kit/popup-ui" "path": "packages/@core/ui-kit/popup-ui",
}, },
{ {
"name": "@vben-core/shadcn-ui", "name": "@vben-core/shadcn-ui",
"path": "packages/@core/ui-kit/shadcn-ui" "path": "packages/@core/ui-kit/shadcn-ui",
}, },
{ {
"name": "@vben-core/tabs-ui", "name": "@vben-core/tabs-ui",
"path": "packages/@core/ui-kit/tabs-ui" "path": "packages/@core/ui-kit/tabs-ui",
}, },
{ {
"name": "@vben/constants", "name": "@vben/constants",
"path": "packages/constants" "path": "packages/constants",
}, },
{ {
"name": "@vben/access", "name": "@vben/access",
"path": "packages/effects/access" "path": "packages/effects/access",
}, },
{ {
"name": "@vben/common-ui", "name": "@vben/common-ui",
"path": "packages/effects/common-ui" "path": "packages/effects/common-ui",
}, },
{ {
"name": "@vben/hooks", "name": "@vben/hooks",
"path": "packages/effects/hooks" "path": "packages/effects/hooks",
}, },
{ {
"name": "@vben/layouts", "name": "@vben/layouts",
"path": "packages/effects/layouts" "path": "packages/effects/layouts",
}, },
{ {
"name": "@vben/plugins", "name": "@vben/plugins",
"path": "packages/effects/plugins" "path": "packages/effects/plugins",
}, },
{ {
"name": "@vben/request", "name": "@vben/request",
"path": "packages/effects/request" "path": "packages/effects/request",
}, },
{ {
"name": "@vben/icons", "name": "@vben/icons",
"path": "packages/icons" "path": "packages/icons",
}, },
{ {
"name": "@vben/locales", "name": "@vben/locales",
"path": "packages/locales" "path": "packages/locales",
}, },
{ {
"name": "@vben/preferences", "name": "@vben/preferences",
"path": "packages/preferences" "path": "packages/preferences",
}, },
{ {
"name": "@vben/stores", "name": "@vben/stores",
"path": "packages/stores" "path": "packages/stores",
}, },
{ {
"name": "@vben/styles", "name": "@vben/styles",
"path": "packages/styles" "path": "packages/styles",
}, },
{ {
"name": "@vben/types", "name": "@vben/types",
"path": "packages/types" "path": "packages/types",
}, },
{ {
"name": "@vben/utils", "name": "@vben/utils",
"path": "packages/utils" "path": "packages/utils",
}, },
{ {
"name": "@vben/turbo-run", "name": "@vben/turbo-run",
"path": "scripts/turbo-run" "path": "scripts/turbo-run",
}, },
{ {
"name": "@vben/vsh", "name": "@vben/vsh",
"path": "scripts/vsh" "path": "scripts/vsh",
} },
] ],
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!