Code Monkey home page Code Monkey logo

aurelia-template-lint-webpack-loader's Introduction

Aurelia Template Lint Loader for Webpack 2

Usage

Apply the aurelia-template-lint-webpack-loader in your webpack configuration, enforcing the rule as 'pre':

module.exports = {
  module: {
    rules: [{
      test: /\.html$/i,
      enforce: 'pre',
      include: [
        // where your aurelia templates are contained:
        path.resolve('src')
      ],
      use: [{
        loader: 'aurelia-template-lint-webpack-loader',
        options: {
          // you can pass an configuration class
          // config reference https://github.com/MeirionHughes/aurelia-template-lint#config
          configuration: options && options.config,

          // aurelia errors are displayed by default as warnings
          // set emitErrors to true to display them as errors
          emitErrors: false,

          // aurelia does not type check by default
          // if you want to do type checking set
          // typeChecking to true and provide
          // the right fileGlobs
          // reference https://github.com/MeirionHughes/aurelia-template-lint#static-type-checking
          // these settings can also be passed with configuration above
          typeChecking: true,
          reflectionOpts: {
            sourceFileGlob: './**/*.ts',
            typingsFileGlob: './**/*.d.ts',
          }
        }
      }]
    }]
  }
}

More options and configuration

Behind the scenes, the loader is using the following linter https://github.com/MeirionHughes/aurelia-template-lint

Installation

npm install aurelia-template-lint-loader --save-dev

License

This is a Webpack 2 + TypeScript fork of https://github.com/w3tecch/aurelia-template-lint-loader.

MIT (http://www.opensource.org/licenses/mit-license.php)

aurelia-template-lint-webpack-loader's People

Contributors

dweber019 avatar niieani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aurelia-template-lint-webpack-loader's Issues

Create webpack 4 release

Hi,

Is it possible the webpack 4 bits aren't on npm yet?
Would it be possible to publish a new release for that? Thanks in advance!

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Cache Typescript Definitions between each lint

Hi,

I added the linter to my project after upgrading to Webpack 4 (not that the webpack version is relevant to this). I noticed the addition of the linter would slow my npm start from 30 seconds all the way up to 9 minutes.

I chucked in some console logs after reading a bit of the code and noticed that the Typescript Definitions are being read from the file system and put in memory for each and every HTML file that was being linted. My project had 707 typescript files being loaded by the linter which makes this pretty intensive.

I think we could get a massive performance boost if we could somehow cache these definitions between calls to the loader, though I'm not sure how yet as I'm not accustomed with the loader API's.

I'm thinking along the lines of:

  1. Allow AureliaLinter to accept the definitions as an overloaded constructor, or exposed properties that can be set. This would allow the aurelia-template-lint-webpack-loader to provide these definitions and take on the responsibility of caching these. Would aim to make AureliaLinter backwards compatible with this change.
  2. Figure out how to cache the definitions between calls in aurelia-template-lint-webpack-loader. Ideally cache this as a promise so that we can possibly make these linting checks asynchronous in future?

Would like to hear your thoughts on this, or whether I should be looking at this from another perspective.

Edit: I am currently using aurelia-template-lint-webpack-loader v1.1.0, and have been using the linter for a while. It's extremely valuable!

An in-range update of semantic-release is breaking the build 🚨

Version 15.1.8 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.1.7
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v15.1.8

15.1.8 (2018-04-29)

Bug Fixes

  • package: update env-ci to version 2.0.0 (b9bd650)
Commits

The new version differs by 4 commits.

  • b9bd650 fix(package): update env-ci to version 2.0.0
  • 6e15c18 chore(package): update p-retry to version 2.0.0
  • 5af9031 docs: add details on NPM error 403 to troubleshooting doc
  • 218aa32 docs: add semantic-release-chrome to the list of community plugins

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.