gulp-dev-tasks
v1.4.2
Published
Collection of Gulp tasks for development and linting with Airbnb's ESLint config
Downloads
61
Readme
gulp-dev-tasks
Collection of Gulp tasks for development and linting with Airbnb's ESLint config.
Installation
npm install gulp-dev-tasks --dev-save
Usage
Include the package in your gulpfile.js
, for example like this:
const gulp = require('gulp');
const gdt = require('gulp-dev-tasks');
gdt.setCommand('query-api.js');
gdt.setRules({
'new-cap': [2, {'capIsNewExceptions': ['express.Router']}]
});
gulp.task('default', ['dev']);
Tasks
The following gulp tasks are provided:
lint
Lints all js and jsx files in your project, using the linting config as provided by eslint-config-airbnb
.
lint:fix
Tries to autofix linting errors and warnings where possible.
lint:watch
Watches your project and will lint when code changes.
dev
Runs an executable command, and reruns it when code changes.
Setup
The following functions are provided for configuration.
setCommand(command)
Set the command to be executed by the dev
task.
setRules(rules)
Set linting rules to overwrite the ones provided by eslint-config-airbnb
.