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 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) {