Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
suncohey authored Jul 11, 2023
2 parents 3446a1c + e425000 commit 4aebbdc
Show file tree
Hide file tree
Showing 72 changed files with 2,494 additions and 1,886 deletions.
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
registry=https://registry.npmmirror.com/

strict-peer-dependencies=false
auto-install-peers=false
resolution-mode=highest
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
## Features

- 🚀 1KB Component average size (min+gzip)
- 🚀 70+ High quality components
- 🚀 80+ High quality components
- 🚀 Zero third-party dependencies
- 💪 90%+ Unit test coverage
- 💪 Written in TypeScript
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Vant 是一个**轻量、可定制的移动端组件库**,于 2017 年开源
## 特性

- 🚀 性能极佳,组件平均体积小于 1KB(min+gzip)
- 🚀 70+ 个高质量组件,覆盖移动端主流场景
- 🚀 80+ 个高质量组件,覆盖移动端主流场景
- 🚀 零外部依赖,不依赖三方 npm 包
- 💪 使用 TypeScript 编写,提供完整的类型定义
- 💪 单元测试覆盖率超过 90%,提供稳定性保障
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"scripts": {
"prepare": "husky install",
"dev": "pnpm --dir ./packages/vant dev",
"lint": "pnpm --dir ./packages/vant lint",
"lint": "eslint ./packages/**/src ./packages/**/test --ext .js,.ts,.tsx,.vue,.mjs,.cjs",
"test": "pnpm --dir ./packages/vant test",
"test:watch": "pnpm --dir ./packages/vant test:watch",
"test:update": "pnpm --dir ./packages/vant test:update",
Expand All @@ -18,7 +18,7 @@
"engines": {
"pnpm": ">= 8.0.0"
},
"packageManager": "pnpm@8.1.0",
"packageManager": "pnpm@8.6.5",
"devDependencies": {
"@vant/cli": "workspace:*",
"@vant/eslint-config": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion packages/create-vant-cli-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"module": "commonjs",
"declaration": true
},
"include": ["src/**/*"]
"include": ["src/**/*"],
"exclude": ["**/node_modules", "**/.*/"]
}
2 changes: 1 addition & 1 deletion packages/vant-area-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"author": "chenjiahan",
"license": "MIT",
"devDependencies": {
"esbuild": "^0.17.12",
"esbuild": "^0.18.11",
"release-it": "^15.4.1",
"rimraf": "^5.0.0",
"typescript": "^5.0.4"
Expand Down
3 changes: 2 additions & 1 deletion packages/vant-area-data/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"outDir": "./dist",
"declaration": true
},
"include": ["src/**/*"]
"include": ["src/**/*"],
"exclude": ["**/node_modules", "**/.*/"]
}
8 changes: 0 additions & 8 deletions packages/vant-cli/.eslintrc

This file was deleted.

12 changes: 8 additions & 4 deletions packages/vant-cli/cjs/postcss.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ function getPostcssPlugins(rootConfig) {
const plugins = rootConfig.plugins || [];

if (Array.isArray(plugins)) {
const hasPostcssPlugin = plugins.find(
(plugin) =>
plugin === 'autoprefixer' && plugin.postcssPlugin === 'autoprefixer'
const hasAutoprefixerPlugin = plugins.find(
(plugin) => {
if (typeof plugin === 'object') {
return plugin.postcssPlugin === 'autoprefixer';
}
return plugin === 'autoprefixer';
}
);
if (hasPostcssPlugin) {
if (hasAutoprefixerPlugin) {
return plugins;
}

Expand Down
8 changes: 4 additions & 4 deletions packages/vant-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@babel/core": "^7.18.13",
"@babel/preset-typescript": "^7.18.6",
"@types/jest": "^29.5.1",
"@vant/eslint-config": "^3.5.0",
"@vant/eslint-config": "^4.0.0",
"@vant/touch-emulator": "^1.4.0",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
Expand All @@ -60,15 +60,15 @@
"commander": "^10.0.0",
"consola": "^3.0.2",
"conventional-changelog": "^3.1.25",
"esbuild": "^0.17.12",
"esbuild": "^0.18.11",
"eslint": "^8.31.0",
"execa": "^6.1.0",
"fast-glob": "^3.2.11",
"fs-extra": "^11.1.0",
"hash-sum": "^2.0.0",
"highlight.js": "^11.6.0",
"husky": "^8.0.1",
"jest": "^29.3.1",
"jest": "^29.5.0",
"jest-canvas-mock": "^2.4.0",
"jest-environment-jsdom": "^29.1.2",
"jest-serializer-html": "^7.1.0",
Expand All @@ -86,7 +86,7 @@
"terser": "^5.16.1",
"transliteration": "^2.3.5",
"typescript": "^5.0.4",
"vite": "^4.3.9",
"vite": "^4.4.2",
"vite-plugin-md": "^0.11.9",
"vue-router": "^4.1.6"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/vant-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"outDir": "./lib",
"declaration": true
},
"include": ["src/**/*"]
"include": ["src/**/*"],
"exclude": ["**/node_modules", "**/.*/"]
}
2 changes: 1 addition & 1 deletion packages/vant-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@vue/runtime-core": "^3.3.4",
"vant": "workspace:*",
"vue": "^3.3.4",
"esbuild": "^0.17.12",
"esbuild": "^0.18.11",
"release-it": "^15.1.1",
"rimraf": "^5.0.0",
"typescript": "^5.0.4"
Expand Down
3 changes: 2 additions & 1 deletion packages/vant-compat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"outDir": "./dist",
"declaration": true
},
"include": ["src/**/*"]
"include": ["src/**/*"],
"exclude": ["**/node_modules", "**/.*/"]
}
23 changes: 1 addition & 22 deletions packages/vant-eslint-config/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'prettier',
],
Expand All @@ -23,28 +23,7 @@ module.exports = {
},

