From c23d42fea5ca817a5cfb4f7b03ae723cb607f887 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 14 Dec 2017 21:49:19 +0100 Subject: Implement first custom linter rule async-suffix --- packages/tslint-config/tslint.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/tslint-config/tslint.json') diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index 0921a3954..d3ee51a63 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -7,6 +7,7 @@ "adjacent-overload-signatures": true, "arrow-parens": [true, "ban-single-arg-parens"], "arrow-return-shorthand": true, + "async-suffix": true, "await-promise": true, "binary-expression-operand-order": true, "callable-types": true, @@ -101,5 +102,6 @@ "jsx-self-close": true, "jsx-wrap-multiline": false, "jsx-no-bind": false - } + }, + "rulesDirectory": "lib" } -- cgit From c36d85a46c946b5d52164642336f39c90b732376 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 15 Dec 2017 13:14:44 +0100 Subject: Dissallow unused vars/imports --- packages/tslint-config/tslint.json | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/tslint-config/tslint.json') diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index d3ee51a63..91185bddb 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -51,6 +51,7 @@ "no-string-throw": true, "no-submodule-imports": false, "no-unnecessary-type-assertion": true, + "no-unused-variable": [true, {"ignore-pattern": "^_\\d*"}], "no-implicit-dependencies": [true, "dev"], "number-literal-format": true, "object-literal-sort-keys": false, -- cgit From c8e52882ca556ea06696a56e312f69284f99aa29 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 15 Dec 2017 18:26:45 +0100 Subject: Fix redundant spaces --- packages/tslint-config/tslint.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/tslint-config/tslint.json') diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index 91185bddb..acb6876c3 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -1,7 +1,8 @@ { "extends": [ "tslint:latest", - "tslint-react" + "tslint-react", + "tslint-eslint-rules" ], "rules": { "adjacent-overload-signatures": true, @@ -54,6 +55,7 @@ "no-unused-variable": [true, {"ignore-pattern": "^_\\d*"}], "no-implicit-dependencies": [true, "dev"], "number-literal-format": true, + "object-curly-spacing": [true, "never"], "object-literal-sort-keys": false, "ordered-imports": [ true, -- cgit From cb11aec84df346d5180c7d5874859c1c34f0bf1c Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 20 Dec 2017 00:44:08 -0500 Subject: Add new underscore-privates rule to @0xproject/tslint-config and fix lint errors --- packages/tslint-config/tslint.json | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/tslint-config/tslint.json') diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index acb6876c3..49e31b13d 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -81,6 +81,7 @@ ], "space-within-parens": false, "type-literal-delimiter": true, + "underscore-privates": true, "variable-name": [true, "ban-keywords", "allow-pascal-case" -- cgit From 31a94f468e007aaaa4f4b4fd3d42c7426ac5a901 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 22 Dec 2017 12:48:53 +0100 Subject: Remove formatting esilnt rules --- packages/tslint-config/tslint.json | 2 -- 1 file changed, 2 deletions(-) (limited to 'packages/tslint-config/tslint.json') diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index 49e31b13d..d4529fe95 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -31,7 +31,6 @@ "max-classes-per-file": false, "max-classes-per-file": [true, 1], "max-file-line-count": [true, 500], - "max-line-length": [true, 120], "member-access": true, "member-ordering": [true, "public-before-private", @@ -55,7 +54,6 @@ "no-unused-variable": [true, {"ignore-pattern": "^_\\d*"}], "no-implicit-dependencies": [true, "dev"], "number-literal-format": true, - "object-curly-spacing": [true, "never"], "object-literal-sort-keys": false, "ordered-imports": [ true, -- cgit From e744e4cd989bd3ae1070c59f7baa8097f18b8b06 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 22 Dec 2017 15:05:32 +0100 Subject: Apply prettier config --- packages/tslint-config/tslint.json | 205 ++++++++++++++++++------------------- 1 file changed, 98 insertions(+), 107 deletions(-) (limited to 'packages/tslint-config/tslint.json') diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index d4529fe95..486780de6 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -1,109 +1,100 @@ { - "extends": [ - "tslint:latest", - "tslint-react", - "tslint-eslint-rules" - ], - "rules": { - "adjacent-overload-signatures": true, - "arrow-parens": [true, "ban-single-arg-parens"], - "arrow-return-shorthand": true, - "async-suffix": true, - "await-promise": true, - "binary-expression-operand-order": true, - "callable-types": true, - "class-name": true, - "completed-docs": [ - true, - { - "functions": {"visibilities": ["exported"]}, - "methods": {"locations": "instance", "privacies": ["public", "protected"]} - } - ], - "curly": true, - "eofline": true, - "encoding": true, - "import-spacing": true, - "indent": [true, "spaces", 4], - "interface-name": false, - "interface-over-type-literal": true, - "linebreak-style": [true, "LF"], - "max-classes-per-file": false, - "max-classes-per-file": [true, 1], - "max-file-line-count": [true, 500], - "member-access": true, - "member-ordering": [true, - "public-before-private", - "static-before-instance", - "variables-before-functions" - ], - "newline-before-return": false, - "new-parens": true, - "no-angle-bracket-type-assertion": true, - "no-boolean-literal-compare": true, - "no-default-export": true, - "no-empty-interface": false, - "no-floating-promises": true, - "no-non-null-assertion": true, - "no-parameter-reassignment": true, - "no-redundant-jsdoc": true, - "no-return-await": true, - "no-string-throw": true, - "no-submodule-imports": false, - "no-unnecessary-type-assertion": true, - "no-unused-variable": [true, {"ignore-pattern": "^_\\d*"}], - "no-implicit-dependencies": [true, "dev"], - "number-literal-format": true, - "object-literal-sort-keys": false, - "ordered-imports": [ - true, - { - "grouped-imports": true - } - ], - "prefer-const": true, - "prefer-for-of": true, - "prefer-function-over-method": true, - "promise-function-async": true, - "quotemark": [true, "single", "avoid-escape", "jsx-double"], - "semicolon": [true, "always"], - "space-before-function-paren": [ - true, - { - "anonymous": "never", - "named": "never", - "method": "never", - "constructor": "never", - "asyncArrow": "always" - } - ], - "space-within-parens": false, - "type-literal-delimiter": true, - "underscore-privates": true, - "variable-name": [true, - "ban-keywords", - "allow-pascal-case" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-rest-spread", - "check-type", - "check-typecast", - "check-preblock" - ], - "jsx-alignment": true, - "jsx-boolean-value": true, - "jsx-curly-spacing": [true, "never"], - "jsx-no-lambda": true, - "jsx-no-multiline-js": false, - "jsx-no-string-ref": true, - "jsx-self-close": true, - "jsx-wrap-multiline": false, - "jsx-no-bind": false - }, - "rulesDirectory": "lib" + "extends": ["tslint:latest", "tslint-react", "tslint-eslint-rules"], + "rules": { + "adjacent-overload-signatures": true, + "arrow-parens": [true, "ban-single-arg-parens"], + "arrow-return-shorthand": true, + "async-suffix": true, + "await-promise": true, + "binary-expression-operand-order": true, + "callable-types": true, + "class-name": true, + "completed-docs": [ + true, + { + "functions": { "visibilities": ["exported"] }, + "methods": { "locations": "instance", "privacies": ["public", "protected"] } + } + ], + "curly": true, + "eofline": true, + "encoding": true, + "import-spacing": true, + "indent": [true, "spaces", 4], + "interface-name": false, + "interface-over-type-literal": true, + "linebreak-style": [true, "LF"], + "max-classes-per-file": false, + "max-classes-per-file": [true, 1], + "max-line-length": false, + "max-file-line-count": [true, 500], + "member-access": true, + "member-ordering": [true, "public-before-private", "static-before-instance", "variables-before-functions"], + "newline-before-return": false, + "new-parens": true, + "no-angle-bracket-type-assertion": true, + "no-boolean-literal-compare": true, + "no-default-export": true, + "no-empty-interface": false, + "no-floating-promises": true, + "no-non-null-assertion": true, + "no-parameter-reassignment": true, + "no-redundant-jsdoc": true, + "no-return-await": true, + "no-string-throw": true, + "no-submodule-imports": false, + "no-unnecessary-type-assertion": true, + "no-unused-variable": [true, { "ignore-pattern": "^_\\d*" }], + "no-implicit-dependencies": [true, "dev"], + "number-literal-format": true, + "object-literal-sort-keys": false, + "object-literal-key-quotes": false, + "ordered-imports": [ + true, + { + "grouped-imports": true + } + ], + "prefer-const": true, + "prefer-for-of": true, + "prefer-function-over-method": true, + "promise-function-async": true, + "quotemark": [true, "single", "avoid-escape", "jsx-double"], + "semicolon": [true, "always"], + "space-before-function-paren": [ + true, + { + "anonymous": "never", + "named": "never", + "method": "never", + "constructor": "never", + "asyncArrow": "always" + } + ], + "space-within-parens": false, + "type-literal-delimiter": true, + "underscore-privates": true, + "variable-name": [true, "ban-keywords", "allow-pascal-case"], + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-rest-spread", + "check-type", + "check-typecast", + "check-preblock" + ], + "jsx-alignment": true, + "jsx-boolean-value": true, + "jsx-curly-spacing": [true, "never"], + "jsx-no-lambda": true, + "jsx-no-multiline-js": false, + "jsx-no-string-ref": true, + "jsx-self-close": true, + "jsx-wrap-multiline": false, + "jsx-no-bind": false + }, + "rulesDirectory": "lib" } -- cgit From b4375d6f64fc0651c7ba347fcfe36e171fa261fc Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 17 Jan 2018 16:14:25 +0100 Subject: Enable restrict-plus-operands and fix issues detected --- packages/tslint-config/tslint.json | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/tslint-config/tslint.json') diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index 486780de6..971588b08 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -60,6 +60,7 @@ "prefer-function-over-method": true, "promise-function-async": true, "quotemark": [true, "single", "avoid-escape", "jsx-double"], + "restrict-plus-operands": true, "semicolon": [true, "always"], "space-before-function-paren": [ true, -- cgit