forked from wikimedia/mediawiki-extensions-Wikibase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
60 lines (57 loc) · 1.28 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
53
54
55
56
57
58
59
60
/* eslint-env node */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
extensions: [ '.js', '.json' ],
cache: true,
fix: grunt.option( 'fix' )
},
all: [
'**/*.{js,json}',
'!view/resources/jquery/ui/**',
'!view/lib/**',
'!node_modules/**',
'!vendor/**',
'!extensions/**',
'!client/data-bridge/**',
'!lib/resources/wikibase-api/**'
]
},
stylelint: {
all: [
'**/*.{css,less}',
'!view/resources/jquery/ui/**',
'!view/lib/**',
'!node_modules/**',
'!vendor/**',
'!extensions/**',
'!client/data-bridge/**',
'!lib/resources/wikibase-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' );
};