From f982b401660af3a798a929f3b2a5af5177dffd17 Mon Sep 17 00:00:00 2001 From: Guillermo Date: Mon, 18 Jul 2016 06:09:38 +0200 Subject: [PATCH] chore(tslint-rules): Use ionic-tslint-rules (#276) * chore(tslint-rules): Use ionic-tslint-rules * chore(tslint): Use ionic-gulp-tslint --- gulpfile.js | 8 ++----- package.json | 3 ++- tslint.json | 63 ++-------------------------------------------------- 3 files changed, 6 insertions(+), 68 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index e7ae409099..308983416e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,7 +2,7 @@ var gulp = require('gulp'); var minimist = require('minimist'); var uglify = require('gulp-uglify'); var rename = require("gulp-rename"); -var tslint = require('gulp-tslint'); +var tslint = require('ionic-gulp-tslint'); var flagConfig = { string: ['port', 'version', 'ngVersion', 'animations'], @@ -25,8 +25,4 @@ gulp.task("minify:dist", function(){ .pipe(gulp.dest('./dist')); }); -gulp.task("tslint", function(){ - gulp.src("src/**/*.ts") - .pipe(tslint()) - .pipe(tslint.report('verbose')); -}); +gulp.task('lint', tslint); diff --git a/package.json b/package.json index e48b7fa6ac..f1de9ed306 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "gulp-rename": "^1.2.2", "gulp-tslint": "^5.0.0", "gulp-uglify": "^1.5.4", + "ionic-gulp-tslint": "^1.0.0", "lodash": "3.10.1", "minimist": "^1.1.3", "mkdirp": "^0.5.1", @@ -30,7 +31,7 @@ "q": "1.4.1", "semver": "^5.0.1", "tslint": "^3.8.1", - "tslint-eslint-rules": "^1.3.0", + "tslint-ionic-rules": "0.0.3", "typescript": "^1.8.10" }, "scripts": { diff --git a/tslint.json b/tslint.json index ca17685f7c..aa8b53d98c 100644 --- a/tslint.json +++ b/tslint.json @@ -1,62 +1,3 @@ { - "rulesDirectory": "node_modules/tslint-eslint-rules/dist/rules", - "rules": { - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "indent": [ - true, - "spaces" - ], - "no-duplicate-variable": true, - "no-eval": true, - "no-internal-module": true, - "no-trailing-whitespace": true, - "no-var-keyword": false, - "one-line": [ - true, - "check-open-brace", - "check-whitespace" - ], - "quotemark": [ - true, - "single" - ], - "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": [ - true, - "ban-keywords" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "no-inner-declarations": [ - true, - "functions" - ] - } -} \ No newline at end of file + "extends": "tslint-ionic-rules" +}