-
Notifications
You must be signed in to change notification settings - Fork 885
Added 2 (+/-1) sentence rationales for 2/3 of rules #3734
Conversation
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.
Sorry it took so long to review this @JoshuaKGoldberg.
Just one nit, and then we can merge it in. Thanks so much for your help in improving TSLint!
It would be great if you wouldn't mind resolving the merge conflicts too.
src/rules/noNonNullAssertionRule.ts
Outdated
@@ -24,7 +24,35 @@ export class Rule extends Lint.Rules.AbstractRule { | |||
public static metadata: Lint.IRuleMetadata = { | |||
ruleName: "no-non-null-assertion", | |||
description: "Disallows non-null assertions using the `!` postfix operator.", | |||
rationale: "Using non-null assertion cancels the benefits of the strict null checking mode.", | |||
rationale: ` |
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.
Did you forget Lint.Utils.dedent
here?
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.
Haha yes, I did.
Whoohoo! @johnwiseheart out of curiosity - what is the process for updating palantir.github.io/tslint? Is there any chance of getting this particular change up soon / before 5.9.2/6.0? |
Not quite sure yet - theres some build issues that we need to fix (saw your recent ticket), and then we can work out the process for updating the website - it would be great if we could update docs changes instantly, but it still might be a little while before we can get these changes online. Will keep you posted! |
this is awesome, thanks @JoshuaKGoldberg!! |
* Added a couple extra docs lines to align * Added a couple extra docs lines to arrow-return-shorthand * Added a couple extra docs lines to await-promise * Added a couple extra docs lines to binary-expression-operand-order * Added a couple extra docs to class-name * Added a couple extra docs to completed-docs * Added another doc line to cyclomatic-complexity * Switch link to https in eofline * Added a couple extra docs to for-in * Added a couple extra docs to member-access * Added a couple extra docs to member-ordering * Added a couple extra docs to no-any * Added a couple extra docs to no-boolean-literal-compare * Added a couple extra docs to no-consecutive-blank-lines * Added a couple extra docs to no-dynamic-delete * Added a couple extra docs to no-floating-promises * Added a couple extra docs to no-inferred-empty-object-type * Added a brief rationale to no-invalid-template-strings-rule * Typo correction on no-magic-numbers * Added a couple extra docs to no-misused-new * Added a couple extra docs to no-non-null-assertion * Added a couple extra docs to no-null-keyword * Added a couple extra docs to no-parameter-properties * Added a couple extra docs to no-shadowed-variable * Added a couple extra docs to no-string-throw * Added a couple extra docs to no-this-assignment * Added a couple extra docs to no-unbound-method * Added a couple extra docs to no-unnecessary-callback-wrapper * Added a couple extra docs to no-unnecessary-initializer * Added a couple extra docs to no-unsafe-any * Added a couple extra docs to no-unused-variable * Added a couple extra docs to no-var-keyword * Added a couple extra docs to no-var-requires * Added a couple extra docs to no-void-expression * Added a couple extra docs to number-literal-format * Missing dedent in no-non-null-assertion
PR checklist
Overview of change:
Adds
rationale
s to about many of the core rules (I ran out of steam about 2/3 of the way through). I'd considered sending a separate PR for each, but don't want to irritate ajafff too much. 😄