Skip to content

Commit 1d3c7e6

Browse files
LuMeilinglumeiling3Chen-jj
authored
fix(cli): 修复 taro-doctor 命令,fix #10648 #11253
* fix(taro-cli): modify path in eslint-config-taro/index.js for taro doctor cli * fix(doctor): add common package * fix(doctor): add common packages to taro-help * fix(doctor): simplify relative path and exclude packages starting with @tarojs/plugin- Co-authored-by: lumeiling3 <lumeiling@jd.com> Co-authored-by: chenjiajian <798095202@qq.com>
1 parent da80c53 commit 1d3c7e6

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/eslint-config-taro/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
'./rules/imports',
66
'./rules/variables'
77
].map(require.resolve),
8-
parser: require.resolve('babel-eslint'),
8+
parser: 'babel-eslint',
99
parserOptions: {
1010
ecmaVersion: 2018,
1111
ecmaFeatures: {

packages/taro-cli/src/doctor/packageValidator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function taroShouldUpdate (pkgs): ErrorLine[] {
9393
function taroOutdate (pkgs): ErrorLine[] {
9494
const list: ErrorLine[] = []
9595
pkgs.forEach(({ moduleName, isInstalled }) => {
96-
if (!UPDATE_PACKAGE_LIST.includes(moduleName) && /^@tarojs/.test(moduleName)) {
96+
if (!UPDATE_PACKAGE_LIST.includes(moduleName) && /^@tarojs/.test(moduleName) && !/^@tarojs\/plugin-/.test(moduleName)) {
9797
list.push({
9898
desc: `Taro 3 不再依赖 ${moduleName},可以${isInstalled ? '卸载' : '从 package.json 移除'}`,
9999
valid: true

packages/taro-helper/src/constants.ts

+4
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,13 @@ export const UPDATE_PACKAGE_LIST = [
138138
'@tarojs/cli',
139139
'@tarojs/components',
140140
'@tarojs/taro-h5',
141+
'@tarojs/taro-rn',
142+
'@tarojs/rn-runner',
141143
'@tarojs/helper',
142144
'@tarojs/taro-loader',
143145
'@tarojs/mini-runner',
144146
'@tarojs/react',
147+
'@tarojs/plugin-framework-react',
145148
'@tarojs/router',
146149
'@tarojs/runner-utils',
147150
'@tarojs/runtime',
@@ -155,6 +158,7 @@ export const UPDATE_PACKAGE_LIST = [
155158
'@tarojs/plugin-platform-tt',
156159
'@tarojs/plugin-platform-qq',
157160
'@tarojs/plugin-platform-jd',
161+
'@tarojs/plugin-html',
158162
'nervjs',
159163
'nerv-devtools'
160164
]

0 commit comments

Comments
 (0)