Skip to content

Commit f7e7880

Browse files
Revert "chore: Refactor docs to work with docs.eslint.org (eslint#15744)"
This reverts commit 97e0137.
1 parent 108fb65 commit f7e7880

File tree

382 files changed

+5
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+5
-9
lines changed

Makefile.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -622,11 +622,7 @@ target.gensite = function(prereleaseVersion) {
622622

623623
// 3. Copy docs folder to a temporary directory
624624
echo("> Copying the docs folder (Step 3)");
625-
cp("-rf", "docs/src/*", TEMP_DIR);
626-
627-
// special case (for now)
628-
cp("-f", "docs/src/pages/index.md", path.join(TEMP_DIR, "index.md"));
629-
rm("-rf", path.join(TEMP_DIR, "pages"));
625+
cp("-rf", "docs/*", TEMP_DIR);
630626

631627
let versions = test("-f", "./versions.json") ? JSON.parse(cat("./versions.json")) : {};
632628

@@ -654,12 +650,12 @@ target.gensite = function(prereleaseVersion) {
654650

655651
const rulesUrl = "https://github.com/eslint/eslint/tree/HEAD/lib/rules/",
656652
testsUrl = "https://github.com/eslint/eslint/tree/HEAD/tests/lib/rules/",
657-
docsUrl = "https://github.com/eslint/eslint/tree/HEAD/docs/src/rules/",
653+
docsUrl = "https://github.com/eslint/eslint/tree/HEAD/docs/rules/",
658654
baseName = path.basename(filename),
659655
sourceBaseName = `${path.basename(filename, ".md")}.js`,
660656
sourcePath = path.join("lib/rules", sourceBaseName),
661657
ruleName = path.basename(filename, ".md"),
662-
filePath = path.posix.join("docs", path.relative("tmp", filename));
658+
filePath = path.join("docs", path.relative("tmp", filename));
663659
let text = cat(filename),
664660
ruleType = "",
665661
title;
@@ -701,7 +697,7 @@ target.gensite = function(prereleaseVersion) {
701697
"---",
702698
`title: ${title}`,
703699
"layout: doc",
704-
`edit_link: https://github.com/eslint/eslint/edit/main/${filePath.replace("docs/", "docs/src/")}`,
700+
`edit_link: https://github.com/eslint/eslint/edit/main/${filePath}`,
705701
ruleType,
706702
"---",
707703
"<!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. -->",
@@ -793,7 +789,7 @@ target.checkRuleFiles = function() {
793789

794790
RULE_FILES.forEach(filename => {
795791
const basename = path.basename(filename, ".js");
796-
const docFilename = `docs/src/rules/${basename}.md`;
792+
const docFilename = `docs/rules/${basename}.md`;
797793
const docText = cat(docFilename);
798794
const docMarkdown = marked.lexer(docText, { gfm: true, silent: false });
799795
const ruleCode = cat(filename);

0 commit comments

Comments
 (0)