commit ebeb45c8d621dbeb2c9d0cbe06669ad3751b3ea4 Author: Arlo Breault arlolra@gmail.com Date: Sun Jul 7 15:31:09 2019 +0200
Lint with eslint
Requires at least node v8.x --- .travis.yml | 3 ++- proxy/.eslintrc.json | 8 ++++++++ proxy/package.json | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml index 259d9eb..072f073 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ go: - 1.10.x
env: - - TRAVIS_NODE_VERSION="6" CC="gcc-5" CXX="g++-5" + - TRAVIS_NODE_VERSION="8" CC="gcc-5" CXX="g++-5"
before_install: - nvm install $TRAVIS_NODE_VERSION @@ -39,4 +39,5 @@ script: - go vet ./... - go test -v -race ./... - cd proxy + - npm run lint - npm test diff --git a/proxy/.eslintrc.json b/proxy/.eslintrc.json new file mode 100644 index 0000000..d6f8309 --- /dev/null +++ b/proxy/.eslintrc.json @@ -0,0 +1,8 @@ +{ + "env": { + "browser": true, + "es6": true, + "node": true + }, + "extends": "eslint:recommended" +} diff --git a/proxy/package.json b/proxy/package.json index ca13a52..c5a571b 100644 --- a/proxy/package.json +++ b/proxy/package.json @@ -12,7 +12,8 @@ "webext": "node make.js webext", "clean": "node make.js clean", "prepublish": "node make.js node", - "start": "node build/snowflake.js" + "start": "node build/snowflake.js", + "lint": "eslint . --ext .js" }, "bin": { "snowflake": "build/snowflake.js" @@ -20,6 +21,7 @@ "author": "Serene Han", "license": "BSD-3-Clause", "devDependencies": { + "eslint": "^6.0.1", "jasmine": "2.5.2" }, "dependencies": {