Skip to content

Commit c0cd3e1

Browse files
committed
update eslint config, fix test case
1 parent c580a82 commit c0cd3e1

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

.eslintrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"extends": "standard",
2+
"extends": "vue",
33
"rules": {
4-
"arrow-parens": [2, "as-needed"],
54
"no-duplicate-imports": 0
65
}
76
}

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
"casperjs": "^1.1.0-beta5",
5454
"codecov.io": "^0.1.2",
5555
"eslint": "^2.1.0",
56-
"eslint-config-standard": "^5.1.0",
57-
"eslint-plugin-promise": "^1.0.8",
58-
"eslint-plugin-standard": "^1.3.2",
56+
"eslint-config-vue": "^1.0.0",
5957
"istanbul-instrumenter-loader": "^0.1.3",
6058
"jasmine-core": "^2.4.1",
6159
"karma": "^0.13.8",

src/compiler/compile-props.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ function assertProp (prop, value, vm) {
334334
var expectedTypes = []
335335
if (type) {
336336
if (!isArray(type)) {
337-
type = [ type ]
337+
type = [type]
338338
}
339339
for (var i = 0; i < type.length && !valid; i++) {
340340
var assertedType = assertType(value, type[i])

src/filters/array-filters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export function orderBy (arr) {
9292
}
9393

9494
// determine sortKeys & comparator
95-
let firstArg = args[0]
95+
const firstArg = args[0]
9696
if (!firstArg) {
9797
return arr
9898
} else if (typeof firstArg === 'function') {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import config from './config'
55

66
installGlobalAPI(Vue)
77

8-
Vue.version = '1.0.21'
8+
Vue.version = '1.0.22'
99

1010
export default Vue
1111

src/watcher.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,13 @@ Watcher.prototype.teardown = function () {
336336

337337
const seenObjects = new Set()
338338
function traverse (val, seen) {
339-
let i, keys, isA, isO
339+
let i, keys
340340
if (!seen) {
341341
seen = seenObjects
342342
seen.clear()
343343
}
344-
isA = isArray(val)
345-
isO = isObject(val)
344+
const isA = isArray(val)
345+
const isO = isObject(val)
346346
if (isA || isO) {
347347
if (val.__ob__) {
348348
var depId = val.__ob__.dep.id

test/.eslintrc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"parserOptions": {
3+
"ecmaVersion": 5
4+
},
25
"env": {
36
"jasmine": true
47
},
@@ -9,8 +12,8 @@
912
"getWarnCount": true
1013
},
1114
"rules": {
12-
"no-new": 0,
1315
"no-multi-str": 0,
14-
"standard/object-curly-even-spacing": 0
16+
"object-curly-spacing": 0,
17+
"array-bracket-spacing": 0
1518
}
1619
}

test/unit/specs/instance/state_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ describe('Instance state initialization', function () {
1111

1212
it('should initialize data once per strat', function () {
1313
var spyOncePerStrat = jasmine.createSpy('called once per strat')
14-
const VM = Vue.extend({
14+
var Comp = Vue.extend({
1515
data: function () {
1616
spyOncePerStrat()
1717
return {
1818
result: 'false'
1919
}
2020
}
2121
})
22-
new VM({
22+
new Comp({
2323
data: function () {
2424
spyOncePerStrat()
2525
return {

0 commit comments

Comments
 (0)