GithubHelp home page GithubHelp logo

twbs / grunt-bootlint Goto Github PK

View Code? Open in Web Editor NEW
64.0 10.0 27.0 753 KB

A Grunt wrapper for Bootlint, the HTML linter for Bootstrap projects

Home Page: https://www.npmjs.com/package/grunt-bootlint

License: MIT License

JavaScript 100.00%

grunt-bootlint's Issues

Can't seem to lint pages via http

I'm trying to lint a php page generated by WordPress, with the following code:

bootlint: {  
    options: {  
        stoponerror: false,
        relaxerror: []
    },
    files: ["http://local.dev/"],
    }

I'm removing the doctype from the document at that URL so that it should trigger a Bootlint error, but all I get is "no Bootlint errors" so I don't believe that the page is actually getting scanned. When I point at a sample page that's mapped via the file system (i.e. files: ["path/file.php"]) then Bootlint does trigger errors as expected.

Since I'm using a CMS only linting the rendered pages make sense. (Sorry for having misfiled this earlier under the main bootlint project instead of here, and thanks for doing this!)

Tweak description?

Could you tweak the description in package.json so that it mentions grunt?
Right now the description is exactly the same as that of Bootlint itself (except for "An "), which is slightly confusing.

Stop on error

Provide option to stop linting on first error found.

option: stoponwarning

Add more granular controls for task failure on (non-relaxed) warnings and errors.

For example:

  • (stoponerror && stoponwarning == false): Only fail the task on errors.
  • (stoponerror && stoponwarning): Fail the task on any error or warning.

This is sort of breaking behavior for stoponerror.

Ignore templating code

<div class="row">
  <div class="col-xs-11"></div>
  <% if (condition) { %>
    <div class="col-xs-1"></div>
  <% } %>
</div>

This code raises errors E013 and E014 and I don't want to relax those errors on the entire project.
Is it possible to have bootlint ignore templating code?

Should fail on error

Right now it logs out the error as a warning, but doesn't cause a failure.

Might want to make that an option to toggle on or off.

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.