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

Tweak generate-rule #147

Merged
merged 3 commits into from May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions tools/generate-rule.ts
Expand Up @@ -81,7 +81,7 @@ const generateRule = async () => {
meta: {
type: 'problem', // \`problem\`, \`suggestion\`, or \`layout\`
docs: {
description: 'Fill me in',
description: '${ruleDescription}',
// Add the categories that suit this rule.
categories: [CategoryId.RECOMMENDED],
recommended: 'warn', // \`warn\` or \`error\`
Expand Down Expand Up @@ -138,7 +138,9 @@ const generateRule = async () => {
},
}
},
})\n`)
})

`)
)

logger.log(`creating tests/lib/rules/${ruleId}.test.ts`)
Expand Down Expand Up @@ -178,7 +180,8 @@ const generateRule = async () => {
},
],
})
`)

`)
)

logger.log(`creating docs/rules/${ruleId}.md`)
Expand All @@ -197,17 +200,13 @@ const generateRule = async () => {
Examples of **incorrect** code for this rule:

\`\`\`js

// fill me in

\`\`\`

Examples of **correct** code for this rule:

\`\`\`js

// fill me in

\`\`\`

### Options
Expand All @@ -221,7 +220,8 @@ const generateRule = async () => {
## Further Reading

If there are other links that describe the issue this rule addresses, please include them here in a bulleted list. Otherwise, delete this section.
`)

`)
)

const { shouldOpenInVSCode } = await prompts({
Expand Down