From 82d4b4df84b51f9402cc520a0c6e1fc43383fb09 Mon Sep 17 00:00:00 2001 From: Gabriel Le Breton Date: Fri, 27 Jul 2018 09:51:33 -0400 Subject: [PATCH 1/4] Add travis support for smart-app-banner (it's about time) --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..060d12a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - "node" + - "lts/*" + - "8" + - "7" + - "6" +script: + - npm run build + - npm run lint + From 16e09f7e173622efa5e8eeafe0eb1fd3e789ef8c Mon Sep 17 00:00:00 2001 From: Gabriel Le Breton Date: Fri, 27 Jul 2018 09:53:43 -0400 Subject: [PATCH 2/4] Add eslint dev dependency --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ccb834f..bed2ffa 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ }, "devDependencies": { "browserify": "^16.2.2", - "closurecompiler": "^1.6.1" + "closurecompiler": "^1.6.1", + "eslint": "^5.2.0" } } From b322b66a76e3741ec6ce3be031f127694d371060 Mon Sep 17 00:00:00 2001 From: Gabriel Le Breton Date: Fri, 27 Jul 2018 09:58:02 -0400 Subject: [PATCH 3/4] Add eslint to dev commands --- README.md | 2 ++ package.json | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e4762e..04a060b 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,8 @@ The following commands are available for compiling the project: | ------- | ------ | | `npm install` | Installs the required dependencies | | `npm run build` | Builds the application JavaScript. | +| `npm run lint` | Check for linter error. | +| `npm run eslint -- --fix index.js` | Fix linter error automatically. | ## See also diff --git a/package.json b/package.json index bed2ffa..52bf571 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "build": "browserify index.js -s SmartBanner | ccjs - > dist/smart-app-banner.js", - "lint": "eslint index.js" + "lint": "eslint index.js", + "eslint": "eslint" }, "repository": { "type": "git", From daebbb00f1e20dd963fb111ad8aaf54ffd739a38 Mon Sep 17 00:00:00 2001 From: Gabriel Le Breton Date: Fri, 27 Jul 2018 09:58:20 -0400 Subject: [PATCH 4/4] Fix linter error (used automatic fix from eslint) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /home/travis/build/GabLeRoux/smart-app-banner/index.js 21:98 error Strings must use singlequote quotes ✖ 1 problem (1 error, 0 warnings) 1 error and 0 warnings potentially fixable with the `--fix` option. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 95f9f0b..1022c2f 100644 --- a/index.js +++ b/index.js @@ -18,7 +18,7 @@ var mixins = { appMeta: 'apple-itunes-app', iconRels: ['apple-touch-icon-precomposed', 'apple-touch-icon'], getStoreLink: function () { - return 'https://itunes.apple.com/' + this.options.appStoreLanguage + '/app/id' + this.appId + "?mt=8"; + return 'https://itunes.apple.com/' + this.options.appStoreLanguage + '/app/id' + this.appId + '?mt=8'; } }, android: {