forked from psaren/taro-ui-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
71 lines (71 loc) · 1.58 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// ESLint 检查 .vue 文件需要单独配置编辑器:
// https://eslint.vuejs.org/user-guide/#editor-integrations
module.exports = {
'extends': [
"plugin:prettier/recommended",
"prettier/vue",
'taro/vue',
],
"parser": "vue-eslint-parser",
parserOptions: { ecmaVersion: 2015, ecmaFeatures: { legacyDecorators: true } },
rules: {
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
"prettier/prettier": [
"error",
{
"semi": false,
"singleQuote": true,
"bracketSpacing": true,
"jsxBracketSameLine": true,
"trailingComma": "es5",
"jsxSingleQuote": false,
"parser": "flow",
"endOfLine":"auto",
"printWidth": 100
}
],
},
overrides: [
{
files: [
'config/*.js'
],
"rules": {
"import/no-commonjs": "off"
}
},
{
"files": [
"**/*.ts",
"**/*.tsx"
],
parserOptions: {"parser": "@typescript-eslint/parser",},
"plugins": [
"@typescript-eslint"
],
"extends": "plugin:prettier/recommended",
"env": {
"jest": true
},
"rules": {
"no-undef": 0,
"no-unused-vars": 0,
"@typescript-eslint/class-name-casing": 2,
"class-methods-use-this": "off",
"prefer-rest-params": "off",
"arrow-body-style": "warn",
"taro/custom-component-children": "off"
}
},
{
files: [
"**/*.d.ts",
],
rules: {
"prettier/prettier": [
"off",
]
}
}
]
}