@@ -23,7 +23,7 @@ module.exports = function (grunt) {
23
23
// in d3v4 and d3v5 pre-built d3.js are in different sub folders
24
24
const d3pkgSubDir = config . pkg . dependencies . d3 . split ( '.' ) [ 0 ] . replace ( / [ ^ \d ] / g, '' ) === '4' ? 'build' : 'dist' ;
25
25
26
- const lintableFiles = `'${ config . src } ' ' ${ config . spec } ' '*.js' 'grunt/*.js' '<%= conf.websrc %>/stock.js'` ;
26
+ const lintableFiles = `'${ config . spec } /**/*.js ' '*.js' 'grunt/*.js' '<%= conf.websrc %>/stock.js'` ;
27
27
28
28
const sass = require ( 'node-sass' ) ;
29
29
@@ -102,7 +102,7 @@ module.exports = function (grunt) {
102
102
options : {
103
103
display : 'short' ,
104
104
summary : true ,
105
- specs : '<%= conf.spec %>/*-spec.js' ,
105
+ specs : '<%= conf.spec %>/*-spec.js' ,
106
106
helpers : [
107
107
'<%= conf.spec %>/helpers/*.js' ,
108
108
'<%= conf.spec %>/3rd-party/*.js'
@@ -323,7 +323,8 @@ module.exports = function (grunt) {
323
323
'These pages fit the charts to the browser dynamically so it\'s easier to test. ' +
324
324
'For the examples with a single chart taking up the entire window, you can add <code>?resize=viewbox</code> ' +
325
325
'to the URL to test resizing the chart using the ' +
326
- '<a href="http://dc-js.github.io/dc.js/docs/html/dc.baseMixin.html#useViewBoxResizing__anchor">useViewBoxResizing</a> strategy.' ,
326
+ '<a href="http://dc-js.github.io/dc.js/docs/html/dc.baseMixin.html#useViewBoxResizing__anchor">' +
327
+ 'useViewBoxResizing</a> strategy.' ,
327
328
also : [ 'examples' , 'transitions' , 'zoom' ] ,
328
329
sourceLink : 'https://github.com/dc-js/dc.js/tree/develop/<%= conf.websrc %>/resizing'
329
330
} ,
@@ -397,6 +398,12 @@ module.exports = function (grunt) {
397
398
'eslint-fix' : {
398
399
command : `eslint ${ lintableFiles } --fix`
399
400
} ,
401
+ tslint : {
402
+ command : 'tslint src/**/*.ts'
403
+ } ,
404
+ 'tslint-fix' : {
405
+ command : 'tslint src/**/*.ts --fix'
406
+ } ,
400
407
tsc : {
401
408
command : 'tsc'
402
409
}
@@ -405,7 +412,7 @@ module.exports = function (grunt) {
405
412
406
413
grunt . registerTask ( 'merge' , 'Merge a github pull request.' , pr => {
407
414
grunt . log . writeln ( `Merge Github Pull Request #${ pr } ` ) ;
408
- grunt . task . run ( [ `shell:merge:${ pr } ` , 'test' , 'shell:amend' ] ) ;
415
+ grunt . task . run ( [ `shell:merge:${ pr } ` , 'test' , 'shell:amend' ] ) ;
409
416
} ) ;
410
417
grunt . registerTask (
411
418
'test-stock-example' ,
@@ -444,8 +451,8 @@ module.exports = function (grunt) {
444
451
grunt . registerTask ( 'coverage' , [ 'build' , 'copy' , 'karma:coverage' ] ) ;
445
452
grunt . registerTask ( 'ci' , [ 'ci-pull' , 'safe-sauce-labs' ] ) ;
446
453
grunt . registerTask ( 'ci-pull' , [ 'build' , 'copy' , 'karma:ci' ] ) ;
447
- grunt . registerTask ( 'lint' , [ 'shell:eslint' ] ) ;
448
- grunt . registerTask ( 'lint-fix' , [ 'shell:eslint-fix' ] ) ;
454
+ grunt . registerTask ( 'lint' , [ 'shell:tslint' , 'shell: eslint'] ) ;
455
+ grunt . registerTask ( 'lint-fix' , [ 'shell:tslint-fix' , 'shell: eslint-fix'] ) ;
449
456
grunt . registerTask ( 'default' , [ 'build' , 'shell:hooks' ] ) ;
450
457
grunt . registerTask ( 'doc-debug' , [ 'build' , 'jsdoc' , 'jsdoc2md' , 'watch:jsdoc2md' ] ) ;
451
458
} ;
0 commit comments