Merge "build: Switch from JSHint to ESLint"

isekai
jenkins-bot 8 years ago committed by Gerrit Code Review
commit 27b5a59317

@ -0,0 +1,2 @@
/vendor
/resources/libraries

@ -0,0 +1,12 @@
{
"extends": "wikimedia",
"env": {
"browser": true,
"jquery": true
},
"rules": {
"no-unused-vars": 0,
"quotes": 0,
"space-before-function-paren": 0
}
}

@ -1,3 +0,0 @@
node_modules/**
vendor/**
resources/libraries/**

@ -1,17 +1,13 @@
/*jshint node:true */
/* eslint-env node */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
jshint: {
all: [
'**/*.js',
'!node_modules/**',
'!vendor/**'
]
eslint: {
all: '.'
},
banana: {
all: 'i18n/'
@ -35,6 +31,6 @@ module.exports = function ( grunt ) {
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana', 'stylelint' ] );
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 'stylelint' ] );
grunt.registerTask( 'default', 'test' );
};

@ -4,9 +4,10 @@
"test": "grunt test"
},
"devDependencies": {
"eslint-config-wikimedia": "0.4.0",
"grunt": "1.0.1",
"grunt-banana-checker": "0.6.0",
"grunt-contrib-jshint": "1.1.0",
"grunt-eslint": "20.0.0",
"grunt-jsonlint": "1.1.0",
"grunt-stylelint": "0.7.0",
"stylelint": "7.8.0",

Loading…
Cancel
Save