Aurelia Template Lint Webpack Loader
raw JSON → 1.0.1 verified Fri May 01 auth: no javascript
Webpack loader to lint Aurelia HTML templates using aurelia-template-lint. Version 1.0.1 is the latest stable release. It runs as a pre/post-loader to catch template errors during bundling. Accepts optional configuration like emitErrors, failOnHint, typeChecking, and fileGlob. Differentiators: integrates Aurelia template linting directly into webpack build pipeline. Low maintenance frequency.
Common errors
error failOnHint doesn't log errors ↓
cause The loader does not output lint errors to console when failOnHint is true.
fix
Update to version 1.0.1 which fixes this issue, or manually check build output.
Warnings
gotcha The loader is designed for webpack v1 with preLoaders; for webpack v2+ use 'enforce: pre' in rules. ↓
fix Use module.rules with enforce: 'pre' instead of preLoaders.
Install
npm install aurelia-template-lint-loader yarn add aurelia-template-lint-loader pnpm add aurelia-template-lint-loader Imports
- Loader configuration entry wrong
module.exports = { module: { rules: [{ test: /\.html$/, use: 'aurelia-template-lint-loader' }] } }correctmodule.exports = { module: { preLoaders: [{ test: /\.html$/, loader: 'aurelia-template-lint-loader' }] } }
Quickstart
// webpack.config.js
module.exports = {
module: {
preLoaders: [
{
test: /\.html$/,
loader: 'aurelia-template-lint-loader'
}
]
},
aureliaTemplateLinter: {
failOnHint: true,
emitErrors: false
}
};