From 9f1c8c3becf91efb825076c52dc21733e6872781 Mon Sep 17 00:00:00 2001 From: Kunal Nagar Date: Mon, 10 Jun 2019 04:37:17 +0530 Subject: [PATCH] Updates to ESLint - Add .eslintignore file - Add linting task to package.json - Include linting task in Travis build --- .eslintignore | 3 +++ .travis.yml | 3 ++- package.json | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..5c743e69 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +.eslintrc.js +Gruntfile.js +node_modules \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 2c706745..17af8c99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,8 @@ before_install: cache: npm: true script: -- npm run deploy + - npm run lint + - npm run deploy if: tag IS present deploy: provider: releases diff --git a/package.json b/package.json index 88acd6f2..7b4929e6 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "A simple way to encrypt and decrypt your files", "main": "main.js", "scripts": { + "lint": "./node_modules/.bin/eslint **/*.js --fix", "build-grunt": "./node_modules/.bin/grunt build", "build-mac-x64": "./node_modules/.bin/electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/icon.icns --prune=true --out=release-builds", "zip-mac-x64": "zip -r release-builds/encrypt0r-mac.zip release-builds/encrypt0r-darwin-x64",