Add grunt-jscs

Change-Id: I0213d16e4e1dc3819ae0a663b896033ca572a37d
This commit is contained in:
paladox
2015-09-21 17:20:16 +01:00
committed by Hashar
parent 9223417c9e
commit e623702647
3 changed files with 9 additions and 1 deletions

3
.jscsrc Normal file
View File

@@ -0,0 +1,3 @@
{
"preset": "wikimedia"
}

View File

@@ -4,6 +4,7 @@ module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.initConfig( { grunt.initConfig( {
jshint: { jshint: {
@@ -14,6 +15,9 @@ module.exports = function ( grunt ) {
'*.js' '*.js'
] ]
}, },
jscs: {
src: '<%= jshint.all %>'
},
banana: { banana: {
all: 'i18n/' all: 'i18n/'
}, },
@@ -25,6 +29,6 @@ module.exports = function ( grunt ) {
} }
} ); } );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' ); grunt.registerTask( 'default', 'test' );
}; };

View File

@@ -7,6 +7,7 @@
"grunt": "0.4.5", "grunt": "0.4.5",
"grunt-cli": "0.1.13", "grunt-cli": "0.1.13",
"grunt-contrib-jshint": "0.11.3", "grunt-contrib-jshint": "0.11.3",
"grunt-jscs": "2.1.0",
"grunt-banana-checker": "0.2.2", "grunt-banana-checker": "0.2.2",
"grunt-jsonlint": "1.0.4" "grunt-jsonlint": "1.0.4"
} }