Add some lint checks.

This commit is contained in:
Alexis Lahouze 2016-02-01 21:56:49 +01:00
parent 601f6aeec3
commit 5ad6733b6a
5 changed files with 51 additions and 14 deletions

View File

@ -38,14 +38,24 @@ module.exports = function(grunt) {
'wiredep:app', 'wiredep:app',
]); ]);
grunt.registerTask('pydev', [
'newer:flake8'
]);
grunt.registerTask('jsdev', [ grunt.registerTask('jsdev', [
'newer:jshint', 'newer:jshint',
'newer:jscs' 'newer:jscs'
]); ]);
grunt.registerTask('htmldev', [
'newer:htmllint'
]);
grunt.registerTask('dev', [ grunt.registerTask('dev', [
'dependencies', 'dependencies',
'jsdev' 'pydev',
'jsdev',
'htmldev'
]); ]);
grunt.registerTask('serve', [ grunt.registerTask('serve', [

5
grunt-config/flake8.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
src: [
'accountant/**/*.py'
]
}

9
grunt-config/htmllint.js Normal file
View File

@ -0,0 +1,9 @@
module.exports = {
frontend: {
options: {},
src: [
'accountant/frontend/templates/**/*.html',
'accountant/frontend/static/templates/**/*.html'
]
}
}

View File

@ -5,7 +5,18 @@ module.exports = {
}, },
js: { js: {
files: '<%= paths.frontend_js %>', files: '<%= paths.frontend_js %>',
tasks: ['devjs'] tasks: ['jsdev']
},
py: {
files: 'accountant/**/*.py',
tasks: ['pydev']
},
html: {
files: [
'accountant/frontend/templates/**/*.html',
'accountant/frontend/static/templates/**/*.html'
],
tasks: ['htmldev']
}, },
gruntfile: { gruntfile: {
files: ['Gruntfile.js'] files: ['Gruntfile.js']

View File

@ -4,20 +4,22 @@
"repository": "https://git.lahouze.org/xals/accountant", "repository": "https://git.lahouze.org/xals/accountant",
"license": "AGPL-1.0", "license": "AGPL-1.0",
"devDependencies": { "devDependencies": {
"grunt": "0.4.5", "grunt": "^0.4.5",
"grunt-bg-shell": "^2.3.1", "grunt-bg-shell": "^2.3.1",
"grunt-contrib-clean": "0.6.0", "grunt-contrib-clean": "^0.7.0",
"grunt-contrib-concat": "0.5.1", "grunt-contrib-concat": "^0.5.1",
"grunt-contrib-jshint": "0.11.2", "grunt-contrib-jshint": "^0.12",
"grunt-contrib-watch": "0.6.1", "grunt-contrib-watch": "^0.6.1",
"grunt-copy": "0.1.0", "grunt-copy": "^0.1.0",
"grunt-jscs": "^2.6.0", "grunt-flake8": "^0.1.3",
"grunt-htmllint": "^0.2.7",
"grunt-jscs": "^2.7.0",
"grunt-newer": "^1.1.1", "grunt-newer": "^1.1.1",
"grunt-shell": "1.1.2", "grunt-shell": "^1.1.2",
"grunt-wiredep": "^2.0.0", "grunt-wiredep": "^2.0.0",
"jshint-stylish": "2.0.0", "jshint-stylish": "^2.1.0",
"load-grunt-configs": "0.4.3", "load-grunt-configs": "^0.4.3",
"load-grunt-tasks": "3.2.0", "load-grunt-tasks": "^3.2.0",
"time-grunt": "1.2.1" "time-grunt": "^1.3.0"
} }
} }