Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

refactor(mdx): refactored linting rules and general markdown fixes #2757

Merged
merged 15 commits into from
Sep 13, 2022

Conversation

ovflowd
Copy link
Member

@ovflowd ovflowd commented Sep 12, 2022

Description

This PR tackles the remaining MDX/Markdown issues from our repository. Basically, the current sync-api script still had some issues, and some of our Markdown pages are non-conforming, so this PR does the following:

  • Reorganises our ESLint configuration to be clean and modularised for each kind of file extension and to use mdx's plugins and parsers for parsing and lining markdown content
  • Updates Blog Posts and their Authors (syncing it from nodejs.org)
    • Also fixes the blog syncing script that was partially broken
  • Fix our content/** markdown pages by fixing Markdown and MDX issues on them
  • Generally fixing our Markdown files
  • Applying the new ESLint rules to the source code
  • Remove the outdated dependencies and non-used dependencies (decreasing our dependency graph by 20%)
  • Removed the Privacy page that should, from now on, redirect to the OpenJS Foundation page, as the privacy.md was gigantic and manually fixing Markdown issues there was not ideal. Also, nodejs.org now redirects users to OpenJS Foundation.

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run lint:js -- --fix and/or npm run lint:md -- --fix for my JavaScript and/or Markdown changes.
    • This is important as most of the cases your code changes might not be correctly linted
  • I have run npm run test to check if all tests are passing, and/or npm run test -- -u to update snapshots if I created and/or updated React Components.
  • I have checked that the build works locally and that npm run build work fine.
  • I've covered new added functionality with unit tests if necessary.

@ovflowd ovflowd added bug Something isn't working enhancement New feature or request docs Infrastructure Infra related task labels Sep 12, 2022
@ovflowd
Copy link
Member Author

ovflowd commented Sep 12, 2022

Note.: Review is better via the Commit tab as file changes are separated by commits. Most of the changes are automated changes by our API script or ESLint.

@ovflowd ovflowd added the create-preview Generate preview on staging.nodejs.dev label Sep 12, 2022
@github-actions github-actions bot removed the create-preview Generate preview on staging.nodejs.dev label Sep 12, 2022
@ovflowd ovflowd changed the title fix(scripts): fixed blog generation script refactor(mdx): fixed numerous mdx issues and improved mdx linting and parsing Sep 12, 2022
@nschonni
Copy link
Member

This appears to be making some functional changes to the API docs. Might be better to sync the 18.9.0 docs first to minimize the actual diff

@ovflowd
Copy link
Member Author

ovflowd commented Sep 12, 2022

This appears to be making some functional changes to the API docs. Might be better to sync the 18.9.0 docs first to minimize the actual diff

WDYM? Yes this makes changes to the script that generates docs, and then it also syncs them, as otherwise ESLint would fail 🤔

@ovflowd
Copy link
Member Author

ovflowd commented Sep 12, 2022

Note.: For some reason build is crashing (locally), I created an issue on upstream: gatsbyjs/gatsby#36599

@ovflowd ovflowd force-pushed the refactor/mdx-linter-api-generator branch from 5f9ec02 to c074179 Compare September 12, 2022 21:35
@ovflowd ovflowd force-pushed the refactor/mdx-linter-api-generator branch from c074179 to bdcf8d3 Compare September 12, 2022 21:45
@ovflowd ovflowd changed the title refactor(mdx): fixed numerous mdx issues and improved mdx linting and parsing refactor(mdx): refactored linting rules and general markdown fixes Sep 12, 2022
@ovflowd ovflowd requested a review from nschonni September 12, 2022 23:19
@nschonni nschonni removed their request for review September 12, 2022 23:20
@codecov-commenter
Copy link

Codecov Report

Merging #2757 (846eb4e) into main (fd57b87) will decrease coverage by 1.39%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2757      +/-   ##
==========================================
- Coverage   66.02%   64.62%   -1.40%     
==========================================
  Files         118      122       +4     
  Lines        1351     1405      +54     
  Branches      342      353      +11     
==========================================
+ Hits          892      908      +16     
- Misses        422      461      +39     
+ Partials       37       36       -1     
Impacted Files Coverage Δ
src/__fixtures__/page.tsx 94.11% <ø> (-5.89%) ⬇️
src/components/Article/index.tsx 100.00% <ø> (ø)
src/components/Banner/index.tsx 100.00% <ø> (ø)
src/components/Codebox/index.tsx 100.00% <ø> (ø)
src/components/EditLink/index.tsx 100.00% <ø> (ø)
src/components/Header/index.tsx 100.00% <ø> (ø)
src/components/Layout/article.tsx 100.00% <ø> (ø)
src/components/NavigationItem/index.tsx 100.00% <ø> (ø)
src/components/SearchBar/index.tsx 52.30% <ø> (-1.03%) ⬇️
src/components/Seo/index.tsx 100.00% <ø> (ø)
... and 46 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ovflowd ovflowd merged commit cf17f7e into nodejs:main Sep 13, 2022
@ovflowd ovflowd deleted the refactor/mdx-linter-api-generator branch September 13, 2022 10:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working docs enhancement New feature or request Infrastructure Infra related task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants