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

Add nested accessors under the ban rule? #2821

Closed
JoshuaKGoldberg opened this issue May 24, 2017 · 1 comment · Fixed by #2547
Closed

Add nested accessors under the ban rule? #2821

JoshuaKGoldberg opened this issue May 24, 2017 · 1 comment · Fixed by #2547

Comments

@JoshuaKGoldberg
Copy link
Contributor

Bug Report

  • TSLint version: 5.3.2
  • TypeScript version: 2.3
  • Running TSLint via: (pick one) VSCode

TypeScript code being linted

chai.assert.equal(foo, bar); // should be strictEqual instead

with tslint.json configuration:

{
    "rules": {
        "ban": [
            true,
            ["chai.assert", "equal", "Use strictEqual (===) instead of equal (==)."],
            ["chai", "assert.equal", "Use strictEqual (===) instead of equal (==)."]
        ]
    }
}

Actual behavior

No errors.

Expected behavior

Either should complain about using equal instead of strictEqual.

@ajafff
Copy link
Contributor

ajafff commented May 24, 2017

linking discussion in my PR #2547 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants