Skip to content

Commit 1152cf9

Browse files
committed
Add doc
1 parent d7749d5 commit 1152cf9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/eslint-plugin/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/usr/bin/env node
22

3-
// menu generator
3+
// eslint plugin rule utility
44
// ============================
55
// generates the _menu.md file to make sure all rules are included.
6+
// Also generates a stub markdown file for a new rule.
67

78
import * as fs from 'node:fs'
89
import * as path from 'node:path'
@@ -39,12 +40,12 @@ function generateMenuMarkdown () {
3940
}
4041

4142
/**
42-
* Generates a stub markdown file for a new rule.
43+
* Generates a stub markdown file for a new JS rule.
4344
* The passed ruleName will be placed in the stub template
4445
* where $RULE_NAME is defined.
4546
* @param {string} ruleName - The name of the rule.
4647
*/
47-
function generateStub (ruleName) {
48+
function generateJsRuleStub (ruleName) {
4849
if (!ruleName) {
4950
console.error('Please provide a rule name, e.g. "no-shared-handler-variables" as second argument');
5051
process.exit(1);
@@ -72,7 +73,7 @@ function main (argv) {
7273
generateMenuMarkdown();
7374
break;
7475
case 'generate-stub':
75-
generateStub(argv[1]);
76+
generateJsRuleStub(argv[1]);
7677
generateMenuMarkdown();
7778
break;
7879
default:

0 commit comments

Comments
 (0)