mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
synced 2024-09-23 10:20:21 +00:00
build: Replace jshint/jsonlint with eslint
Bug: T195542 Change-Id: I9fc04c658a8d593abc6d272b0f49809c60ec791a
This commit is contained in:
parent
b77c7e6974
commit
7b24e036ed
11
.eslintrc.json
Normal file
11
.eslintrc.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"root": true,
|
||||||
|
"extends": [
|
||||||
|
"wikimedia/client",
|
||||||
|
"wikimedia/jquery"
|
||||||
|
],
|
||||||
|
"globals": {
|
||||||
|
"mw": false,
|
||||||
|
"OO": false
|
||||||
|
}
|
||||||
|
}
|
15
Gruntfile.js
15
Gruntfile.js
|
@ -1,21 +1,24 @@
|
||||||
/* eslint-env node, es6 */
|
/* eslint-env node, es6 */
|
||||||
module.exports = function ( grunt ) {
|
module.exports = function ( grunt ) {
|
||||||
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
var conf = grunt.file.readJSON( 'extension.json' );
|
||||||
|
|
||||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||||
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
||||||
|
|
||||||
grunt.initConfig( {
|
grunt.initConfig( {
|
||||||
banana: {
|
banana: conf.MessagesDirs,
|
||||||
all: 'i18n/'
|
eslint: {
|
||||||
|
options: {
|
||||||
|
extensions: [ '.js', '.json' ]
|
||||||
},
|
},
|
||||||
jsonlint: {
|
|
||||||
all: [
|
all: [
|
||||||
'**/*.json',
|
'**/*.js{,on}',
|
||||||
'!node_modules/**',
|
'!node_modules/**',
|
||||||
'!vendor/**'
|
'!vendor/**'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
|
grunt.registerTask( 'test', [ 'eslint', 'banana' ] );
|
||||||
grunt.registerTask( 'default', 'test' );
|
grunt.registerTask( 'default', 'test' );
|
||||||
};
|
};
|
||||||
|
|
1084
package-lock.json
generated
1084
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -4,8 +4,9 @@
|
||||||
"test": "grunt test"
|
"test": "grunt test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"eslint-config-wikimedia": "0.15.0",
|
||||||
"grunt": "1.0.4",
|
"grunt": "1.0.4",
|
||||||
"grunt-banana-checker": "0.8.1",
|
"grunt-banana-checker": "0.8.1",
|
||||||
"grunt-jsonlint": "1.1.0"
|
"grunt-eslint": "22.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue