mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-30 17:04:14 +00:00
20debba3b0
The resulting code style in this file is a little mixed. I tried to stick to the existing style. Most notably is the indention with 2 spaces instead of 1 tab. But I couldn't disable the spaces inside round brackets. They make the code so much more readable. What this patch effectively does is enabling the eslint check for our custom code in this addon, excluding all old code, and exclusing a few rules that conflict to heavily with the old code style. Change-Id: I12f953cb0a6fd35e405b6cc348abfb2c11e70696
37 lines
701 B
JavaScript
37 lines
701 B
JavaScript
'use strict';
|
|
|
|
module.exports = function ( grunt ) {
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
options: {
|
|
cache: true,
|
|
fix: grunt.option( 'fix' )
|
|
},
|
|
all: [
|
|
'**/*.{js,json}',
|
|
'!resources/lib/**',
|
|
'!{vendor,node_modules}/**'
|
|
]
|
|
},
|
|
stylelint: {
|
|
all: [
|
|
'**/*.{css,less}',
|
|
'!resources/lib/**',
|
|
'!node_modules/**',
|
|
'!vendor/**',
|
|
'resources/lib/codemirror-fixes.less'
|
|
]
|
|
},
|
|
banana: {
|
|
all: 'i18n/'
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|