-
Notifications
You must be signed in to change notification settings - Fork 92
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
Switch to xo for linting #816
Conversation
|
||
const ruleName = namespace("at-if-no-null"); | ||
|
||
const messages = utils.ruleMessages(ruleName, { | ||
equals_null: "Expected @if not statement rather than @if statement == null", | ||
not_equals_null: "Expected @if statement rather than @if statement != null" | ||
equalsNull: "Expected @if not statement rather than @if statement == null", |
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.
AFAICT these are only used in tests, but let me know if the change is considered a breaking one, and I'll revert and add a TODO
@@ -32,20 +32,20 @@ function rule(expectation) { | |||
} | |||
|
|||
// If rule != null and (expr), skip | |||
if (atrule.params.match(/.* != null and .*/)) { | |||
if (/.* != null and .*/.test(atrule.params)) { |
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 kept the test
changes as a separate patch; let me know if you want me to drop them.
@@ -42,7 +42,7 @@ rule.messages = messages; | |||
rule.meta = meta; | |||
|
|||
function isLoudComment(comment) { | |||
const regex = new RegExp(/^[ \t\n]*\/\*/); | |||
const regex = /^[ \t\n]*\/\*/; |
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.
This needs a confirmation just in case
4cfd043
to
3e1b9a2
Compare
Will conflict with #815, I'll rebase if needed.