diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..2ff8622f1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +package.json \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..6c70cb208 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "printWidth": 140, + "singleQuote": true +} diff --git a/.travis.yml b/.travis.yml index 20bd887dc..8191769d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: - - 5 + - '8.11.1' - stable os: - linux @@ -10,7 +10,7 @@ os: branches: only: master -before_install: npm i rxjs@5.0.1 @angular/core @angular/compiler zone.js@0.7.2 +before_install: npm i rxjs@6.0.0-beta.0 @angular/core@6.0.0-rc.0 @angular/compiler@6.0.0-rc.0 zone.js@0.8.20 -script: npm run tscv && npm run lint && npm t +script: npm run tscv && npm run format:check && npm run lint && npm t diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 0f3d9ea7b..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "typescript.tsdk": "./node_modules/typescript/lib", - "angulardoc.repoId": "51f64839-b313-47fa-8d89-9317081ebe22", - "angulardoc.lastSync": 0 -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 31e47313d..51f2257bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,19 +2,19 @@ ## New Rules -- `max-inline-declarations` which limits the size of inline templates and/or styles. Credits to [NagRock](https://github.com/NagRock) [#536](https://github.com/mgechev/codelyzer/issues/536) [174ed46](https://github.com/mgechev/codelyzer/commit/174ed46f11dddd2837559163d6475e00cef8be84). -- `prefer-output-readonly` requires the `@Output`s of a component to be `readonly`. Credits to [rafaelss95](https://github.com/rafaelss95) [#515](https://github.com/mgechev/codelyzer/issues/515) [3d652d1](https://github.com/mgechev/codelyzer/commit/3d652d13b447fabf333c994506990638ac72fcd8). -- `no-conflicting-life-cycle-hooks` prevents to implement OnChanges and DoCheck on the same class. Credits to [rafaelss95](https://github.com/rafaelss95) [#560](https://github.com/mgechev/codelyzer/issues/560) [e521115](https://github.com/mgechev/codelyzer/commit/e521115bc6fed7521f83e72b6946a05ef87dfea3). -- `enforce-component-selector` Component Selector Required [#551](https://github.com/mgechev/codelyzer/issues/551) [b9c899b](https://github.com/mgechev/codelyzer/commit/b9c899bef14fa12d2fb8bddbaaa9da86426a80cb). Credits to [wKoza](https://github.com/wKoza). -- `no-life-cycle-call` disallow explicit calls to lifecycle hooks. Credits to [rafaelss95](https://github.com/rafaelss95) [#427](https://github.com/mgechev/codelyzer/issues/427) [3e10013](https://github.com/mgechev/codelyzer/commit/3e1001385a1b140633f35b2a1234032b8b9c41a2) +* `max-inline-declarations` which limits the size of inline templates and/or styles. Credits to [NagRock](https://github.com/NagRock) [#536](https://github.com/mgechev/codelyzer/issues/536) [174ed46](https://github.com/mgechev/codelyzer/commit/174ed46f11dddd2837559163d6475e00cef8be84). +* `prefer-output-readonly` requires the `@Output`s of a component to be `readonly`. Credits to [rafaelss95](https://github.com/rafaelss95) [#515](https://github.com/mgechev/codelyzer/issues/515) [3d652d1](https://github.com/mgechev/codelyzer/commit/3d652d13b447fabf333c994506990638ac72fcd8). +* `no-conflicting-life-cycle-hooks` prevents to implement OnChanges and DoCheck on the same class. Credits to [rafaelss95](https://github.com/rafaelss95) [#560](https://github.com/mgechev/codelyzer/issues/560) [e521115](https://github.com/mgechev/codelyzer/commit/e521115bc6fed7521f83e72b6946a05ef87dfea3). +* `enforce-component-selector` Component Selector Required [#551](https://github.com/mgechev/codelyzer/issues/551) [b9c899b](https://github.com/mgechev/codelyzer/commit/b9c899bef14fa12d2fb8bddbaaa9da86426a80cb). Credits to [wKoza](https://github.com/wKoza). +* `no-life-cycle-call` disallow explicit calls to lifecycle hooks. Credits to [rafaelss95](https://github.com/rafaelss95) [#427](https://github.com/mgechev/codelyzer/issues/427) [3e10013](https://github.com/mgechev/codelyzer/commit/3e1001385a1b140633f35b2a1234032b8b9c41a2) ## Bug Fixes -- Possible bug with no-input-rename [#374](https://github.com/mgechev/codelyzer/issues/374) [f3a53bd](https://github.com/mgechev/codelyzer/commit/f3a53bd8164483b28816eedf6d80e7dcc7a95cb5). -- Removed dependency on `@angular/platform-browser-dynamic` [#525](https://github.com/mgechev/codelyzer/issues/525) [671e954](https://github.com/mgechev/codelyzer/commit/671e954de3f5c6db7c1873ea462e25fb963e5e8d). -- Rule `contextual-life-cycle` too aggressively scoped [#545](https://github.com/mgechev/codelyzer/issues/545) [dcb4b3e](https://github.com/mgechev/codelyzer/commit/dcb4b3e495c38a3cebfa47a23a62a3dcab2e8a03). -- `no-output-named-after-standard-event` Does Not Check Output Rename [#537](https://github.com/mgechev/codelyzer/issues/537) [96d9292](https://github.com/mgechev/codelyzer/commit/96d9292a77928371819f11df102c5ad7ab198719). -- Template Conditional Complexity reports incorrect threshold [#533](https://github.com/mgechev/codelyzer/issues/533) [5851306](https://github.com/mgechev/codelyzer/commit/58513061b9b513f2bc99789381daed1bc5316645). +* Possible bug with no-input-rename [#374](https://github.com/mgechev/codelyzer/issues/374) [f3a53bd](https://github.com/mgechev/codelyzer/commit/f3a53bd8164483b28816eedf6d80e7dcc7a95cb5). +* Removed dependency on `@angular/platform-browser-dynamic` [#525](https://github.com/mgechev/codelyzer/issues/525) [671e954](https://github.com/mgechev/codelyzer/commit/671e954de3f5c6db7c1873ea462e25fb963e5e8d). +* Rule `contextual-life-cycle` too aggressively scoped [#545](https://github.com/mgechev/codelyzer/issues/545) [dcb4b3e](https://github.com/mgechev/codelyzer/commit/dcb4b3e495c38a3cebfa47a23a62a3dcab2e8a03). +* `no-output-named-after-standard-event` Does Not Check Output Rename [#537](https://github.com/mgechev/codelyzer/issues/537) [96d9292](https://github.com/mgechev/codelyzer/commit/96d9292a77928371819f11df102c5ad7ab198719). +* Template Conditional Complexity reports incorrect threshold [#533](https://github.com/mgechev/codelyzer/issues/533) [5851306](https://github.com/mgechev/codelyzer/commit/58513061b9b513f2bc99789381daed1bc5316645). A lot of credits go to [rafaelss95](https://github.com/rafaelss95), [wKoza](https://github.com/wKoza). The rest of the amazing people who work on codelyzer, can be found [here](https://github.com/mgechev/codelyzer#contributors). @@ -22,39 +22,39 @@ A lot of credits go to [rafaelss95](https://github.com/rafaelss95), [wKoza](http ## Bug Fixes -- Improved `peerDependencies` range. +* Improved `peerDependencies` range. # 4.2.0 ## New Rules -- `template-cyclomatic-complexity` which limits the estimated [Cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) in your templates. Credits to [wKoza](https://github.com/wKoza). -- `template-conditional-complexity` which limits the complexity of boolean expressions inside of your templates. Credits to [wKoza](https://github.com/wKoza). +* `template-cyclomatic-complexity` which limits the estimated [Cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) in your templates. Credits to [wKoza](https://github.com/wKoza). +* `template-conditional-complexity` which limits the complexity of boolean expressions inside of your templates. Credits to [wKoza](https://github.com/wKoza). ## Features -- Support for Angular version 6 [#524](https://github.com/mgechev/codelyzer/issues/524) [50fa2d6](https://github.com/mgechev/codelyzer/commit/50fa2d6a2ea64082f2179bf4e3e93777888a9797) -- Cyclomatic complexity rule `template-cyclomatic-complexity` [#514](https://github.com/mgechev/codelyzer/issues/514) [3221330](https://github.com/mgechev/codelyzer/commit/322133000e47aabf9426ebf5315520c63f3483d8) -- Limiting template condition complexity (rule `template-conditional-complexity`) [#508](https://github.com/mgechev/codelyzer/issues/508) [bb86295](https://github.com/mgechev/codelyzer/commit/bb862952ca51d5490e81e01b4a125ddab1415404) -- Complete Rules Status section in README and complete Rules Page [#501](https://github.com/mgechev/codelyzer/issues/501) [1fe9d22](https://github.com/mgechev/codelyzer/commit/1fe9d22a8ef6426899cd1759053d31004658aef8) +* Support for Angular version 6 [#524](https://github.com/mgechev/codelyzer/issues/524) [50fa2d6](https://github.com/mgechev/codelyzer/commit/50fa2d6a2ea64082f2179bf4e3e93777888a9797) +* Cyclomatic complexity rule `template-cyclomatic-complexity` [#514](https://github.com/mgechev/codelyzer/issues/514) [3221330](https://github.com/mgechev/codelyzer/commit/322133000e47aabf9426ebf5315520c63f3483d8) +* Limiting template condition complexity (rule `template-conditional-complexity`) [#508](https://github.com/mgechev/codelyzer/issues/508) [bb86295](https://github.com/mgechev/codelyzer/commit/bb862952ca51d5490e81e01b4a125ddab1415404) +* Complete Rules Status section in README and complete Rules Page [#501](https://github.com/mgechev/codelyzer/issues/501) [1fe9d22](https://github.com/mgechev/codelyzer/commit/1fe9d22a8ef6426899cd1759053d31004658aef8) ## Bug Fixes -- "extends": ["codelyzer"] is broken [#505](https://github.com/mgechev/codelyzer/issues/505) [7b76dfa](https://github.com/mgechev/codelyzer/commit/7b76dfa4543ebf33d640fde2db7d5d4748a144ed) -- Message for 'use-host-property-decorator' includes invalid link to Angular style docs [#510](https://github.com/mgechev/codelyzer/issues/510) [5fc77c9](https://github.com/angular/angular/commit/5fc77c90cb06970aa8a7a1ea829f81fff9628ff8) +* "extends": ["codelyzer"] is broken [#505](https://github.com/mgechev/codelyzer/issues/505) [7b76dfa](https://github.com/mgechev/codelyzer/commit/7b76dfa4543ebf33d640fde2db7d5d4748a144ed) +* Message for 'use-host-property-decorator' includes invalid link to Angular style docs [#510](https://github.com/mgechev/codelyzer/issues/510) [5fc77c9](https://github.com/angular/angular/commit/5fc77c90cb06970aa8a7a1ea829f81fff9628ff8) # 4.1.0 ## Features -- Feature request: no output named after a standard DOM event [#473](https://github.com/mgechev/codelyzer/issues/473) [ae3f07b](https://github.com/mgechev/codelyzer/commit/ae3f07b61eedebe07e2816a29b32ef733febd038) -- Support for Angular Compiler 5.2 [#496](https://github.com/mgechev/codelyzer/issues/496) [6a6b3de](https://github.com/mgechev/codelyzer/commit/6a6b3de0b1943cb5373e12e0fd7d24e7ea29c162) +* Feature request: no output named after a standard DOM event [#473](https://github.com/mgechev/codelyzer/issues/473) [ae3f07b](https://github.com/mgechev/codelyzer/commit/ae3f07b61eedebe07e2816a29b32ef733febd038) +* Support for Angular Compiler 5.2 [#496](https://github.com/mgechev/codelyzer/issues/496) [6a6b3de](https://github.com/mgechev/codelyzer/commit/6a6b3de0b1943cb5373e12e0fd7d24e7ea29c162) ### Bug Fixes -- i18n check-text edge cases [#442](https://github.com/mgechev/codelyzer/issues/442) [4c1c8d4](https://github.com/mgechev/codelyzer/commit/4c1c8d453da80436890b75bf77ee888cba2d1855) -- Codelyzer hanging for "styles" attribute in Angular component [#446](https://github.com/mgechev/codelyzer/issues/446) [a31c6d2](https://github.com/mgechev/codelyzer/commit/a31c6d2b2726c01f65f33e744b1db4944d941962) and [9c90ac3](https://github.com/mgechev/codelyzer/commit/9c90ac33cea1f947d012b71dcdeffde149b9f965) -- no-output-on-prefix incorrectly throws error if output property name starts with "one" [#480](https://github.com/mgechev/codelyzer/issues/480) [9b844cc](https://github.com/mgechev/codelyzer/commit/9b844cc226ae127145097f94b734f929308d5827) +* i18n check-text edge cases [#442](https://github.com/mgechev/codelyzer/issues/442) [4c1c8d4](https://github.com/mgechev/codelyzer/commit/4c1c8d453da80436890b75bf77ee888cba2d1855) +* Codelyzer hanging for "styles" attribute in Angular component [#446](https://github.com/mgechev/codelyzer/issues/446) [a31c6d2](https://github.com/mgechev/codelyzer/commit/a31c6d2b2726c01f65f33e744b1db4944d941962) and [9c90ac3](https://github.com/mgechev/codelyzer/commit/9c90ac33cea1f947d012b71dcdeffde149b9f965) +* no-output-on-prefix incorrectly throws error if output property name starts with "one" [#480](https://github.com/mgechev/codelyzer/issues/480) [9b844cc](https://github.com/mgechev/codelyzer/commit/9b844cc226ae127145097f94b734f929308d5827) Thanks to [@gbilodeau](https://github.com/gbilodeau) for `NoOutputNamedAfterStandardEventRule` and [wKoza](https://github.com/wKoza) for the code reviews! @@ -62,8 +62,8 @@ Thanks to [@gbilodeau](https://github.com/gbilodeau) for `NoOutputNamedAfterStan ### Bug Fixes -- Two issues in `angular-whitespace` related to `check-semicolon` and `check-interpolation` [#469](https://github.com/mgechev/codelyzer/issues/469) [2ef7438](https://github.com/mgechev/codelyzer/pull/470/commits/2ef7438b63829064d2bb9fabe0cd0eb7504fad98) -- Check multiple semicolons inside the directive expressions [#472](https://github.com/mgechev/codelyzer/issues/472) [e6036d2](https://github.com/mgechev/codelyzer/pull/471/commits/e6036d2f757dd1b8f837afef6aea5803acd0cfca) +* Two issues in `angular-whitespace` related to `check-semicolon` and `check-interpolation` [#469](https://github.com/mgechev/codelyzer/issues/469) [2ef7438](https://github.com/mgechev/codelyzer/pull/470/commits/2ef7438b63829064d2bb9fabe0cd0eb7504fad98) +* Check multiple semicolons inside the directive expressions [#472](https://github.com/mgechev/codelyzer/issues/472) [e6036d2](https://github.com/mgechev/codelyzer/pull/471/commits/e6036d2f757dd1b8f837afef6aea5803acd0cfca) Thanks to [@sagittarius-rev](https://github.com/sagittarius-rev) for the bug fixes! @@ -71,20 +71,20 @@ Thanks to [@sagittarius-rev](https://github.com/sagittarius-rev) for the bug fix ### Bug Fixes -- Fix `noOutputOnPrefixRule` and rename it to `no-output-on-prefix`. You can now enable it with: +* Fix `noOutputOnPrefixRule` and rename it to `no-output-on-prefix`. You can now enable it with: ``` "no-output-on-prefix": true ``` -- Fix broken tests for `noOutputOnPrefixRule`. +* Fix broken tests for `noOutputOnPrefixRule`. # 4.0.0 ### Features -- Support for Angular version 5 [#409](https://github.com/mgechev/codelyzer/issues/409) [0217e2d](https://github.com/mgechev/codelyzer/commit/0217e2dba6a93c93329cbf09ae0fca81af9f05ba) -- Rule for checking the name events without the prefix on https://angular.io/guide/styleguide#dont-prefix-output-properties [#449](https://github.com/mgechev/codelyzer/issues/449) [8f2b4e7](https://github.com/mgechev/codelyzer/commit/8f2b4e765ed0db49d2abf995cd278f09bb35f8c1). +* Support for Angular version 5 [#409](https://github.com/mgechev/codelyzer/issues/409) [0217e2d](https://github.com/mgechev/codelyzer/commit/0217e2dba6a93c93329cbf09ae0fca81af9f05ba) +* Rule for checking the name events without the prefix on https://angular.io/guide/styleguide#dont-prefix-output-properties [#449](https://github.com/mgechev/codelyzer/issues/449) [8f2b4e7](https://github.com/mgechev/codelyzer/commit/8f2b4e765ed0db49d2abf995cd278f09bb35f8c1). Enable the new rule by adding the following line in your `tslint.json` config file: @@ -94,35 +94,33 @@ Enable the new rule by adding the following line in your `tslint.json` config fi Thanks to [@eromano](https://github.com/eromano) for the rule implementation! - ### Breaking Changes -- The rules `templates-use-public`, `no-access-missing-member`, `invoke-injectable` and `template-to-ng-template` no longer exist. Remove them from your `tslint.json` configuration. +* The rules `templates-use-public`, `no-access-missing-member`, `invoke-injectable` and `template-to-ng-template` no longer exist. Remove them from your `tslint.json` configuration. # 3.2.1 ### Features -- Support for `@angular/compiler@4.4.1` [#416](https://github.com/mgechev/codelyzer/issues/416) [d67f88e](https://github.com/mgechev/codelyzer/pull/418/commits/d67f88eb4005a9b6a300edf0be211990bd65f08f) +* Support for `@angular/compiler@4.4.1` [#416](https://github.com/mgechev/codelyzer/issues/416) [d67f88e](https://github.com/mgechev/codelyzer/pull/418/commits/d67f88eb4005a9b6a300edf0be211990bd65f08f) ### Bug Fixes -- Error while parsing TS file with mixin [#422](https://github.com/mgechev/codelyzer/issues/422) [61d11db](https://github.com/mgechev/codelyzer/commit/61d11dbafb5e1e34ef291de76dbe69c835364882) +* Error while parsing TS file with mixin [#422](https://github.com/mgechev/codelyzer/issues/422) [61d11db](https://github.com/mgechev/codelyzer/commit/61d11dbafb5e1e34ef291de76dbe69c835364882) # 3.2.0 ### Features -- i18n best practices [#377](https://github.com/mgechev/codelyzer/issues/377) [5ef90aa](https://github.com/mgechev/codelyzer/commit/5ef90aa5955294a640fcf4ca8efa402e27a77fd1) -- Add a rule which verifies the use of the life cycle methods according to the type of class (Component, Directive, Service,...) [#363](https://github.com/mgechev/codelyzer/issues/363) [6b042f7](https://github.com/mgechev/codelyzer/pull/388) -- Friendlier checking of validator directive names [#397](https://github.com/mgechev/codelyzer/issues/397) [28ecbdd](https://github.com/mgechev/codelyzer/pull/407) +* i18n best practices [#377](https://github.com/mgechev/codelyzer/issues/377) [5ef90aa](https://github.com/mgechev/codelyzer/commit/5ef90aa5955294a640fcf4ca8efa402e27a77fd1) +* Add a rule which verifies the use of the life cycle methods according to the type of class (Component, Directive, Service,...) [#363](https://github.com/mgechev/codelyzer/issues/363) [6b042f7](https://github.com/mgechev/codelyzer/pull/388) +* Friendlier checking of validator directive names [#397](https://github.com/mgechev/codelyzer/issues/397) [28ecbdd](https://github.com/mgechev/codelyzer/pull/407) ### Bug Fixes -- Error on validating a pipe with `@Pipe` decorator where we use a shorthand syntax for passing properties [#399](https://github.com/mgechev/codelyzer/issues/399) [8e3fafb](https://github.com/mgechev/codelyzer/commit/8e3fafb9658aec5dd73c7bf4c401457622ad0c99) -- Broken `check-pipe` option of `angular-whitespace` [#365](https://github.com/mgechev/codelyzer/issues/365) [bef790b](https://github.com/mgechev/codelyzer/pull/405) -- Some rules report false positives [#379](https://github.com/mgechev/codelyzer/issues/379) [8719674](https://github.com/mgechev/codelyzer/pull/381) [4721aca](https://github.com/mgechev/codelyzer/pull/401) [bef790b](https://github.com/mgechev/codelyzer/pull/405) - +* Error on validating a pipe with `@Pipe` decorator where we use a shorthand syntax for passing properties [#399](https://github.com/mgechev/codelyzer/issues/399) [8e3fafb](https://github.com/mgechev/codelyzer/commit/8e3fafb9658aec5dd73c7bf4c401457622ad0c99) +* Broken `check-pipe` option of `angular-whitespace` [#365](https://github.com/mgechev/codelyzer/issues/365) [bef790b](https://github.com/mgechev/codelyzer/pull/405) +* Some rules report false positives [#379](https://github.com/mgechev/codelyzer/issues/379) [8719674](https://github.com/mgechev/codelyzer/pull/381) [4721aca](https://github.com/mgechev/codelyzer/pull/401) [bef790b](https://github.com/mgechev/codelyzer/pull/405) Thanks to [@wKoza](https://github.com/wKoza) for working on the introduced features, bug fixes and code reviews! @@ -130,7 +128,7 @@ Thanks to [@wKoza](https://github.com/wKoza) for working on the introduced featu ### Features -- Ensure whitespaces after semicolon in structural dir [#330](https://github.com/mgechev/codelyzer/issues/330) [25667f9](https://github.com/mgechev/codelyzer/commit/25667f9741ba497a70f94e65b7677f0121fda9bc) +* Ensure whitespaces after semicolon in structural dir [#330](https://github.com/mgechev/codelyzer/issues/330) [25667f9](https://github.com/mgechev/codelyzer/commit/25667f9741ba497a70f94e65b7677f0121fda9bc) Thanks to [@wKoza](https://github.com/wKoza) for code reviews and implementation of `"check-semicolon"`. @@ -138,53 +136,52 @@ Thanks to [@wKoza](https://github.com/wKoza) for code reviews and implementation ### Bug Fixes -- Auto fix for check-interpolation part of angularWhitespace is broken [#345](https://github.com/mgechev/codelyzer/issues/345) [0be8563](https://github.com/mgechev/codelyzer/pull/362) -- check-pipe should ignore i18n meaning and description | separator [#359](https://github.com/mgechev/codelyzer/issues/359) [5aad7f3](https://github.com/mgechev/codelyzer/commit/5aad7f37b967265f831a4b486d73586dc8885a7e) -- check-pipe breaks with ngFor [#346](https://github.com/mgechev/codelyzer/issues/346) [fa08a3b](https://github.com/mgechev/codelyzer/commit/fa08a3be4bf8588336c07c579e6fbfc7d75ae8dd) +* Auto fix for check-interpolation part of angularWhitespace is broken [#345](https://github.com/mgechev/codelyzer/issues/345) [0be8563](https://github.com/mgechev/codelyzer/pull/362) +* check-pipe should ignore i18n meaning and description | separator [#359](https://github.com/mgechev/codelyzer/issues/359) [5aad7f3](https://github.com/mgechev/codelyzer/commit/5aad7f37b967265f831a4b486d73586dc8885a7e) +* check-pipe breaks with ngFor [#346](https://github.com/mgechev/codelyzer/issues/346) [fa08a3b](https://github.com/mgechev/codelyzer/commit/fa08a3be4bf8588336c07c579e6fbfc7d75ae8dd) # 3.1.1 ### Bug Fixes -- Incorrect rule name in documentation [#344](https://github.com/mgechev/codelyzer/issues/344) [6656b81](https://github.com/mgechev/codelyzer/commit/6656b81dfd6466e090776d0bdb9f225169b6b7f0) -- Proper displacement in the reports for non-TypeScript files [#343](https://github.com/mgechev/codelyzer/issues/343) [c503510](https://github.com/mgechev/codelyzer/commit/c5035101957fe1223915968272c42feb47a7c6fa) +* Incorrect rule name in documentation [#344](https://github.com/mgechev/codelyzer/issues/344) [6656b81](https://github.com/mgechev/codelyzer/commit/6656b81dfd6466e090776d0bdb9f225169b6b7f0) +* Proper displacement in the reports for non-TypeScript files [#343](https://github.com/mgechev/codelyzer/issues/343) [c503510](https://github.com/mgechev/codelyzer/commit/c5035101957fe1223915968272c42feb47a7c6fa) # 3.1.0 ### New rules -- `angular-whitespace: [true, "check-interpolation", "check-pipe"]` - Checks if there's whitespace around an expression surrounded by interpolation characters, and after a pipe symbol. -- `banana-in-box: true` - Checks for proper banana in a box syntax - `[(ngModel)]` instead of `([ngModel])`. -- `templates-no-negated-async: true` - Enforces `(foo | async) === false`, rather than `!(foo | async)`, because of the initial falsy value emitted. -- `use-view-encapsulation: true` - Enforces enabled view encapsulation. +* `angular-whitespace: [true, "check-interpolation", "check-pipe"]` - Checks if there's whitespace around an expression surrounded by interpolation characters, and after a pipe symbol. +* `banana-in-box: true` - Checks for proper banana in a box syntax - `[(ngModel)]` instead of `([ngModel])`. +* `templates-no-negated-async: true` - Enforces `(foo | async) === false`, rather than `!(foo | async)`, because of the initial falsy value emitted. +* `use-view-encapsulation: true` - Enforces enabled view encapsulation. **Special thanks to [@wKoza](https://github.com/wKoza), [@GregOnNet](https://github.com/GregOnNet) and [@connor4312](https://github.com/connor4312) for their contributions.** ### Features -- Align to the template parser API of Angular compiler 4.1.0 [#301](https://github.com/mgechev/codelyzer/issues/301) [0fcdcd1](https://github.com/mgechev/codelyzer/commit/0fcdcd102431690f78b4bc923881d324534b52e3) -- Align to the changes in the template parser API 4.1.3 [#319](https://github.com/mgechev/codelyzer/issues/319) [b608296](https://github.com/mgechev/codelyzer/commit/b60829663383adcaa8b2570f56242ce34e1d94a1) -- Rule for enforcing `ViewEncapsulation` [#300](https://github.com/mgechev/codelyzer/issues/300) [509c8d9](https://github.com/mgechev/codelyzer/commit/509c8d953f0e03adb8b68b1ba98fdcfcc374152b). Big thanks to @GregOnNet. -- Add a no-negated-async rule [#332](https://github.com/mgechev/codelyzer/issues/332) [0f0924d](https://github.com/mgechev/codelyzer/commit/0f0924d499217a61759f4f1b49fe30a32d0ad197). Big thanks to @connor4312. -- Enforce proper banana in a box syntax [#331](https://github.com/mgechev/codelyzer/issues/331) [f95b2d5](https://github.com/mgechev/codelyzer/pull/322) -- Ensure whitespace around interpolation [#320](https://github.com/mgechev/codelyzer/issues/320) [335776f](https://github.com/mgechev/codelyzer/commit/335776ff24ecc81a743ff0cc70aaf01442462b8a) +* Align to the template parser API of Angular compiler 4.1.0 [#301](https://github.com/mgechev/codelyzer/issues/301) [0fcdcd1](https://github.com/mgechev/codelyzer/commit/0fcdcd102431690f78b4bc923881d324534b52e3) +* Align to the changes in the template parser API 4.1.3 [#319](https://github.com/mgechev/codelyzer/issues/319) [b608296](https://github.com/mgechev/codelyzer/commit/b60829663383adcaa8b2570f56242ce34e1d94a1) +* Rule for enforcing `ViewEncapsulation` [#300](https://github.com/mgechev/codelyzer/issues/300) [509c8d9](https://github.com/mgechev/codelyzer/commit/509c8d953f0e03adb8b68b1ba98fdcfcc374152b). Big thanks to @GregOnNet. +* Add a no-negated-async rule [#332](https://github.com/mgechev/codelyzer/issues/332) [0f0924d](https://github.com/mgechev/codelyzer/commit/0f0924d499217a61759f4f1b49fe30a32d0ad197). Big thanks to @connor4312. +* Enforce proper banana in a box syntax [#331](https://github.com/mgechev/codelyzer/issues/331) [f95b2d5](https://github.com/mgechev/codelyzer/pull/322) +* Ensure whitespace around interpolation [#320](https://github.com/mgechev/codelyzer/issues/320) [335776f](https://github.com/mgechev/codelyzer/commit/335776ff24ecc81a743ff0cc70aaf01442462b8a) ### Bug Fixes -- Template micro-syntax closure and 'bind only to public class members' [#220](https://github.com/mgechev/codelyzer/issues/220) [61f9fe9](https://github.com/mgechev/codelyzer/commit/61f9fe9e664ada53518679e8060deba2839793c7) -- Report warnings when bound to private iterable in `*ngFor` [#306](https://github.com/mgechev/codelyzer/issues/306) [36705fc](https://github.com/mgechev/codelyzer/commit/36705fc3b708146880ea14ac0b918af7e67f1401) -- 'templates-use-public' throws error when attempting to access a property of a property with the [] syntax [#315](https://github.com/mgechev/codelyzer/issues/315) [6323d2c](https://github.com/mgechev/codelyzer/commit/6323d2cdf3916d7ab8dfa8f694aaa21a5a68edc3) -- no-access-missing-member doesn't work with external HTML [#311](https://github.com/mgechev/codelyzer/issues/311) [b608296](https://github.com/mgechev/codelyzer/commit/b60829663383adcaa8b2570f56242ce34e1d94a1) -- rules name in documentation aren't consistent [#325](https://github.com/mgechev/codelyzer/issues/325) [7a67607](https://github.com/mgechev/codelyzer/pull/326). Big thanks to @wKoza. -- Our links to angular.io are broken [#333](https://github.com/mgechev/codelyzer/issues/333) [5a532b4](https://github.com/mgechev/codelyzer/pull/334). Big thanks to @wKoza. -- Report errors twice [#336](https://github.com/mgechev/codelyzer/issues/336) [44a9306](https://github.com/mgechev/codelyzer/pull/339) - +* Template micro-syntax closure and 'bind only to public class members' [#220](https://github.com/mgechev/codelyzer/issues/220) [61f9fe9](https://github.com/mgechev/codelyzer/commit/61f9fe9e664ada53518679e8060deba2839793c7) +* Report warnings when bound to private iterable in `*ngFor` [#306](https://github.com/mgechev/codelyzer/issues/306) [36705fc](https://github.com/mgechev/codelyzer/commit/36705fc3b708146880ea14ac0b918af7e67f1401) +* 'templates-use-public' throws error when attempting to access a property of a property with the [] syntax [#315](https://github.com/mgechev/codelyzer/issues/315) [6323d2c](https://github.com/mgechev/codelyzer/commit/6323d2cdf3916d7ab8dfa8f694aaa21a5a68edc3) +* no-access-missing-member doesn't work with external HTML [#311](https://github.com/mgechev/codelyzer/issues/311) [b608296](https://github.com/mgechev/codelyzer/commit/b60829663383adcaa8b2570f56242ce34e1d94a1) +* rules name in documentation aren't consistent [#325](https://github.com/mgechev/codelyzer/issues/325) [7a67607](https://github.com/mgechev/codelyzer/pull/326). Big thanks to @wKoza. +* Our links to angular.io are broken [#333](https://github.com/mgechev/codelyzer/issues/333) [5a532b4](https://github.com/mgechev/codelyzer/pull/334). Big thanks to @wKoza. +* Report errors twice [#336](https://github.com/mgechev/codelyzer/issues/336) [44a9306](https://github.com/mgechev/codelyzer/pull/339) # 3.0.1 ### Bug Fixes -- Export `usePipeDecoratorRule` [#299](https://github.com/mgechev/codelyzer/issues/299) [c5869e0](https://github.com/mgechev/codelyzer/commit/c5869e04cdfedb1c58fac9c0f6bef027a745badf). +* Export `usePipeDecoratorRule` [#299](https://github.com/mgechev/codelyzer/issues/299) [c5869e0](https://github.com/mgechev/codelyzer/commit/c5869e04cdfedb1c58fac9c0f6bef027a745badf). # 3.0.0 @@ -192,74 +189,74 @@ Major release required because of the breaking changes introduced by tslint@5. T ### Features -- Support for tslint@5 [#281](https://github.com/mgechev/codelyzer/issues/281) [01bffd5](https://github.com/mgechev/codelyzer/commit/01bffd559044521967962b2a0cfee31f409e4c2e) [49b1e80](https://github.com/mgechev/codelyzer/commit/49b1e80debc232719ee56c1fbedf63f3a0761549) -- Allow more than one selector kind of directives & components [#290](https://github.com/mgechev/codelyzer/issues/290) [4fa35f6](https://github.com/mgechev/codelyzer/commit/4fa35f6c0b8d9948cc0b5f38997bb11d4e5af8df) +* Support for tslint@5 [#281](https://github.com/mgechev/codelyzer/issues/281) [01bffd5](https://github.com/mgechev/codelyzer/commit/01bffd559044521967962b2a0cfee31f409e4c2e) [49b1e80](https://github.com/mgechev/codelyzer/commit/49b1e80debc232719ee56c1fbedf63f3a0761549) +* Allow more than one selector kind of directives & components [#290](https://github.com/mgechev/codelyzer/issues/290) [4fa35f6](https://github.com/mgechev/codelyzer/commit/4fa35f6c0b8d9948cc0b5f38997bb11d4e5af8df) ``` "directive-selector": [true, ["attribute", "element"], "sg", "camelCase"], "component-selector": [true, ["element", "attribute"], "sg", "kebab-case"], ``` -- Specs for the support of `as` syntax in expressions [#289](https://github.com/mgechev/codelyzer/issues/289) [a7500cb](https://github.com/mgechev/codelyzer/commit/a7500cb3605f28f65e58e80559a9d3548d95549c) +* Specs for the support of `as` syntax in expressions [#289](https://github.com/mgechev/codelyzer/issues/289) [a7500cb](https://github.com/mgechev/codelyzer/commit/a7500cb3605f28f65e58e80559a9d3548d95549c) ### Refactoring -- Rename `ng2Walker` to `ngWalker` [01bffd5](https://github.com/mgechev/codelyzer/commit/01bffd559044521967962b2a0cfee31f409e4c2e) -- Refactor selector-related rules to depend on less mutable state [4fa35f6](https://github.com/mgechev/codelyzer/commit/4fa35f6c0b8d9948cc0b5f38997bb11d4e5af8df) +* Rename `ng2Walker` to `ngWalker` [01bffd5](https://github.com/mgechev/codelyzer/commit/01bffd559044521967962b2a0cfee31f409e4c2e) +* Refactor selector-related rules to depend on less mutable state [4fa35f6](https://github.com/mgechev/codelyzer/commit/4fa35f6c0b8d9948cc0b5f38997bb11d4e5af8df) # 2.1.1 ### Bug Fixes -- Breaking change in the TypeScript AST regarding `importDestructuringSpacingRule` [#282](https://github.com/mgechev/codelyzer/issues/282) [eebf10a](https://github.com/mgechev/codelyzer/commit/eebf10adc3bd67101a06abfb19d35729a2210d46) +* Breaking change in the TypeScript AST regarding `importDestructuringSpacingRule` [#282](https://github.com/mgechev/codelyzer/issues/282) [eebf10a](https://github.com/mgechev/codelyzer/commit/eebf10adc3bd67101a06abfb19d35729a2210d46) # 2.1.0 ### Features -- Automatic removal of dead styles (experimental) [#244](https://github.com/mgechev/codelyzer/issues/244) [30f2667](https://github.com/mgechev/codelyzer/pull/246) -- Warning for the deprecated `