Skip to content

Commit a7d2182

Browse files
authored
Housekeeping eslint for v2.0 (vuejs#553)
* bump eslint-config-vue * rename .eslintrc * enable lint checking for test codes and fix some errors * bump vue related eslint plugins
1 parent ba5a129 commit a7d2182

File tree

7 files changed

+8
-9
lines changed

7 files changed

+8
-9
lines changed
File renamed without changes.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"build": "npm run build:main && npm run build:logger",
1818
"build:main": "rollup -c build/rollup.config.js && uglifyjs dist/vuex.js -cm --comments -o dist/vuex.min.js",
1919
"build:logger": "rollup -c build/rollup.logger.config.js",
20-
"test": "eslint src && npm run test:types && npm run test:unit && npm run test:e2e",
20+
"lint": "eslint src test",
21+
"test": "npm run lint && npm run test:types && npm run test:unit && npm run test:e2e",
2122
"test:unit": "rollup -c build/rollup.config.js && jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json",
2223
"test:e2e": "node test/e2e/runner.js",
2324
"test:types": "tsc -p types/test",
@@ -48,8 +49,8 @@
4849
"cross-spawn": "^4.0.0",
4950
"css-loader": "^0.25.0",
5051
"eslint": "^3.5.0",
51-
"eslint-config-vue": "^1.0.0",
52-
"eslint-plugin-html": "^1.5.2",
52+
"eslint-config-vue": "^2.0.2",
53+
"eslint-plugin-vue": "^2.0.1",
5354
"express": "^4.14.0",
5455
"jasmine": "2.4.1",
5556
"jasmine-core": "2.4.1",

test/e2e/runner.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var path = require('path')
21
var spawn = require('cross-spawn')
32
var args = process.argv.slice(2)
43

test/e2e/specs/todomvc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports = {
8282
.assert.count('.todo', 1)
8383
.assert.count('.todo.completed', 0)
8484
// add item with filter active
85-
createNewItem('test')
85+
createNewItem('test')
8686
.assert.count('.todo', 2)
8787

8888
// complted filter
File renamed without changes.

test/unit/modules.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Vue from 'vue/dist/vue.common.js'
21
import Vuex from '../../dist/vuex.js'
32

43
const TEST = 'TEST'
@@ -298,7 +297,7 @@ describe('Modules', () => {
298297
b: createModule('b', false, { // a/b - does not add namespace
299298
c: createModule('c', true) // a/c/c
300299
}),
301-
d: createModule('d', true), // a/d/d
300+
d: createModule('d', true) // a/d/d
302301
})
303302
}
304303

test/unit/store.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ describe('Store', () => {
210210
const store = new Vuex.Store({
211211
mutations: {
212212
[TEST] () {}
213-
},
213+
}
214214
})
215-
store.commit(TEST, {}, { silent: true });
215+
store.commit(TEST, {}, { silent: true })
216216

217217
expect(console.warn).toHaveBeenCalledWith(
218218
`[vuex] mutation type: ${TEST}. Silent option has been removed. ` +

0 commit comments

Comments
 (0)