Skip to content

Commit 7b9078e

Browse files
chore: fix update scripts (#93)
1 parent 3451236 commit 7b9078e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

scripts/update-docs-index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const { withCategories } = require("./lib/rules")
1515
*/
1616
function toTableRow(rule) {
1717
const mark = `${rule.recommended ? "🌟" : ""}${rule.fixable ? "✒️" : ""}`
18-
const link = `[eslint-comments/<wbr>${rule.name}](./${rule.name}.md)`
18+
const link = `[@eslint-community/eslint-comments/<wbr>${rule.name}](./${rule.name}.md)`
1919
const description = rule.description || "(no description)"
2020
return `| ${link} | ${description} | ${mark} |`
2121
}
@@ -38,7 +38,7 @@ fs.writeFileSync(
3838
path.resolve(__dirname, "../docs/rules/README.md"),
3939
`# Available Rules
4040
41-
- 🌟 mark: the rule which is enabled by \`eslint-comments/recommended\` preset.
41+
- 🌟 mark: the rule which is enabled by \`@eslint-community/eslint-comments/recommended\` preset.
4242
- ✒️ mark: the rule which is fixable by \`eslint --fix\` command.
4343
4444
${withCategories.map(toCategorySection).join("\n")}

scripts/update-recommended-rules.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ const rules = require("./lib/rules")
1010
const { format } = require("./lib/utils")
1111

1212
// recommended.js
13-
fs.writeFileSync(
14-
path.resolve(__dirname, "../lib/configs/recommended.js"),
15-
format(`/** DON'T EDIT THIS FILE; was created by scripts. */
13+
format(`/** DON'T EDIT THIS FILE; was created by scripts. */
1614
"use strict"
1715
1816
module.exports = {
@@ -24,5 +22,9 @@ module.exports = {
2422
.join("\n ")}
2523
},
2624
}
27-
`)
25+
`).then((content) =>
26+
fs.writeFileSync(
27+
path.resolve(__dirname, "../lib/configs/recommended.js"),
28+
content
29+
)
2830
)

0 commit comments

Comments
 (0)