-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure boolean assertions are not missed by several rules #172
Ensure boolean assertions are not missed by several rules #172
Conversation
Adds the new boolean assertions (`true` and `false`) to our list of assertions so that they will be taken into account by several rules. Adds test cases to several rules.
@@ -49,6 +50,7 @@ ruleTester.run("no-global-assertions", rule, { | |||
wrap("assert.notPropEqual(a, b);"), | |||
wrap("assert.raises(function () {}, TypeError);"), | |||
wrap("assert.throws(function () {}, TypeError);"), | |||
wrap("assert.true(foo);"), |
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 was not able to add invalid
test cases to this rule for the boolean assertions. Maybe true
and false
can't be added as globals because they are reserved keywords in JS?
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.
Just a couple of minor changes, I think. Let me know if I'm missing anything.
Co-authored-by: Kevin Partington <platinumazure@gmail.com>
Co-authored-by: Kevin Partington <platinumazure@gmail.com>
Co-authored-by: Kevin Partington <platinumazure@gmail.com>
Co-authored-by: Kevin Partington <platinumazure@gmail.com>
Accepted your suggestions. |
Thanks! |
* master: Update: Ensure boolean assertions are not missed by several rules (platinumazure#172) Chore: add eslint-plugin-eslint-comments (platinumazure#178) Docs: enable/autofix indent rule in markdown JS code samples (platinumazure#177) Docs: Add eslint-plugin-markdown for JavaScript code samples in documentation (platinumazure#176) Upgrade: Bump y18n from 4.0.0 to 4.0.1 (platinumazure#163)
Fixes #169. Adds the new boolean assertions (
true
andfalse
) to our list of assertions so that they will be taken into account by several rules. Adds test cases to several rules.