mediawiki-extensions-Replac.../Gruntfile.js
libraryupgrader be197b8c57 build: Updating grunt to 1.3.0
* https://npmjs.com/advisories/577 (CVE-2018-3721)
* https://npmjs.com/advisories/745
* https://npmjs.com/advisories/782 (CVE-2018-16487)
* https://npmjs.com/advisories/788
* https://npmjs.com/advisories/813
* https://npmjs.com/advisories/1065 (CVE-2019-10744)
* https://npmjs.com/advisories/1523 (CVE-2019-10744)

Additional changes:
* Replaced "jakub-onderka" packages with "php-parallel-lint".
* Committed package-lock.json (T179229) too.
* Consolidated .phpcs.xml encoding to "UTF-8" (T200956).
* Dropped .php5 and .inc files from .phpcs.xml (T200956).
* Also sorted "composer fix" command to run phpcbf last.
* Added the "composer phan" command to conveniently run phan.
* Set `root: true` in .eslintrc.json (T206485).
* Enable eslint caching.

Change-Id: I226ec86e0b2ed01892047197f2cb7bb3f1ca9fa8
2021-01-02 20:02:56 +00:00

39 lines
736 B
JavaScript

/* eslint-env node */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
cache: true
},
all: '.'
},
stylelint: {
options: {
syntax: 'less'
},
all: [
'**/*.{css,less}',
'!vendor/**'
]
},
banana: conf.MessagesDirs,
jsonlint: {
all: [
'**/*.json',
'!node_modules/**',
'!vendor/**'
]
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};