Browse Source

Merge pull request #436 from twbs/jscs

Add JSCS support
pull/437/head
XhmikosR 11 years ago
parent
commit
e9bad869d3
  1. 17
      Gruntfile.js
  2. 1
      dist/js/ratchet.js
  3. 2
      docs/assets/css/docs.min.css
  4. 1
      docs/dist/js/ratchet.js
  5. 26
      js/.jscsrc
  6. 7
      js/.jshintrc
  7. 1
      package.json

17
Gruntfile.js

@ -186,6 +186,21 @@ module.exports = function(grunt) {
}
},
jscs: {
options: {
config: 'js/.jscsrc'
},
grunt: {
src: '<%= jshint.grunt.src %>'
},
src: {
src: '<%= jshint.src.src %>'
},
docs: {
src: '<%= jshint.docs.src %>'
}
},
csslint: {
options: {
csslintrc: 'sass/.csslintrc'
@ -243,7 +258,7 @@ module.exports = function(grunt) {
grunt.registerTask('validate-html', ['jekyll', 'validation']);
grunt.registerTask('build', ['dist']);
grunt.registerTask('default', ['dist']);
grunt.registerTask('test', ['dist', 'jshint', 'validate-html']);
grunt.registerTask('test', ['dist', 'jshint', 'jscs', 'validate-html']);
// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z

1
dist/js/ratchet.js vendored

@ -670,6 +670,7 @@
window.addEventListener('click', function (e) { if (getTarget(e.target)) {e.preventDefault();} });
}());
/* ----------------------------------
* SLIDER v2.0.1
* Licensed under The MIT License

2
docs/assets/css/docs.min.css vendored

File diff suppressed because one or more lines are too long

1
docs/dist/js/ratchet.js vendored

@ -670,6 +670,7 @@
window.addEventListener('click', function (e) { if (getTarget(e.target)) {e.preventDefault();} });
}());
/* ----------------------------------
* SLIDER v2.0.1
* Licensed under The MIT License

26
js/.jscsrc

@ -0,0 +1,26 @@
{
"disallowEmptyBlocks": true,
"disallowKeywords": ["with"],
"disallowLeftStickedOperators": ["?", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch", "case", "default"],
"requireLeftStickedOperators": [","],
"requireLineFeedAtFileEnd": true,
"requireParenthesesAroundIIFE": true,
"requireRightStickedOperators": ["!"],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"validateIndentation": 2,
"validateLineBreaks": "LF",
"validateQuoteMarks": "'"
}

7
js/.jshintrc

@ -1,22 +1,15 @@
{
"bitwise" : true,
"browser" : true,
"camelcase" : true,
"curly" : true,
"devel" : true,
"eqeqeq" : true,
"eqnull" : true,
"expr" : true,
"forin" : true,
"freeze" : true,
"immed" : true,
"indent" : 2,
"latedef" : true,
"newcap" : true,
"nonbsp" : true,
"quotmark" : "single",
"strict" : true,
"trailing" : true,
"undef" : true,
"unused" : true
}

1
package.json

@ -39,6 +39,7 @@
"grunt-csscomb": "~2.0.1",
"grunt-html-validation": "~0.1.13",
"grunt-jekyll": "~0.4.1",
"grunt-jscs-checker": "~0.4.0",
"grunt-sed": "~0.1.1",
"load-grunt-tasks": "~0.4.0"
}

Loading…
Cancel
Save