Skip to content

Commit

Permalink
fix(cli): taro doctor 使用 typescript-eslint/parser
Browse files Browse the repository at this point in the history
1. 更新 eslint, fix #3598
2. 使用新 parser,fix #4161, fix 4152
  • Loading branch information
yuche committed Aug 14, 2019
1 parent f26ec37 commit 093133a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/taro-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@tarojs/taroize": "1.3.13",
"@tarojs/transformer-wx": "1.3.13",
"@types/request": "^2.48.1",
"@typescript-eslint/parser": "^2.0.0",
"adm-zip": "^0.4.13",
"autoprefixer": "^8.4.1",
"babel-core": "^6.26.3",
Expand All @@ -69,7 +70,7 @@
"download-git-repo": "^2.0.0",
"ejs": "^2.6.1",
"envinfo": "^6.0.1",
"eslint": "^4.15.0",
"eslint": "^6.1.0",
"eslint-config-taro": "1.3.13",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-react": "^7.4.0",
Expand Down
9 changes: 7 additions & 2 deletions packages/taro-cli/src/doctor/validatorEslintrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ module.exports = {
'no-unused-vars': ['error', { 'varsIgnorePattern': 'Taro' }],
'react/jsx-filename-extension': [1, { 'extensions': ['.js', '.jsx', '.tsx'] }]
},
'parser': 'babel-eslint',
'plugins': ['typescript']
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaFeatures': {
'jsx': true
},
'useJSXTextNode': true
}
}

0 comments on commit 093133a

Please sign in to comment.