diff --git a/scripts/update-docs-index.js b/scripts/update-docs-index.js index a766792..f86ca98 100644 --- a/scripts/update-docs-index.js +++ b/scripts/update-docs-index.js @@ -15,7 +15,7 @@ const { withCategories } = require("./lib/rules") */ function toTableRow(rule) { const mark = `${rule.recommended ? "🌟" : ""}${rule.fixable ? "✒️" : ""}` - const link = `[eslint-comments/${rule.name}](./${rule.name}.md)` + const link = `[@eslint-community/eslint-comments/${rule.name}](./${rule.name}.md)` const description = rule.description || "(no description)" return `| ${link} | ${description} | ${mark} |` } @@ -38,7 +38,7 @@ fs.writeFileSync( path.resolve(__dirname, "../docs/rules/README.md"), `# Available Rules -- 🌟 mark: the rule which is enabled by \`eslint-comments/recommended\` preset. +- 🌟 mark: the rule which is enabled by \`@eslint-community/eslint-comments/recommended\` preset. - ✒️ mark: the rule which is fixable by \`eslint --fix\` command. ${withCategories.map(toCategorySection).join("\n")} diff --git a/scripts/update-recommended-rules.js b/scripts/update-recommended-rules.js index ebaaed6..a421132 100644 --- a/scripts/update-recommended-rules.js +++ b/scripts/update-recommended-rules.js @@ -10,9 +10,7 @@ const rules = require("./lib/rules") const { format } = require("./lib/utils") // recommended.js -fs.writeFileSync( - path.resolve(__dirname, "../lib/configs/recommended.js"), - format(`/** DON'T EDIT THIS FILE; was created by scripts. */ +format(`/** DON'T EDIT THIS FILE; was created by scripts. */ "use strict" module.exports = { @@ -24,5 +22,9 @@ module.exports = { .join("\n ")} }, } -`) +`).then((content) => + fs.writeFileSync( + path.resolve(__dirname, "../lib/configs/recommended.js"), + content + ) )