rules: {
'no-new': 'off',
'no-shadow': 'off',
'no-bitwise': 'off',
'func-names': 'off',
'no-console': 'off',
'no-plusplus': 'off',
'default-case': 'off',
'prefer-template': 'off',
'consistent-return': 'off',
'no-param-reassign': 'off',
'no-nested-ternary': 'off',
'no-underscore-dangle': 'off',
'no-unused-expressions': 'off',
'no-restricted-globals': 'off',
'class-methods-use-this': 'off',
'prefer-destructuring': ['error', { object: true, array: false }],
// eslint-plugin-import
'import/order': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
// eslint-plugin-vue
'vue/no-v-html': 'off',
'vue/attributes-order': 'off',
Expand Down
4 changes: 0 additions & 4 deletions packages/vant-eslint-config/jest.config.js

This file was deleted.

13 changes: 0 additions & 13 deletions packages/vant-eslint-config/jest.resolver.js

This file was deleted.

19 changes: 7 additions & 12 deletions packages/vant-eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"name": "@vant/eslint-config",
"version": "3.5.0",
"version": "4.0.0",
"description": "eslint config of vant",
"main": "index.js",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"update:deps": "pnpm update --latest --interactive",
"test": "jest"
"update:deps": "pnpm update --latest --interactive"
},
"repository": {
"type": "git",
Expand All @@ -20,17 +19,13 @@
"author": "chenjiahan",
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-vue": "^9.8.0"
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-vue": "^9.15.1"
},
"devDependencies": {
"enhanced-resolve": "^5.12.0",
"eslint": "^8.31.0",
"jest": "^29.3.1",
"eslint": "^8.44.0",
"typescript": "^5.0.4"
},
"peerDependencies": {
Expand Down
4 changes: 0 additions & 4 deletions packages/vant-eslint-config/test/.eslintrc

This file was deleted.

39 changes: 0 additions & 39 deletions packages/vant-eslint-config/test/index.spec.js

This file was deleted.

12 changes: 0 additions & 12 deletions packages/vant-eslint-config/test/vue-tsx/app.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions packages/vant-eslint-config/test/vue-tsx/index.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/vant-eslint-config/test/vue-tsx/main.ts

This file was deleted.

18 changes: 0 additions & 18 deletions packages/vant-eslint-config/test/vue-tsx/tsconfig.json

This file was deleted.

20 changes: 0 additions & 20 deletions packages/vant-eslint-config/test/vue/index.vue

This file was deleted.

2 changes: 0 additions & 2 deletions packages/vant-eslint-config/test/vue/main.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/vant-popperjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"license": "MIT",
"devDependencies": {
"@popperjs/core": "^2.11.6",
"esbuild": "^0.17.12",
"esbuild": "^0.18.11",
"release-it": "^15.4.1",
"rimraf": "^5.0.0",
"typescript": "^5.0.4"
Expand Down
3 changes: 2 additions & 1 deletion packages/vant-popperjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"outDir": "./dist",
"declaration": true
},
"include": ["src/**/*"]
"include": ["src/**/*"],
"exclude": ["**/node_modules", "**/.*/"]
}
Loading

0 comments on commit 4aebbdc

Please sign in to comment.