Skip to content
This repository was archived by the owner on Dec 4, 2022. It is now read-only.

Commit 242e229

Browse files
thetricfulls1z3
authored andcommitted
fix(core): remove no-use-before-declare (#37)
Closes #36
1 parent bfcc358 commit 242e229

File tree

3 files changed

+45
-63
lines changed

3 files changed

+45
-63
lines changed

README.md

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ these rules with new insights, experiences and remarks in alignment with the upd
3131

3232
**Note**: The following set of rules depend on:
3333
- [TSLint] v5.12.0
34-
- [codelyzer] v4.5.0
34+
- [codelyzer] ^5.0.0
3535

3636
## Table of contents:
3737
- [Getting started](#getting-started)
@@ -306,11 +306,6 @@ them is allowed by TypeScript*).
306306
```
307307

308308
### <a name="variable-design"></a> Variable design
309-
- *Do not use* a **variable** before declaring.
310-
```json
311-
"no-use-before-declare": true
312-
```
313-
314309
- *Always prefer* **`const`** keyword **where appropriate**, for values that should never change.
315310
- *Avoid using* **`let`** (*maintain immutability*).
316311
```json
@@ -1005,42 +1000,36 @@ attacks*).
10051000

10061001
### <a name="codelyzer-rules"></a> Codelyzer rules
10071002
```json
1008-
"banana-in-box": true,
1009-
"contextual-life-cycle": true,
1010-
"decorator-not-allowed": true,
1011-
"pipe-impure": true,
1012-
"templates-no-negated-async": true,
1013-
"trackBy-function": true,
1014-
"i18n": [
1003+
"template-banana-in-box": true,
1004+
"contextual-lifecycle": true,
1005+
"contextual-decorator": true,
1006+
"no-pipe-impure": true,
1007+
"template-no-negated-async": true,
1008+
"template-i18n": [
10151009
true,
10161010
"check-id",
10171011
"check-text"
10181012
],
1019-
"no-attribute-parameter-decorator": true,
1013+
"component-max-inline-declarations": true,
1014+
"no-attribute-decorator": true,
1015+
"no-conflicting-lifecycle": true,
10201016
"no-forward-ref": true,
10211017
"no-input-rename": true,
1022-
"no-life-cycle-call": true,
1023-
"no-output-named-after-standard-event": true,
1018+
"no-lifecycle-call": true,
1019+
"no-output-native": true,
10241020
"no-output-on-prefix": true,
10251021
"no-output-rename": true,
1026-
"no-queries-parameter": true,
1027-
"no-template-call-expression": true,
1022+
"template-no-call-expression": true,
10281023
"no-unused-css": true,
1029-
"prefer-inline-decorator": true,
10301024
"prefer-output-readonly": true,
1031-
"use-life-cycle-interface": true,
1025+
"template-conditional-complexity": true,
1026+
"template-cyclomatic-complexity": true,
1027+
"template-use-track-by-function": true,
1028+
"use-lifecycle-interface": true,
10321029
"use-pipe-decorator": true,
10331030
"use-pipe-transform-interface": true,
1034-
"use-view-encapsulation": true,
1035-
"angular-whitespace": [
1036-
true,
1037-
"check-interpolation",
1038-
"check-semicolon"
1039-
],
1040-
"component-class-suffix": [
1041-
true,
1042-
"Component"
1043-
],
1031+
"use-component-view-encapsulation": true,
1032+
"component-class-suffix": true,
10441033
"component-selector": [
10451034
true,
10461035
"element",
@@ -1050,10 +1039,7 @@ attacks*).
10501039
],
10511040
"kebab-case"
10521041
],
1053-
"directive-class-suffix": [
1054-
true,
1055-
"Directive"
1056-
],
1042+
"directive-class-suffix": true,
10571043
"directive-selector": [
10581044
true,
10591045
"attribute",
@@ -1064,9 +1050,11 @@ attacks*).
10641050
"camelCase"
10651051
],
10661052
"import-destructuring-spacing": true,
1067-
"use-host-property-decorator": true,
1068-
"use-input-property-decorator": true,
1069-
"use-output-property-decorator": true
1053+
"no-queries-metadata-property": true,
1054+
"prefer-inline-decorator": true,
1055+
"no-host-metadata-property": true,
1056+
"no-inputs-metadata-property": true,
1057+
"no-outputs-metadata-property": true
10701058
```
10711059

10721060
## <a name="contributing"></a> Contributing

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"semantic-release": "^15.13.18"
3838
},
3939
"peerDependencies": {
40-
"codelyzer": ">=4.5.0 <5.0.0",
40+
"codelyzer": "^5.0.0",
4141
"tslint": ">=5.14.0"
4242
},
4343
"husky": {

tslint.json

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
"await-promise": true,
6060
"no-return-await": true,
6161
"no-floating-promises": true,
62-
"no-use-before-declare": true,
6362
"prefer-const": true,
6463
"no-var-keyword": true,
6564
"no-shadowed-variable": [
@@ -325,40 +324,35 @@
325324
"no-empty": true,
326325
"no-sparse-arrays": true,
327326
"ban-comma-operator": true,
328-
"banana-in-box": true,
329-
"contextual-life-cycle": true,
330-
"decorator-not-allowed": true,
331-
"pipe-impure": true,
332-
"templates-no-negated-async": true,
333-
"i18n": [
327+
"template-banana-in-box": true,
328+
"contextual-lifecycle": true,
329+
"contextual-decorator": true,
330+
"no-pipe-impure": true,
331+
"template-no-negated-async": true,
332+
"template-i18n": [
334333
true,
335334
"check-id",
336335
"check-text"
337336
],
338-
"max-inline-declarations": true,
339-
"no-attribute-parameter-decorator": true,
340-
"no-conflicting-life-cycle-hooks": true,
337+
"component-max-inline-declarations": true,
338+
"no-attribute-decorator": true,
339+
"no-conflicting-lifecycle": true,
341340
"no-forward-ref": true,
342341
"no-input-rename": true,
343-
"no-life-cycle-call": true,
344-
"no-output-named-after-standard-event": true,
342+
"no-lifecycle-call": true,
343+
"no-output-native": true,
345344
"no-output-on-prefix": true,
346345
"no-output-rename": true,
347-
"no-template-call-expression": true,
346+
"template-no-call-expression": true,
348347
"no-unused-css": true,
349348
"prefer-output-readonly": true,
350349
"template-conditional-complexity": true,
351350
"template-cyclomatic-complexity": true,
352-
"trackBy-function": true,
353-
"use-life-cycle-interface": true,
351+
"template-use-track-by-function": true,
352+
"use-lifecycle-interface": true,
354353
"use-pipe-decorator": true,
355354
"use-pipe-transform-interface": true,
356-
"use-view-encapsulation": true,
357-
"angular-whitespace": [
358-
true,
359-
"check-interpolation",
360-
"check-semicolon"
361-
],
355+
"use-component-view-encapsulation": true,
362356
"component-class-suffix": true,
363357
"component-selector": [
364358
true,
@@ -380,10 +374,10 @@
380374
"camelCase"
381375
],
382376
"import-destructuring-spacing": true,
383-
"no-queries-parameter": true,
377+
"no-queries-metadata-property": true,
384378
"prefer-inline-decorator": true,
385-
"use-host-property-decorator": true,
386-
"use-input-property-decorator": true,
387-
"use-output-property-decorator": true
379+
"no-host-metadata-property": true,
380+
"no-inputs-metadata-property": true,
381+
"no-outputs-metadata-property": true
388382
}
389383
}

0 commit comments

Comments
 (0)