build: Replace jscs, jshint and jsonlint by eslint
Bug: T210365 Change-Id: I184e594a3be8010c9c6561b2b66e5596905a40fe
This commit is contained in:
parent
30eace5dec
commit
3b8629ad9b
6 changed files with 763 additions and 1734 deletions
10
.eslintrc.json
Normal file
10
.eslintrc.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"root": true,
|
||||||
|
"extends": [
|
||||||
|
"wikimedia/client",
|
||||||
|
"wikimedia/jquery"
|
||||||
|
],
|
||||||
|
"globals": {
|
||||||
|
"mw": false
|
||||||
|
}
|
||||||
|
}
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
/composer.lock
|
/composer.lock
|
||||||
/vendor/
|
/vendor/
|
||||||
|
/.eslintcache
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
node_modules
|
|
||||||
vendor
|
|
20
Gruntfile.js
20
Gruntfile.js
|
@ -1,29 +1,27 @@
|
||||||
/*jshint node:true */
|
/* eslint-env node, es6 */
|
||||||
module.exports = function ( grunt ) {
|
module.exports = function ( grunt ) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
||||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||||
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
||||||
|
|
||||||
grunt.initConfig( {
|
grunt.initConfig( {
|
||||||
jshint: {
|
|
||||||
all: [
|
|
||||||
'*.js'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
banana: {
|
banana: {
|
||||||
all: 'i18n'
|
all: 'i18n'
|
||||||
},
|
},
|
||||||
jsonlint: {
|
eslint: {
|
||||||
|
options: {
|
||||||
|
extensions: [ '.js', '.json' ],
|
||||||
|
cache: true
|
||||||
|
},
|
||||||
all: [
|
all: [
|
||||||
'**/*.json',
|
'**/*.{js,json}',
|
||||||
'!node_modules/**',
|
'!node_modules/**',
|
||||||
'!vendor/**'
|
'!vendor/**'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
|
grunt.registerTask( 'test', [ 'eslint', 'banana' ] );
|
||||||
grunt.registerTask( 'default', 'test' );
|
grunt.registerTask( 'default', 'test' );
|
||||||
};
|
};
|
||||||
|
|
2459
package-lock.json
generated
2459
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -4,10 +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-contrib-jshint": "0.11.3",
|
"grunt-eslint": "22.0.0"
|
||||||
"grunt-jscs": "2.5.0",
|
|
||||||
"grunt-jsonlint": "1.0.7"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue