Skip to content

Commit

Permalink
build: Replace jsonlint with eslint
Browse files Browse the repository at this point in the history
Bug: T220036
Change-Id: I0701a428dbdaa9faa9a39100ea924dc4f01b7c9a
  • Loading branch information
umherirrender committed Feb 21, 2021
1 parent 3c09663 commit 404e878
Show file tree
Hide file tree
Showing 5 changed files with 1,214 additions and 79 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"root": true,
"extends": [
"wikimedia/client"
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/composer.lock
/node_modules/
/vendor/
/.eslintcache
*~
*.kate-swp
.*.swp
16 changes: 10 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
/*jshint node:true */
/* eslint-env node, es6 */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-jsonlint' );
var conf = grunt.file.readJSON( 'extension.json' );

grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );

var conf = grunt.file.readJSON( 'extension.json' );
grunt.initConfig( {
banana: conf.MessagesDirs,
jsonlint: {
eslint: {
options: {
cache: true
},
all: [
'**/*.json',
'**/*.{js,json}',
'!node_modules/**',
'!vendor/**'
]
}
} );

grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'eslint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};
Loading

0 comments on commit 404e878

Please sign in to comment.