Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Added 2 (+/-1) sentence rationales for 2/3 of rules #3734

Merged
merged 37 commits into from
Apr 5, 2018
Merged

Added 2 (+/-1) sentence rationales for 2/3 of rules #3734

merged 37 commits into from
Apr 5, 2018

Conversation

JoshuaKGoldberg
Copy link
Contributor

PR checklist

Overview of change:

Adds rationales 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. 😄

Josh Goldberg added 30 commits January 30, 2018 07:27
Copy link
Contributor

@johnwiseheart johnwiseheart left a 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.

@@ -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: `
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha yes, I did.

@johnwiseheart johnwiseheart merged commit 42b058a into palantir:master Apr 5, 2018
@JoshuaKGoldberg JoshuaKGoldberg deleted the rationales/1 branch April 5, 2018 19:49
@JoshuaKGoldberg
Copy link
Contributor Author

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?

@johnwiseheart
Copy link
Contributor

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!

@suchanlee
Copy link
Contributor

this is awesome, thanks @JoshuaKGoldberg!!

HyphnKnight pushed a commit to HyphnKnight/tslint that referenced this pull request Apr 9, 2018
* 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants