Commit b05776f6 authored by Daniel Gerhardt's avatar Daniel Gerhardt

Add Gruntfile for code style checking and linting

parent effae6c0
......@@ -12,6 +12,6 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.yml]
[{*.yml,package.json}]
indent_size = 2
indent_style = space
......@@ -5,6 +5,7 @@
target/*
.sonar
.sass-cache
node_modules/
# Output files
src/main/webapp/.sencha_backup
......
/* jshint browser: false, node: true */
"use strict";
module.exports = function (grunt) {
require("time-grunt")(grunt);
/* Files matching the following patterns will be checked by JSHint and JSCS */
var lintJs = [
"Gruntfile.js",
"src/main/webapp/app/**/*.js",
"!src/main/webapp/app/utils/Ext.*.js"
];
grunt.initConfig({
jscs: {
src: lintJs,
options: {
config: ".jscs.json"
}
},
jshint: {
src: lintJs,
options: {
jshintrc: ".jshintrc"
}
}
});
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-jscs");
grunt.registerTask("lint", ["jscs", "jshint"]);
grunt.registerTask("default", ["lint"]);
};
{
"name": "arsnova-mobile",
"license": "LGPL-3.0+",
"repository": {
"type": "git",
"url": "https://github.com/thm-projects/arsnova-mobile.git"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.11",
"grunt-jscs": "^1.2",
"time-grunt": "^1.0"
},
"private": 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