0.1.1 • Published 6 years ago

lint-webpack-plugin v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

lint-webpack-plugin

npm Travis code style: prettier

A webpack plugin to run custom lint shell command

What's this?

lint-webpack-plugin is a simple script to run custom lint commands.

If it's build (webpack), it will run the commands before the webpack build starts. If there is any error occuring in the commands, the webpack process will stop.

If it's watch (webpack --watch), it will run the commands with the webpack build. Although there is any error, it will be ignored and the webpack process will continue to work.

Install

npm i --save-dev lint-webpack-plugin

How to use

An example webpack.config.js with TypeScript and Prettier:

const LintPlugin = require('lint-webpack-plugin');

module.exports = {
  ...

  plugins: [
    new LintPlugin([
      'tsc --noEmit',
      "prettier -l --parser=babylon \'src/**/*'"
    ])
  ]
};

Demo

Build

build

Watch

watch

Similar works

webpack-shell-plugin

If you want to run shell commands at more specific timings, please use webpack-shell-plugin.

License

MIT

0.1.1

6 years ago

0.1.0

6 years ago