Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

Commit 7418141

Browse files
author
pengshanglong
committed
chore: prettier format code
1 parent 2f0a9b8 commit 7418141

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.eslintrc.js

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
// ESLint 检查 .vue 文件需要单独配置编辑器:
22
// https://eslint.vuejs.org/user-guide/#editor-integrations
33
module.exports = {
4-
'extends': ['taro/vue']
4+
'extends': [
5+
"plugin:prettier/recommended",
6+
"prettier/vue",
7+
'taro/vue'
8+
],
9+
parserOptions: { ecmaVersion: 2015, ecmaFeatures: { legacyDecorators: true } },
10+
rules: {
11+
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
12+
"prettier/prettier": [
13+
"error",
14+
{
15+
"semi": false,
16+
"singleQuote": true,
17+
"bracketSpacing": true,
18+
"jsxBracketSameLine": true,
19+
"trailingComma": "es5",
20+
"jsxSingleQuote": false,
21+
"parser": "flow",
22+
"endOfLine":"auto",
23+
"printWidth": 100
24+
}
25+
],
26+
}
527
}

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@
5454
"@vue/babel-preset-jsx": "^1.1.2",
5555
"babel-preset-taro": "3.0.0-beta.6",
5656
"eslint": "^6.8.0",
57+
"eslint-config-prettier": "^6.11.0",
5758
"eslint-config-taro": "3.0.0-beta.6",
59+
"eslint-plugin-prettier": "^3.1.3",
5860
"eslint-plugin-vue": "^6.x",
61+
"prettier": "^2.0.5",
5962
"stylelint": "9.3.0",
6063
"typescript": "^3.7.0"
6164
}

0 commit comments

Comments
 (0)