angular-tslint-rules
Advanced tools
Comparing version 1.17.0 to 1.18.0
{ | ||
"name": "angular-tslint-rules", | ||
"version": "1.17.0", | ||
"version": "1.18.0", | ||
"description": "Shared TSLint & codelyzer rules to enforce a consistent code style for Angular development", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -33,3 +33,3 @@ # angular-tslint-rules [![npm version](https://badge.fury.io/js/angular-tslint-rules.svg)](https://www.npmjs.com/package/angular-tslint-rules) [![npm downloads](https://img.shields.io/npm/dm/angular-tslint-rules.svg)](https://www.npmjs.com/package/angular-tslint-rules) | ||
**Note**: The following set of rules depend on: | ||
- [TSLint] v5.17.0 | ||
- [TSLint] v5.18.0 | ||
- [codelyzer] v5.0.0 | ||
@@ -142,3 +142,8 @@ | ||
```json | ||
"adjacent-overload-signatures": true | ||
"adjacent-overload-signatures": [ | ||
true, | ||
{ | ||
"ignore-accessors": true, | ||
} | ||
] | ||
``` | ||
@@ -300,2 +305,7 @@ | ||
- Functions marked **`async`** must contain an **`await`** or **`return`** statement | ||
```json | ||
"no-async-without-await": true | ||
``` | ||
- *Do not use* the **unnecessary** **`return await`**. | ||
@@ -523,2 +533,13 @@ ```json | ||
- Using **comparison operators** (`>`, `>=`, `<=`, `<`) to compare *non-numbers* should be **avoided**. | ||
```json | ||
"strict-comparisons": [ | ||
true, | ||
{ | ||
"allow-object-equal-comparison": true, | ||
"allow-string-order-comparison": false | ||
} | ||
] | ||
``` | ||
- *Always prefer* explicit **`+= 1`** and **`-= 1`** *pre-unary* **operators** over **`++i`** and **`--i`**. | ||
@@ -525,0 +546,0 @@ ```json |
@@ -20,3 +20,8 @@ { | ||
"prefer-readonly": true, | ||
"adjacent-overload-signatures": true, | ||
"adjacent-overload-signatures": [ | ||
true, | ||
{ | ||
"ignore-accessors": true | ||
} | ||
], | ||
"unified-signatures": true, | ||
@@ -61,2 +66,3 @@ "prefer-function-over-method": [ | ||
"await-promise": true, | ||
"no-async-without-await": true, | ||
"no-return-await": true, | ||
@@ -142,2 +148,9 @@ "no-floating-promises": true, | ||
], | ||
"strict-comparisons": [ | ||
true, | ||
{ | ||
"allow-object-equal-comparison": true, | ||
"allow-string-order-comparison": false | ||
} | ||
], | ||
"increment-decrement": [ | ||
@@ -164,3 +177,3 @@ true, | ||
} | ||
] | ||
], | ||
"strict-boolean-expressions": [ | ||
@@ -167,0 +180,0 @@ true, |
48037
402
1114