Update eslint and .travis.yml (#259)

* simplify .travis.yml

* Fixes error and warning from eslint

15:32  error  Unnecessary escape character: \?  no-useless-escape
This commit is contained in:
YFdyh000
2017-08-11 15:30:28 +08:00
committed by wbamberg
parent 750870481e
commit 050b5fa9d0
4 changed files with 4 additions and 8 deletions

View File

@@ -1,7 +1,3 @@
language: node_js
node_js:
- "8"
node_js: stable
sudo: false
script:
- "npm test"

View File

@@ -54,7 +54,7 @@ document.getElementById("button_background").addEventListener("click", () => {
});
const inspectString = "inspect(document.querySelector('h1'))";
document.getElementById("button_h1").addEventListener("click", function(){
document.getElementById("button_h1").addEventListener("click", () => {
browser.devtools.inspectedWindow.eval(inspectString)
.then(handleResult);
});

View File

@@ -12,7 +12,7 @@ const AUTH_URL =
const VALIDATION_BASE_URL="https://www.googleapis.com/oauth2/v3/tokeninfo";
function extractAccessToken(redirectUri) {
let m = redirectUri.match(/[#\?](.*)/);
let m = redirectUri.match(/[#?](.*)/);
if (!m || m.length < 1)
return null;
let params = new URLSearchParams(m[1].split("#")[0]);

View File

@@ -4,7 +4,7 @@
"version": "1.0.0",
"description": "Example Firefox add-ons created using the WebExtensions API",
"devDependencies": {
"eslint": "^3.19.0"
"eslint": "^4.4.1"
},
"repository": {
"type": "git",