diff --git a/ocw-ui/frontend/.jscsrc b/ocw-ui/frontend/.jscsrc new file mode 100644 index 00000000..cb61269e --- /dev/null +++ b/ocw-ui/frontend/.jscsrc @@ -0,0 +1,17 @@ +{ + "disallowTrailingWhitespace": true, + "disallowUnusedParams": true, + "disallowUnusedVariables": true, + "requireCapitalizedComments": true, + "requireCurlyBraces": true, + "requireDotNotation": true, + "requireLineFeedAtFileEnd": true, + "requireSemicolons": true, + "requireSpaceAfterComma": true, + "requireSpaceAfterLineComment": true, + "requireSpaceBetweenArguments": true, + "requireSpacesInConditionalExpression": true, + "requireTemplateStrings": true, + "requireYodaConditions": true, + "validateQuoteMarks": "'" +} diff --git a/ocw-ui/frontend/Gruntfile.js b/ocw-ui/frontend/Gruntfile.js index a58f7628..43757c87 100644 --- a/ocw-ui/frontend/Gruntfile.js +++ b/ocw-ui/frontend/Gruntfile.js @@ -132,6 +132,14 @@ module.exports = function (grunt) { } }, + // Supplements jshint with a focus on style. + jscs: { + src: '<%= yeoman.app %>/scripts/{,*/}*.js', + options: { + config: ".jscsrc", + fix: false + } + }, // Empties folders to start fresh clean: { dist: { @@ -408,6 +416,7 @@ module.exports = function (grunt) { grunt.registerTask('default', [ 'newer:jshint', + 'jscs', 'test', 'build' ]); diff --git a/ocw-ui/frontend/app/views/modelselect.html b/ocw-ui/frontend/app/views/modelselect.html index 9bc128f1..6c6f8bac 100644 --- a/ocw-ui/frontend/app/views/modelselect.html +++ b/ocw-ui/frontend/app/views/modelselect.html @@ -54,7 +54,7 @@
-
+