From 618d7b5896d44059035ee5ebdffec626017d2baf Mon Sep 17 00:00:00 2001 From: segayuu Date: Fri, 8 Dec 2017 11:39:55 +0900 Subject: [PATCH 1/5] Delete unnecessary rule invalidation setting --- types/minimatch/tslint.json | 70 +------------------------------------ 1 file changed, 1 insertion(+), 69 deletions(-) diff --git a/types/minimatch/tslint.json b/types/minimatch/tslint.json index a41bf5d19a..79acfd4fbe 100644 --- a/types/minimatch/tslint.json +++ b/types/minimatch/tslint.json @@ -1,79 +1,11 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false + "prefer-const": false } } From c85138726596ee201791a9be12908b52d7667d92 Mon Sep 17 00:00:00 2001 From: segayuu Date: Fri, 8 Dec 2017 11:41:59 +0900 Subject: [PATCH 2/5] cleanup ignore lint error: no-var-keyword --- types/minimatch/index.d.ts | 2 +- types/minimatch/minimatch-tests.ts | 18 +++++++++--------- types/minimatch/tslint.json | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/types/minimatch/index.d.ts b/types/minimatch/index.d.ts index 5c9bd38a28..d5942d536b 100644 --- a/types/minimatch/index.d.ts +++ b/types/minimatch/index.d.ts @@ -27,7 +27,7 @@ declare namespace M { */ function makeRe(pattern: string, options?: IOptions): RegExp; - var Minimatch: IMinimatchStatic; + let Minimatch: IMinimatchStatic; interface IOptions { /** diff --git a/types/minimatch/minimatch-tests.ts b/types/minimatch/minimatch-tests.ts index 5b7a3bdb18..def9a43310 100644 --- a/types/minimatch/minimatch-tests.ts +++ b/types/minimatch/minimatch-tests.ts @@ -1,17 +1,17 @@ import mm = require("minimatch"); - -var pattern = "**/*.ts"; -var options = { +let b: boolean; +let pattern = "**/*.ts"; +let options = { debug: true }; -var m = new mm.Minimatch(pattern, options); -var r = m.makeRe(); +let m = new mm.Minimatch(pattern, options); +let r = m.makeRe(); -var f = ["test.ts"]; +let f = ["test.ts"]; mm.match(f, pattern, options); f.filter(mm.filter(pattern, options)); -var s: string = "hello"; -var b: boolean = mm(s, pattern, options); -var b: boolean = mm(s, pattern); +let s: string = "hello"; +b = mm(s, pattern, options); +b = mm(s, pattern); diff --git a/types/minimatch/tslint.json b/types/minimatch/tslint.json index 79acfd4fbe..d3e917b578 100644 --- a/types/minimatch/tslint.json +++ b/types/minimatch/tslint.json @@ -5,7 +5,6 @@ "no-duplicate-variable": false, "no-inferrable-types": false, "no-redundant-jsdoc-2": false, - "no-var-keyword": false, "prefer-const": false } } From 0362279dc649eacd7e896e40206a469567bf8a4b Mon Sep 17 00:00:00 2001 From: segayuu Date: Fri, 8 Dec 2017 11:42:41 +0900 Subject: [PATCH 3/5] cleanup ignore lint error: no-inferrable-types --- types/minimatch/minimatch-tests.ts | 2 +- types/minimatch/tslint.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/types/minimatch/minimatch-tests.ts b/types/minimatch/minimatch-tests.ts index def9a43310..9ec0afbf19 100644 --- a/types/minimatch/minimatch-tests.ts +++ b/types/minimatch/minimatch-tests.ts @@ -12,6 +12,6 @@ mm.match(f, pattern, options); f.filter(mm.filter(pattern, options)); -let s: string = "hello"; +let s = "hello"; b = mm(s, pattern, options); b = mm(s, pattern); diff --git a/types/minimatch/tslint.json b/types/minimatch/tslint.json index d3e917b578..63bd9786f2 100644 --- a/types/minimatch/tslint.json +++ b/types/minimatch/tslint.json @@ -3,7 +3,6 @@ "rules": { "interface-name": false, "no-duplicate-variable": false, - "no-inferrable-types": false, "no-redundant-jsdoc-2": false, "prefer-const": false } From f9e5add65ed6e87d7099f0cd09172b9017c255d6 Mon Sep 17 00:00:00 2001 From: segayuu Date: Fri, 8 Dec 2017 11:45:42 +0900 Subject: [PATCH 4/5] cleanup ignore lint error: prefer-const --- types/minimatch/minimatch-tests.ts | 22 +++++++++++----------- types/minimatch/tslint.json | 3 +-- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/types/minimatch/minimatch-tests.ts b/types/minimatch/minimatch-tests.ts index 9ec0afbf19..6bbafcae5c 100644 --- a/types/minimatch/minimatch-tests.ts +++ b/types/minimatch/minimatch-tests.ts @@ -1,17 +1,17 @@ import mm = require("minimatch"); -let b: boolean; -let pattern = "**/*.ts"; -let options = { +let bool: boolean; +const pattern = "**/*.ts"; +const options = { debug: true }; -let m = new mm.Minimatch(pattern, options); -let r = m.makeRe(); +const m = new mm.Minimatch(pattern, options); +const regxp = m.makeRe(); -let f = ["test.ts"]; -mm.match(f, pattern, options); +const files = ["test.ts"]; +mm.match(files, pattern, options); -f.filter(mm.filter(pattern, options)); +files.filter(mm.filter(pattern, options)); -let s = "hello"; -b = mm(s, pattern, options); -b = mm(s, pattern); +const str = "hello"; +bool = mm(str, pattern, options); +bool = mm(str, pattern); diff --git a/types/minimatch/tslint.json b/types/minimatch/tslint.json index 63bd9786f2..f9cfdac0d4 100644 --- a/types/minimatch/tslint.json +++ b/types/minimatch/tslint.json @@ -3,7 +3,6 @@ "rules": { "interface-name": false, "no-duplicate-variable": false, - "no-redundant-jsdoc-2": false, - "prefer-const": false + "no-redundant-jsdoc-2": false } } From 73a4e6f77c93fa383f17b1bbe5b7138332b43b78 Mon Sep 17 00:00:00 2001 From: segayuu Date: Fri, 8 Dec 2017 11:47:17 +0900 Subject: [PATCH 5/5] enable lint: no-duplicate-variable --- types/minimatch/tslint.json | 1 - 1 file changed, 1 deletion(-) diff --git a/types/minimatch/tslint.json b/types/minimatch/tslint.json index f9cfdac0d4..78ac1711c4 100644 --- a/types/minimatch/tslint.json +++ b/types/minimatch/tslint.json @@ -2,7 +2,6 @@ "extends": "dtslint/dt.json", "rules": { "interface-name": false, - "no-duplicate-variable": false, "no-redundant-jsdoc-2": false } }