Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Allow links to pending issues for no-suspicious-comment #440

Closed
JoshuaKGoldberg opened this issue Jun 17, 2018 · 0 comments
Closed

Allow links to pending issues for no-suspicious-comment #440

JoshuaKGoldberg opened this issue Jun 17, 2018 · 0 comments
Labels
Difficulty: Medium People with non-trivial experience in TSLint should be able to send a pull request for this issue. Status: Accepting PRs Type: Rule Feature Adding a feature to an existing rule.
Milestone

Comments

@JoshuaKGoldberg
Copy link

Request: add an option to no-suspicious-comment to allow comments linking to an issue tracker.

This is bad:

// TODO remove this when {work} happens
this.unsafeThingThatShouldBeRemovedSoon();

However, if we have a tracking item to resolve the TODO, it's useful to keep a link to that item in code:

// See https://github.com/my-org/my-project/123
// TODO remove this when {work} happens
this.unsafeThingThatShouldBeRemovedSoon();

It could be configured like so:

"no-suspicious-comment": [true, [
    "https://github.com/my-org/my-project/(.*)"
]],

...and if there are regexps allowed, change the rule warning string to mention the allowed formats?

@JoshuaKGoldberg JoshuaKGoldberg added Status: Accepting PRs Difficulty: Medium People with non-trivial experience in TSLint should be able to send a pull request for this issue. Type: Rule Feature Adding a feature to an existing rule. labels Jul 4, 2018
JoshuaKGoldberg pushed a commit that referenced this issue Nov 5, 2018
* Fix #440: Add regex option to no-suspicious-comment

* Fix #440 Mention regex in failure message

* #631 Mark 'exceptionRegex' as readonly
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0-beta0 milestone Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Difficulty: Medium People with non-trivial experience in TSLint should be able to send a pull request for this issue. Status: Accepting PRs Type: Rule Feature Adding a feature to an existing rule.
Projects
None yet
Development

No branches or pull requests

1 participant