-
Notifications
You must be signed in to change notification settings - Fork 61
New: Add no-parameter-properties #53
New: Add no-parameter-properties #53
Conversation
| } | ||
|
|
||
| class Foo { | ||
| constructor(public readonly name: string) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be allowed if the options are { "allows": ["public", "readonly"] }?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added accesibility + readonly modifiers as separate options to avoid scenarios like 'I want to allow protected, public and public readonly, but no protected readonly'.
Does that make sense? it did when I was writing it, but I'm open to suggestions...
README.md
Outdated
| * [`typescript/member-ordering`](./docs/rules/member-ordering.md) — enforces a standard member declaration order. (`member-ordering` from TSLint) | ||
| * [`typescript/no-unused-vars`](./docs/rules/no-unused-vars.md) — prevents TypeScript-specific constructs from being erroneously flagged as unused | ||
| * [`typescript/adjacent-overload-signatures`](./docs/rules/adjacent-overload-signatures.md) — enforces member overloads to be consecutive. | ||
| * [`typescript/no-parameter-properties`](./docs/rules/no-parameter-properties.md) - disallows parameter properties in class constructors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reference the name of the TSLint rule here?
|
I resolved the conflicts on here too @weirdpattern, so make sure you pull before continuing to work on it 👍 |
e4b6fea to
b4e069c
Compare
|
I did the same as you did, used github to resolve the conflict... |
This includes
New rule no-parameter-properties
Corresponding test
Corresponding documentation
Update to README.md to include the new rule
Related to #5 (TSLint compatibility)