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

Breaking: Update no-missing-placeholders, no-unused-placeholders, prefer-message-ids, prefer-placeholders rules to also apply to suggestion messages #196

Merged

Conversation

bmish
Copy link
Member

@bmish bmish commented Sep 26, 2021

Rules should apply to both violation messages and suggestion messages.

Fixes #191.

Part of v4 release (#120).

@bmish bmish force-pushed the no-missing-placeholders-suggestion branch 2 times, most recently from 6bf4356 to 25864c0 Compare September 26, 2021 23:28
@bmish bmish changed the title Breaking: Update no-missing-placeholders rule to also apply to suggestion messages Breaking: Update no-missing-placeholders and no-unused-placeholders rules to also apply to suggestion messages Sep 26, 2021
@bmish bmish force-pushed the no-missing-placeholders-suggestion branch from 25864c0 to e072f20 Compare September 26, 2021 23:39
@bmish bmish marked this pull request as draft September 26, 2021 23:40
@bmish bmish force-pushed the no-missing-placeholders-suggestion branch 2 times, most recently from e3ecac2 to 13b16e9 Compare September 26, 2021 23:59
@bmish bmish marked this pull request as ready for review September 27, 2021 00:01
@bmish bmish changed the title Breaking: Update no-missing-placeholders and no-unused-placeholders rules to also apply to suggestion messages Breaking: Update no-missing-placeholders, no-unused-placeholders, prefer-message-ids, prefer-placeholderds rules to also apply to suggestion messages Sep 27, 2021
@bmish bmish changed the title Breaking: Update no-missing-placeholders, no-unused-placeholders, prefer-message-ids, prefer-placeholderds rules to also apply to suggestion messages Breaking: Update no-missing-placeholders, no-unused-placeholders, prefer-message-ids, prefer-placeholders rules to also apply to suggestion messages Sep 27, 2021
const property = obj.properties.find(prop => prop.key.type === 'Identifier' && prop.key.name === keyName);
return property ? property.value : undefined;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, better to have a test for it. :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, added a test for the new util function collectReportViolationAndSuggestionData.

… `prefer-message-ids`, `prefer-placeholders` rules to also apply to suggestion messages
@bmish bmish force-pushed the no-missing-placeholders-suggestion branch from 13b16e9 to 123d8fb Compare September 27, 2021 02:56
Copy link
Contributor

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

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

Successfully merging this pull request may close these issues.

Breaking: Message rules should be updated to apply to suggestion messages
2 participants