-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
Conversation
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.
Neat!
scripts/utils.mjs
Outdated
export const RULE_NOTICE_END_MARK = '<!-- RULE_NOTICE_END -->'; | ||
|
||
const recommendedRules = getRecommendedRules(); | ||
export function getRuleNotice(id) { |
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.
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?
scripts/generate-rule-notice.mjs
Outdated
|
||
const rules = Object.entries(eslintPluginUnicorn.rules).filter(([, rule]) => !rule.meta.deprecated).map(([id]) => id); | ||
|
||
async function updateNotice(id) { |
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.
Naming for better clarity?
async function updateNotice(id) { | |
async function updateNotices(ruleId) { |
Co-authored-by: Bryan Mishkin <698306+bmish@users.noreply.github.com>
Co-authored-by: Bryan Mishkin <698306+bmish@users.noreply.github.com>
No description provided.