Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Refactor docs to work with docs.eslint.org #15744

Merged
merged 4 commits into from Apr 6, 2022
Merged

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Mar 30, 2022

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

Refactored docs structure.

What changes did you make? (Give an overview)

I reorganized the docs folder in preparation for the new docs.eslint.org. Mostly, this meant moving the markdown files from directly under docs to inside of docs/src. I did rename a couple of files and then updated Makefile.js to ensure it's reading from the correct locations and copying to the correct locations during a release.

This is just the first step to help make these files compatible with docs.eslint.org.

Is there anything you'd like reviewers to focus on?

Did I miss anything?

@eslint-github-bot eslint-github-bot bot added the chore This change is not user-facing label Mar 30, 2022
Makefile.js Outdated Show resolved Hide resolved
Makefile.js Outdated
@@ -622,7 +622,12 @@ target.gensite = function(prereleaseVersion) {

// 3. Copy docs folder to a temporary directory
echo("> Copying the docs folder (Step 3)");
cp("-rf", "docs/*", TEMP_DIR);
docFiles.forEach(filePath => {
cp("-rf", `docs/src${filePath}*`, `${TEMP_DIR}/${filePath}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting Error: cp: dest is not a directory (too many sources) here.

`${TEMP_DIR}/${filePath}` evaluates to ./tmp///rules/, there are two extra slashes.

@mdjermanovic
Copy link
Member

We should update edit links, too:

`edit_link: https://github.com/eslint/eslint/edit/main/${filePath}`,

For example, this evaluates to https://github.com/eslint/eslint/edit/main/docs/developer-guide/nodejs-api.md, but after this change, it should be https://github.com/eslint/eslint/edit/main/docs/src/developer-guide/nodejs-api.md.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 5, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@nzakas
Copy link
Member Author

nzakas commented Apr 5, 2022

Oh nice catch. I've updated the edit links and fixed the copying.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit bb4c0d5 into main Apr 6, 2022
@mdjermanovic mdjermanovic deleted the docs-refactor branch April 6, 2022 12:32
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Apr 9, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | minor | [`8.12.0` -> `8.13.0`](https://renovatebot.com/diffs/npm/eslint/8.12.0/8.13.0) |

---

### Release Notes

<details>
<summary>eslint/eslint</summary>

### [`v8.13.0`](https://github.com/eslint/eslint/releases/v8.13.0)

[Compare Source](eslint/eslint@v8.12.0...v8.13.0)

#### Features

-   [`274acbd`](eslint/eslint@274acbd) feat: fix no-eval logic for `this` in arrow functions ([#&#8203;15755](eslint/eslint#15755)) (Milos Djermanovic)

#### Bug Fixes

-   [`97b57ae`](eslint/eslint@97b57ae) fix: invalid operator in operator-assignment messages ([#&#8203;15759](eslint/eslint#15759)) (Milos Djermanovic)

#### Documentation

-   [`c32482e`](eslint/eslint@c32482e) docs: Typo in space-infix-ops docs  ([#&#8203;15754](eslint/eslint#15754)) (kmin-jeong)
-   [`f2c2d35`](eslint/eslint@f2c2d35) docs: disambiguate types `FormatterFunction` and `LoadedFormatter` ([#&#8203;15727](eslint/eslint#15727)) (Francesco Trotta)

#### Chores

-   [`bb4c0d5`](eslint/eslint@bb4c0d5) chore: Refactor docs to work with docs.eslint.org ([#&#8203;15744](eslint/eslint#15744)) (Nicholas C. Zakas)
-   [`d36f12f`](eslint/eslint@d36f12f) chore: remove `lib/init` from eslint config ([#&#8203;15748](eslint/eslint#15748)) (Milos Djermanovic)
-   [`a59a4e6`](eslint/eslint@a59a4e6) chore: replace `trimLeft`/`trimRight` with `trimStart`/`trimEnd` ([#&#8203;15750](eslint/eslint#15750)) (Milos Djermanovic)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1296
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
srijan-deepsource pushed a commit to DeepSourceCorp/eslint that referenced this pull request May 30, 2022
* chore: Refactor docs to work with docs.eslint.org

* Fix Makefile.js

* fix copying of files

* Fix edit links and copying commands
srijan-deepsource added a commit to DeepSourceCorp/eslint that referenced this pull request May 30, 2022
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Oct 4, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants