Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Switch to xo for linting #816

wants to merge 4 commits into from

Conversation

XhmikosR
Copy link
Member

@XhmikosR XhmikosR commented May 2, 2023

Will conflict with #815, I'll rebase if needed.


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",
Copy link
Member Author

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)) {
Copy link
Member Author

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.

@XhmikosR XhmikosR marked this pull request as ready for review May 2, 2023 15:14
@XhmikosR XhmikosR marked this pull request as draft May 2, 2023 15:15
@@ -42,7 +42,7 @@ rule.messages = messages;
rule.meta = meta;

function isLoudComment(comment) {
const regex = new RegExp(/^[ \t\n]*\/\*/);
const regex = /^[ \t\n]*\/\*/;
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant