tslint-loader
Tslint loader for Webpack.
Installation
npm install tslint tslint-loader --save-dev
The package depends on Tslint 4.0+, no longer works with 3.* versions.
Usage
Apply the tslint loader as preLoader in your webpack configuration.
Webpack 2
module.exports = {
module: {
rules: [
{
test: /\.ts$/,
enforce: 'pre',
loader: 'tslint-loader',
options: { }
}
]
}
}
Webpack 1
module.exports = {
module: {
preLoaders: [
{
test: /\.ts$/,
loader: 'tslint-loader'
}
]
},
tslint: { }
}
Loader options
{
configuration: {
rules: {
quotemark: [true, 'double']
}
},
configFile: false,
emitErrors: false,
failOnHint: true,
typeCheck: false,
fix: false,
tsConfigFile: 'tsconfig.json',
formatter: 'yourformatter',
formattersDirectory: 'node_modules/tslint-loader/formatters/',
fileOutput: {
dir: './foo/',
ext: 'xml',
clean: true,
header: '<?xml version="1.0" encoding="utf-8"?>\n<checkstyle version="5.7">',
footer: '</checkstyle>'
}
}
License
MIT