Commit c1dae1e1 authored by Chris Rebert's avatar Chris Rebert

integrate JSCS

parent 351f86e1
...@@ -40,6 +40,21 @@ module.exports = function (grunt) { ...@@ -40,6 +40,21 @@ module.exports = function (grunt) {
} }
}, },
jscs: {
options: {
config: 'js/.jscs.json',
},
gruntfile: {
src: ['Gruntfile.js']
},
src: {
src: ['js/*.js']
},
test: {
src: ['js/tests/unit/*.js']
}
},
concat: { concat: {
options: { options: {
banner: '<%= banner %><%= jqueryCheck %>', banner: '<%= banner %><%= jqueryCheck %>',
...@@ -288,6 +303,7 @@ module.exports = function (grunt) { ...@@ -288,6 +303,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-html-validation'); grunt.loadNpmTasks('grunt-html-validation');
grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-jscs-checker');
grunt.loadNpmTasks('grunt-recess'); grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-saucelabs'); grunt.loadNpmTasks('grunt-saucelabs');
grunt.loadNpmTasks('grunt-sed'); grunt.loadNpmTasks('grunt-sed');
...@@ -296,7 +312,7 @@ module.exports = function (grunt) { ...@@ -296,7 +312,7 @@ module.exports = function (grunt) {
grunt.registerTask('validate-html', ['jekyll', 'validation']); grunt.registerTask('validate-html', ['jekyll', 'validation']);
// Test task. // Test task.
var testSubtasks = ['dist-css', 'jshint', 'qunit', 'validate-html']; var testSubtasks = ['dist-css', 'jshint', 'jscs', 'qunit', 'validate-html'];
// Only run Sauce Labs tests if there's a Sauce access key // Only run Sauce Labs tests if there's a Sauce access key
if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined') { if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined') {
testSubtasks.push('connect'); testSubtasks.push('connect');
......
{
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return"],
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireRightStickedOperators": ["!"],
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"disallowKeywords": ["with"],
"validateLineBreaks": "LF",
"requireLineFeedAtFileEnd": true
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment