From adfb1e488e3d1f465aeeb8b7308031547ec11e63 Mon Sep 17 00:00:00 2001 From: Patrick Lawler Date: Tue, 27 Mar 2018 11:33:46 -0400 Subject: [PATCH 1/2] add NO_LINT env option readme add disable lint --- README.md | 7 +++++++ webpack.config.js | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f55fbd2a4..6b9477de8 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,13 @@ $ npm run lint $ npm run lint.raw -- src/utils/matcher.js ``` +```sh +# Disable lint +$ NO_LINT=true npm run build.dev +# or +$ npm run build.dev -- --env.nolint +``` + ## Build Docs ```sh # Build JSDoc files to ./docs diff --git a/webpack.config.js b/webpack.config.js index 026df3888..4a904031d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -56,7 +56,7 @@ const t = function (messageName, substitutions) { const lintOnChange = function() { // @TODO: Why it fails on Windows? - if (process.argv.includes('--env.nolint') || + if ((process.argv.includes('--env.nolint') || process.env.NO_LINT) || process.platform === 'win32') { return; } @@ -71,7 +71,7 @@ const lintOnChange = function() { }; lintOnChange.prototype.apply = function(compiler) { - if (process.argv.includes('--env.prod') || process.argv.includes('--env.nolint')) { + if (process.argv.includes('--env.prod') || (process.argv.includes('--env.nolint') || process.env.NO_LINT)) { return; } compiler.plugin('emit', function(compilation, callback) { From 61649359ae5b623d527e492d8f26aa51866c847f Mon Sep 17 00:00:00 2001 From: Patrick Lawler Date: Tue, 27 Mar 2018 13:45:41 -0400 Subject: [PATCH 2/2] use npm ci(continuous integration) install command per npm 5.7.1 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 074422267..9e6b09a99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,11 @@ node_js: - "9" sudo: false +before_install: + - npm i -g npm + install: - - npm install --silent + - npm ci --silent script: - node ./tools/licenses/fetchLicenses.js