From 739cb9b1f762a144b8e693a343c7e8a051eb1076 Mon Sep 17 00:00:00 2001 From: "Zhuohuan LI (CARPE DIEM)" Date: Wed, 31 Aug 2016 12:07:03 +0000 Subject: [PATCH] eslint work for ava es6 --- package.json | 13 +++++++++++-- test/puppet-web/bridge.spec.js | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d8f6ef35..4d95ca9c 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "BINARY_CHROMIUM": "/wechaty/bin/xvfb-chromium" }, "scripts": { - "lint": "echo skip lint - 'npm run eslint && npm run tslint'", + "lint": "npm run eslint && echo npm run tslint", "eslint": "eslint \"{src,test}/**/*.js\"", "tslint": "tslint \"{src,test}/**/*.ts\"", "pretest": "npm run lint", @@ -57,7 +57,15 @@ "plugins": [ "ava" ], - "extends": "plugin:ava/recommended" + "parser": "babel-eslint", + "parserOptions": { + "ecmaVersion": 7, + "sourceType": "module", + "ecmaFeatures": { + "impliedStrict": true + }, + "extends": "plugin:ava/recommended" + } }, "engines": { "node": ">= 6.0.0" @@ -79,6 +87,7 @@ "devDependencies": { "apiai": "^2.0.7", "ava": "^0.16.0", + "babel-eslint": "^6.1.2", "cookie-parser": "^1.4.3", "cross-env": "^2.0.0", "eslint": "^3.4.0", diff --git a/test/puppet-web/bridge.spec.js b/test/puppet-web/bridge.spec.js index ade0854d..7bb27cd9 100644 --- a/test/puppet-web/bridge.spec.js +++ b/test/puppet-web/bridge.spec.js @@ -40,7 +40,6 @@ test('Bridge retry-promise testing', async t => { }) .catch(e => { thenSpy(e) - console.log(e) // t.is(e, EXPECTED_REJECT, `retry-promise got ${EXPECTED_REJECT} when wait not enough`) }) t.true(thenSpy.withArgs(EXPECTED_REJECT).calledOnce, 'should got EXPECTED_REJECT when wait not enough') -- GitLab