Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.27 KB

README.md

File metadata and controls

42 lines (31 loc) · 1.27 KB

@easy-webpack/config-tslint

Lint TypeScript file using tslint and tslint-loader.

Installation

npm install --save-dev @easy-webpack/config-tslint

easy-webpack is also required.

Usage

// webpack.config.js
const generateConfig = require('@easy-webpack/core').generateConfig;

const baseConfig = { ... }; // project-specific config like the entry file

module.exports = generateConfig(
  baseConfig,

  require('@easy-webpack/config-tslint')
    ({ /* Options object */ exclude: /(node_modules|bower_components)/ })
);

// tslint.json
{
  "extends": "tslint-config-standard"
}

// This config will lint TypeScript files before compiling

Remember to add a tslint.json file on the root of your repository (where webpack.config.js is located).

Options

exclude

Type: (Array of) webpack exclude object Default: node_modules

Files to be excluded from tslint linting. Check webpack documentation on how to exclude files.

Related tutorials