Skip to content

Commit ab1203a

Browse files
committed
update eslint config
1 parent fb760b7 commit ab1203a

File tree

7 files changed

+228
-299
lines changed

7 files changed

+228
-299
lines changed

.eslintrc

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"root": true,
3-
"parser": "babel-eslint",
4-
"extends": "vue",
5-
"plugins": ["flowtype"],
3+
"plugins": [
4+
"vue-libs",
5+
"flowtype"
6+
],
7+
"extends": [
8+
"plugin:vue-libs/recommended",
9+
"plugin:flowtype/recommended"
10+
],
611
"globals": {
712
"__WEEX__": true
8-
},
9-
"rules": {
10-
"no-useless-escape": 0,
11-
"flowtype/define-flow-type": 1,
12-
"flowtype/use-flow-type": 1
1313
}
1414
}

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,10 @@
7171
"de-indent": "^1.0.2",
7272
"es6-promise": "^4.0.5",
7373
"eslint": "^3.10.1",
74-
"eslint-config-vue": "^2.0.1",
7574
"eslint-loader": "^1.3.0",
7675
"eslint-plugin-flowtype": "^2.16.0",
7776
"eslint-plugin-jasmine": "^2.1.0",
78-
"eslint-plugin-vue": "^2.0.0",
77+
"eslint-plugin-vue-libs": "^1.0.0",
7978
"file-loader": "^0.10.1",
8079
"flow-bin": "^0.45.0",
8180
"hash-sum": "^1.0.2",

src/core/observer/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export function set (target: Array<any> | Object, key: any, val: any): any {
198198
target[key] = val
199199
return val
200200
}
201-
const ob = (target : any).__ob__
201+
const ob = (target: any).__ob__
202202
if (target._isVue || (ob && ob.vmCount)) {
203203
process.env.NODE_ENV !== 'production' && warn(
204204
'Avoid adding reactive properties to a Vue instance or its root $data ' +
@@ -223,7 +223,7 @@ export function del (target: Array<any> | Object, key: any) {
223223
target.splice(key, 1)
224224
return
225225
}
226-
const ob = (target : any).__ob__
226+
const ob = (target: any).__ob__
227227
if (target._isVue || (ob && ob.vmCount)) {
228228
process.env.NODE_ENV !== 'production' && warn(
229229
'Avoid deleting properties on a Vue instance or its root $data ' +

src/core/util/env.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (inBrowser) {
2626
/* istanbul ignore next */
2727
supportsPassive = true
2828
}
29-
} : Object)) // https://github.com/facebook/flow/issues/285
29+
}: Object)) // https://github.com/facebook/flow/issues/285
3030
window.addEventListener('test-passive', null, opts)
3131
} catch (e) {}
3232
}

src/platforms/weex/compiler/modules/props.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { cached, camelize } from 'shared/util'
44

55
const normalize = cached(camelize)
66

7-
function normalizeKeyName (str: string) : string {
7+
function normalizeKeyName (str: string): string {
88
if (str.match(/^v\-/)) {
99
return str.replace(/(v-[a-z\-]+\:)([a-z\-]+)$/i, ($, directive, prop) => {
1010
return directive + normalize(prop)

test/helpers/test-object-option.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Vue from 'vue'
22

3-
export default function testObjectOption (name: string) {
3+
export default function testObjectOption (name) {
44
it('should warn non object', () => {
55
const options = {}
66
options[name] = () => {}

0 commit comments

Comments
 (0)