GitXplorerGitXplorer
t

grunt-bootlint

public
66 stars
22 forks
0 issues

Commits

List of commits on branch master.
Verified
c103178403836e34c6426c91be872dd5ddf16fcd

Bump grunt from 1.0.4 to 1.3.0 (#70)

ddependabot[bot] committed 3 years ago
Verified
faffd695934dd70413085ee837f9a69f0ceff6de

Bump path-parse from 1.0.6 to 1.0.7 (#72)

ddependabot[bot] committed 3 years ago
Verified
a69ff99a81130a3a33ed42c6b48366ec34ac9f22

Bump hosted-git-info from 2.8.8 to 2.8.9 (#71)

ddependabot[bot] committed 3 years ago
Verified
cca89d24682655b504d6de29a565a6a844a644ee

Bump lodash from 4.17.19 to 4.17.21 (#69)

ddependabot[bot] committed 3 years ago
Verified
c7db4afaf2474f695a9dc957547842063589a16e

Bump y18n from 4.0.0 to 4.0.1 (#68)

ddependabot[bot] committed 3 years ago
Verified
dabb89bdb57ef623798c5380aba5f901886271d5

Bump lodash from 4.17.15 to 4.17.19 (#67)

ddependabot[bot] committed 4 years ago

README

The README file for this repository.

grunt-bootlint

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

NPM version Build Status MIT License Dependency Status devDependency Status

Getting Started

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-bootlint --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-bootlint');

The "bootlint" task

Overview

In your project's Gruntfile, add a section named bootlint to the data object passed into grunt.initConfig().

grunt.initConfig({
  bootlint: {
    options: {
      stoponerror: false,
      relaxerror: []
    },
    files: ['path/to/file.html', 'path/to/*.html']
  }
});

Options

Usage Examples

Default Options

In this example, the default options are used to lint files for common problems in bootstrap.

grunt.initConfig({
  bootlint: {
    options: {
      relaxerror: [],
      showallerrors: false,
      stoponerror: false,
      stoponwarning: false
    },
    files: ['test/fixtures/*.html']
  }
});

Settings

options.stoponerror

  • Type: Boolean
  • Default: false

Breaks out of grunt task on first error problem ID. Use --force to force continue.

options.stoponwarning

  • Type: Boolean
  • Default: false

Breaks out of grunt task on first warning problem ID. Use --force to force continue.

options.showallerrors

  • Type: Boolean
  • Default: false

Shows all errors and warnings before stopping the task. (Overrides stoponerror and stoponwarning, above.)

options.relaxerror

  • Type: Array | Object
  • Default: []

Array of bootlint problem ID codes (Strings) to explicitly ignore.

Object of bootlint problem ID codes as keys and filepath globs as array value.

Example
relaxerror: {
  'E001': [],
  'W005': [
    'path/to/file.html',
    'file/path/*.glob'
  ]
},

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 2016-04-05 - v0.10.1: Updates for Grunt 1.0.0 compatibility and adds pluralize for files/errors.
  • 2015-11-24 - v0.10.0: Updates Bootlint to v0.14.1 and adds the ability to ignore lint problems on a per-file basis using relaxerror.
  • 2015-06-01 - v0.9.1: Minor update to license metadata.
  • 2015-03-16 - v0.9.0: Updates Bootlint to v0.12.0
  • 2015-02-25 - v0.8.0: Updates Bootlint to v0.11.0
  • 2015-01-23 - v0.7.0: Updates Bootlint to v0.10.0
  • 2014-12-23 - v0.6.0: Updates Bootlint to v0.9.1
  • 2014-11-12 - v0.5.3: Fixes issue with stoponerror option
  • 2014-11-12 - v0.5.2: Fixes issue with stoponerror option This was a bad release. Please upgrade.
  • 2014-11-10 - v0.5.1: Displays message when files pass
  • 2014-11-10 - v0.5.0: Updates Bootlint, adds line/col numbers to output, quieter output.
  • 2014-11-03 - v0.4.0: Updates Bootlint dependency.
  • 2014-10-17 - v0.3.0: Basic support for Bootlint 0.5.0. Changes relaxerror to use Bootlint problem IDs
  • 2014-09-25 - v0.2.1: Removes color dependency.
  • 2014-09-25 - v0.2.0: First formal release.

License and copyright

Code released under the MIT license.