Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/grunt-bootlint.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2016-02-20 12:08:11 +0300
committerXhmikosR <xhmikosr@gmail.com>2016-03-07 11:25:53 +0300
commit48381abb95b421c9dabda6ceba96c0a6d498409f (patch)
tree7a7d4fcf7f15bee4d70022fb5847d1ef600dac06
parentf6c9fe442465f3f2e21b2d97b1c6b8c42bac3709 (diff)
Update devDependencies.
-rw-r--r--README.md1
-rw-r--r--package.json12
-rw-r--r--tasks/bootlint.js60
3 files changed, 37 insertions, 36 deletions
diff --git a/README.md b/README.md
index 307e763..51ee71c 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,6 @@
[![devDependency Status](https://img.shields.io/david/dev/twbs/grunt-bootlint.svg)](https://david-dm.org/twbs/grunt-bootlint#info=devDependencies)
## Getting Started
-This plugin requires Grunt `>=0.4.0`
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
diff --git a/package.json b/package.json
index add4699..bab98e4 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
"author": "Zac Echola <zac.echola@gmail.com>",
"repository": {
"type": "git",
- "url": "https://github.com/twbs/grunt-bootlint.git"
+ "url": "git+https://github.com/twbs/grunt-bootlint.git"
},
"bugs": {
"url": "https://github.com/twbs/grunt-bootlint/issues"
@@ -33,12 +33,12 @@
"micromatch": "^2.2.0"
},
"devDependencies": {
- "grunt": "~0.4.5",
- "grunt-contrib-clean": "^0.7.0",
- "grunt-contrib-jshint": "^0.11.0",
- "grunt-contrib-nodeunit": "^0.4.1"
+ "grunt": "^0.4.5",
+ "grunt-contrib-clean": "^1.0.0",
+ "grunt-contrib-jshint": "^1.0.0",
+ "grunt-contrib-nodeunit": "^1.0.0"
},
"peerDependencies": {
- "grunt": "~0.4.5"
+ "grunt": ">=0.4.5"
}
}
diff --git a/tasks/bootlint.js b/tasks/bootlint.js
index feeaf21..ae014d9 100644
--- a/tasks/bootlint.js
+++ b/tasks/bootlint.js
@@ -15,6 +15,7 @@ module.exports = function(grunt) {
grunt.registerMultiTask('bootlint', 'An HTML linter for Bootstrap projects', function() {
+
var options = this.options({
stoponerror: false,
stoponwarning: false,
@@ -25,6 +26,36 @@ module.exports = function(grunt) {
var totalErrCount = 0;
var totalFileCount = 0;
+ function getDisabledIdsForFilepath(filepath) {
+ // Relaxerror defined as array without filepaths
+ if (options.relaxerror instanceof Array) {
+ return options.relaxerror;
+ }
+
+ // Relaxerror as object with error IDs as keys and filepaths as values
+ var disabledIds = Object.keys(options.relaxerror);
+
+ // Lookup disabled IDs filepaths
+ var returnIds = disabledIds.filter(function(key) {
+ var paths = options.relaxerror[key];
+
+ // handle 'E001': true, 'E001': []
+ if (!(paths instanceof Array) || paths.length === 0) {
+ return true;
+ }
+
+ // handle 'E001': ['*']
+ if (paths.indexOf('*') !== -1) {
+ return true;
+ }
+
+ // test filepath pattern
+ return micromatch.any(filepath, paths);
+ });
+
+ return returnIds;
+ }
+
// Iterate over all specified file groups.
this.files.forEach(function(f) {
@@ -89,34 +120,5 @@ module.exports = function(grunt) {
});
- function getDisabledIdsForFilepath(filepath) {
- // Relaxerror defined as array without filepaths
- if (options.relaxerror instanceof Array) {
- return options.relaxerror;
- }
-
- // Relaxerror as object with error IDs as keys and filepaths as values
- var disabledIds = Object.keys(options.relaxerror);
-
- // Lookup disabled IDs filepaths
- var returnIds = disabledIds.filter(function(key) {
- var paths = options.relaxerror[key];
-
- // handle 'E001': true, 'E001': []
- if (!(paths instanceof Array) || paths.length === 0) {
- return true;
- }
-
- // handle 'E001': ['*']
- if (paths.indexOf('*') !== -1) {
- return true;
- }
-
- // test filepath pattern
- return micromatch.any(filepath, paths);
- });
-
- return returnIds;
- }
});
};