forked from wikimedia/mediawiki-extensions-Wikibase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
52 lines (49 loc) · 1.08 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* eslint-env node */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
cache: true,
fix: grunt.option( 'fix' )
},
all: [ '.' ]
},
stylelint: {
all: [
'**/*.{css,less}',
'!view/resources/jquery/ui/**',
'!view/lib/**',
'!node_modules/**',
'!vendor/**',
'!extensions/**',
'!client/data-bridge/**',
'!docs/**',
'!lib/resources/wikibase-api/**',
'!repo/rest-api/**'
]
},
banana: {
options: {
disallowDuplicateTranslations: false,
disallowUnusedTranslations: false,
requireLowerCase: false
},
all: [
'client/i18n/',
'client/i18n/api/',
'lib/i18n/',
'repo/i18n/',
'repo/i18n/api/'
]
}
} );
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
grunt.registerTask( 'fix', function () {
grunt.config.set( 'eslint.options.fix', true );
grunt.task.run( 'eslint' );
} );
grunt.registerTask( 'default', 'test' );
};