Skip to content

Commit

Permalink
Merge pull request #147 from yinm/tweak-scaffolding
Browse files Browse the repository at this point in the history
Tweak `generate-rule`
  • Loading branch information
yannbf authored May 17, 2024
2 parents bd1b02e + a2fc883 commit eef5e25
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/generate-rule.ts
Original file line number Diff line number Diff line change
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

0 comments on commit eef5e25

Please sign in to comment.