Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable ESLint #14

Merged
merged 2 commits into from Mar 27, 2018
Merged
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -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
@@ -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
@@ -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) {
ProTip! Use n and p to navigate between commits in a pull request.