Skip to content

Commit

Permalink
Add bootlint task.
Browse files Browse the repository at this point in the history
  • Loading branch information
albertosantini committed Oct 28, 2014
1 parent 7df1906 commit 60d234a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"env": {
"node": true
},

"rules": {
"block-scoped-var": 1,
"brace-style": [1, "1tbs"],
"curly": [1, "all"],
"eqeqeq": 1,
"func-style": [1, "declaration"],
"guard-for-in": 1,
"max-len": [1, "80", "4"],
"no-caller": 1,
"no-empty": 1,
"no-bitwise": 1,
"no-plusplus": 1,
"no-space-before-semi": 1,
"no-spaced-func": 1,
"no-undef": 1,
"no-use-before-define": 1,
"no-unused-vars": [1, "all"],
"one-var": 0,
"quotes": [1, "double"],
"space-in-brackets": [1, "never"],
"wrap-iife": 1
}
}
16 changes: 15 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,26 @@ module.exports = function (grunt) {
"_site/*.html"
]
}
},

bootlint: {
options: {
stoponerror: false,
relaxerror: [
"W005" // Found what might be an outdated version of jQuery;
]
},
files: [
"_site/*.html"
]
}
});

grunt.loadNpmTasks("grunt-html-validation");
grunt.loadNpmTasks("grunt-bootlint");

grunt.registerTask("default", [
"validation"
"validation",
"bootlint"
]);
};
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

</div>

<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

<script src="./assets/js/jquery.fortune-0.8.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Associazione Poltronieri",
"main": "Gruntfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"Associazione",
Expand All @@ -15,6 +15,7 @@
"homepage": "http://www.associazionepoltronieri.org",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-bootlint": "^0.3.0",
"grunt-html-validation": "^0.1.18"
}
}

0 comments on commit 60d234a

Please sign in to comment.