Skip to content

Commit 166a3c4

Browse files
committed
tech(typescript): added tslint to default task
1 parent d4a701a commit 166a3c4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

public/app/core/filters/filters.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ module.filter('stringSort', function() {
1515

1616
module.filter('slice', function() {
1717
return function(arr, start, end) {
18-
if(!_.isUndefined(arr)) {
18+
if (!_.isUndefined(arr)) {
1919
return arr.slice(start, end);
2020
}
2121
};
2222
});
2323

2424
module.filter('stringify', function() {
2525
return function(arr) {
26-
if(_.isObject(arr) && !_.isArray(arr)) {
26+
if (_.isObject(arr) && !_.isArray(arr)) {
2727
return angular.toJson(arr);
2828
} else {
2929
return _.isNull(arr) ? null : arr.toString();
@@ -32,8 +32,8 @@ module.filter('stringify', function() {
3232
});
3333

3434
module.filter('moment', function() {
35-
return function(date,mode) {
36-
switch(mode) {
35+
return function(date, mode) {
36+
switch (mode) {
3737
case 'ago':
3838
return moment(date).fromNow();
3939
}
@@ -66,11 +66,12 @@ module.filter('interpolateTemplateVars', function(templateSrv) {
6666
} else {
6767
return templateSrv.replaceWithText(text, scope.row.scopedVars);
6868
}
69-
}
69+
};
7070

7171
interpolateTemplateVars.$stateful = true;
7272

7373
return interpolateTemplateVars;
7474
});
7575

76-
export function filters() {}
76+
// dummy export
77+
export {};

public/test/karma.conf.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ module.exports = function(config) {
99
// list of files / patterns to load in the browser
1010
files: [
1111
'public/test/test-main.js',
12-
{pattern: 'public_gen/.app_gen/**/*.js', included: false},
13-
{pattern: 'public_gen/vendor/**/*.js', included: false},
14-
{pattern: 'public_gen/test/**/*.js', included: false},
1512
{pattern: 'public_gen/**/*.js', included: false}
1613
],
1714

@@ -28,4 +25,5 @@ module.exports = function(config) {
2825
singleRun: true,
2926

3027
});
28+
3129
};

tasks/default_task.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = function(grunt) {
66
grunt.registerTask('default', [
77
'jscs',
88
'jshint',
9+
'tslint',
910
'clean:gen',
1011
'copy:public_to_gen',
1112
'css',

0 commit comments

Comments
 (0)