From b6f7406e781ae166ca789d02f3ec69e49e6ab76e Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Thu, 9 May 2019 15:39:19 -0500 Subject: [PATCH] Add linting to CI --- .travis.yml | 2 ++ package.json | 3 ++- test/.eslintrc | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9ace743..4b9a2a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -77,6 +77,8 @@ install: - npm install --build-from-source script: +- npm run lint + # Tests are disabled until we have tests which are suitable for CI and don't require manual interaction. # - npm test - echo "Skipping tests on CI, as they currently require manual interaction." diff --git a/package.json b/package.json index b53b8b6..98368ee 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "scripts": { "install": "prebuild-install || node-gyp rebuild", "prepublishOnly": "npm run validate", - "validate": "eslint **/*.js && npm test", + "lint": "eslint **/*.js", + "validate": "npm run lint && npm test", "test": "jasmine ./test/test.js", "prebuild": "prebuild --all --strip --verbose", "rebuild": "node-gyp rebuild" diff --git a/test/.eslintrc b/test/.eslintrc index 2fadf06..50a3f63 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -4,6 +4,9 @@ "es6": true, "jasmine": true }, + "parserOptions": { + "ecmaVersion": 2018 + }, "rules": { "no-console": 0, }