This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a gulp task to lint all the .ts files
- Loading branch information
Showing
5 changed files
with
66 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "0.1.0", | ||
"command": "gulp", | ||
"isShellCommand": true, | ||
"args": [ | ||
"--no-color" | ||
], | ||
"tasks": [ | ||
{ | ||
"taskName": "tslint", | ||
"args": [], | ||
"problemMatcher": { | ||
"owner": "tslint", | ||
"fileLocation": [ | ||
"relative", | ||
"${workspaceRoot}" | ||
], | ||
"severity": "warning", | ||
"pattern": { | ||
"regexp": "^(\\S.*)\\[(\\d+), (\\d+)\\]:\\s+(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4 | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
|
||
const gulp = require('gulp'); | ||
const gulp_tslint = require('gulp-tslint'); | ||
|
||
gulp.task('default', ['tslint']); | ||
|
||
gulp.task('tslint', () => { | ||
return gulp.src(['**/*.ts', '!**/*.d.ts', '!node_modules/**']) | ||
.pipe(gulp_tslint()) | ||
.pipe(gulp_tslint.report()); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "vscode-tslint", | ||
"version": "1.0.0", | ||
"description": "The umbrella project for the tslint client and server", | ||
"main": " ", | ||
"devDependencies": { | ||
"tslint": "^3.15.0", | ||
"gulp": "^3.9.1", | ||
"gulp-tslint": "^6.1.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Microsoft/vscode-tslint.git" | ||
}, | ||
"author": "egamma" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,12 @@ | ||
{ | ||
"rules": { | ||
"class-name": true, | ||
"comment-format": [ | ||
true, | ||
"check-space" | ||
], | ||
"curly": true, | ||
"eofline": true, | ||
"forin": true, | ||
"indent": [ | ||
true, | ||
"tabs" | ||
], | ||
"label-position": true, | ||
"label-undefined": true, | ||
"max-line-length": [ | ||
true, | ||
140 | ||
], | ||
"member-access": true, | ||
"member-ordering": [ | ||
true, | ||
"public-before-private", | ||
"static-before-instance", | ||
"variables-before-functions" | ||
], | ||
"no-arg": true, | ||
"no-bitwise": true, | ||
"no-console": [ | ||
true, | ||
"debug", | ||
"info", | ||
"time", | ||
"timeEnd", | ||
"trace" | ||
], | ||
"no-construct": true, | ||
"no-debugger": true, | ||
"no-duplicate-key": true, | ||
"no-duplicate-variable": true, | ||
"no-empty": true, | ||
"no-eval": true, | ||
"no-inferrable-types": true, | ||
"no-shadowed-variable": true, | ||
"no-string-literal": true, | ||
"no-switch-case-fall-through": true, | ||
"trailing-comma": true, | ||
"no-trailing-whitespace": true, | ||
"no-unused-expression": true, | ||
"no-duplicate-variable": true, | ||
"no-duplicate-key": true, | ||
"no-unused-variable": true, | ||
"no-unreachable": true, | ||
"no-use-before-declare": true, | ||
"no-var-keyword": true, | ||
"object-literal-sort-keys": false, | ||
"one-line": [ | ||
true, | ||
"check-open-brace", | ||
"check-catch", | ||
"check-else", | ||
"check-whitespace" | ||
], | ||
"radix": true, | ||
"semicolon": [ | ||
true, | ||
"always" | ||
], | ||
"triple-equals": [ | ||
true, | ||
"allow-null-check" | ||
], | ||
"typedef-whitespace": [ | ||
true, | ||
{ | ||
"call-signature": "nospace", | ||
"index-signature": "nospace", | ||
"parameter": "nospace", | ||
"property-declaration": "nospace", | ||
"variable-declaration": "nospace" | ||
} | ||
], | ||
"variable-name": false, | ||
"whitespace": [ | ||
true, | ||
"check-branch", | ||
"check-decl", | ||
"check-operator", | ||
"check-separator", | ||
"check-type" | ||
] | ||
"curly": true, | ||
"class-name": true, | ||
"semicolon": ["always"], | ||
"triple-equals": true | ||
} | ||
} |