Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Added a gulp task to lint all the .ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
egamma committed Sep 16, 2016
1 parent 7725a60 commit 6bd1d93
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 86 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules
31 changes: 31 additions & 0 deletions .vscode/tasks.json
@@ -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
}
}
}
]
}
12 changes: 12 additions & 0 deletions gulpfile.js
@@ -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());
});
16 changes: 16 additions & 0 deletions package.json
@@ -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"
}
92 changes: 6 additions & 86 deletions tslint.json
@@ -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
}
}

0 comments on commit 6bd1d93

Please sign in to comment.