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

[DOCS] Add* and run eslint-plugin-markdown #13156

Merged
merged 21 commits into from Mar 14, 2023

Conversation

hasezoey
Copy link
Collaborator

@hasezoey hasezoey commented Mar 10, 2023

Summary

This PR basically adds* and runs eslint-plugin-markdown, including all changes required for this to work, in more detail:

  • remove docs from being ignored in eslint completely
  • apply eslint to test/docs
  • add overrides to use env browser for docs/js/**/*.js
  • apply eslint to docs/**/*.js (except *.min.js files)
  • convert all javascript blocks with acquit-require in it to language acquit, to not confuse eslint with invalid tokens
  • convert the eslint config from json to js to allow comments
  • fix all documentation problems (like invalid tokens)
  • apply eslint to all *.md files

*Note: eslint-plugin-markdown has been disabled with commit 6f2dec1, because of some out-standing issues: eslint/eslint-plugin-markdown#214

This PR (or the mentioned PRs if this is merged first) may require fixes:

re #12691

@hasezoey hasezoey added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label Mar 10, 2023
Copy link
Collaborator

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

awesome

README.md Outdated Show resolved Hide resolved
docs/advanced_schemas.md Show resolved Hide resolved
docs/js/native.js Outdated Show resolved Hide resolved
scripts/website.js Show resolved Hide resolved
// acquit:ignore:end
await event.save();
await event.save();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any way we can avoid this one indentation change? The indentation is slightly off here because the await assert.rejects() is stripped from the output because of // acquit:ignore:start, so we want the docs to appear as if await event.save() isn't indented at all.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we could disable indentation rule for that line, but would not recommend to to it globally

or the acquit (plugin?) could handle indentation changes between comments

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for now i could add a quick-fix of ignoring the eslint rule (but editors may still automatically apply indentation)

or we could wait for vkarpov15/acquit-ignore#6

@vkarpov15 vkarpov15 added this to the 7.0.2 milestone Mar 14, 2023
@vkarpov15 vkarpov15 merged commit 339bf68 into Automattic:master Mar 14, 2023
@hasezoey hasezoey deleted the eslintMarkdownCode branch March 15, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants