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

Auto generate rule notice #1680

Merged
merged 14 commits into from
Jan 5, 2022
Merged

Auto generate rule notice #1680

merged 14 commits into from
Jan 5, 2022

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Jan 4, 2022

No description provided.

@fisker fisker requested a review from bmish January 4, 2022 09:25
@fisker fisker marked this pull request as ready for review January 4, 2022 09:29
Copy link
Contributor

@bmish bmish left a comment

Choose a reason for hiding this comment

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

Neat!

scripts/utils.mjs Outdated Show resolved Hide resolved
test/package.mjs Outdated Show resolved Hide resolved
export const RULE_NOTICE_END_MARK = '<!-- RULE_NOTICE_END -->';

const recommendedRules = getRecommendedRules();
export function getRuleNotice(id) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a bit odd that this has "notice" singular in the name given it can include multiple notices. Maybe call it getRuleNoticesSectionBody to indicate it returns potentially multiple lines of notices?


const rules = Object.entries(eslintPluginUnicorn.rules).filter(([, rule]) => !rule.meta.deprecated).map(([id]) => id);

async function updateNotice(id) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Naming for better clarity?

Suggested change
async function updateNotice(id) {
async function updateNotices(ruleId) {

fisker and others added 5 commits January 5, 2022 09:56
test/package.mjs Outdated Show resolved Hide resolved
Co-authored-by: Bryan Mishkin <698306+bmish@users.noreply.github.com>
@fisker fisker merged commit 7a4bc97 into sindresorhus:main Jan 5, 2022
@fisker fisker deleted the rule-notice branch January 5, 2022 11:21
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.

2 participants