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

Add three new rules to list of rules #320

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

ilyatitovich
Copy link
Contributor

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Hey everyone! While working on the project, I created three new plugins and I want to share them with the community and I hope my plugins will be useful. I have added links to them in readme.md.

These are three plugins:

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Apr 20, 2024
@ChristianMurphy
Copy link
Member

Thanks for sharing @ilyatitovich!

A few thoughts:

  1. where possible, widen the version range for dependencies (E.G. ^1.0.0 instead of ^1.4.5) to allow package managers to more effectively de-duplicate dependencies https://github.com/ilyatitovich/remark-lint-check-toc/blob/15b142720875343fac02558ed918e205fc9a7bd9/package.json#L75-L81
  2. size-limit is more useful when you check the size of something rather than nothing 😉 https://github.com/ilyatitovich/remark-lint-check-toc/blob/15b142720875343fac02558ed918e205fc9a7bd9/package.json#L58-L63
  3. You could use mdast-util-toc to get a table of contents rather than making an alternate implementation with different logic https://github.com/ilyatitovich/remark-lint-check-toc/blob/15b142720875343fac02558ed918e205fc9a7bd9/lib/createListOfSections.js#L7-L17 (https://github.com/syntax-tree/mdast-util-toc)
  4. remark-lint-code-block-split-list incorrectly flags a list followed by a code block https://github.com/ilyatitovich/remark-lint-code-block-split-list/blob/main/index.js#L13-L26. There needs to be a list before AND after for it to be split.
  5. https://github.com/ilyatitovich/remark-lint-heading-capitalization/blob/757e45c772d0a0ea3317f4a33e59a124411f024a/lib/utils.js#L1-L7 friendly reminder that diacritics exist. "À la carte" and "Ångström" are valid capitalized English words. You probably want to leverage https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase to both check and recommend how to capitalize words
  6. https://github.com/ilyatitovich/remark-lint-heading-capitalization/blob/757e45c772d0a0ea3317f4a33e59a124411f024a/lib/lowerCaseWords.js#L1-L20 this really feels like it may want/need to be a retext plugin https://github.com/retextjs/retext

@ilyatitovich
Copy link
Contributor Author

Thanks for the recommendations, I’ll implement them in projects 😀

@wooorm wooorm changed the title Add three new plugins Add three new rules to list of rules Apr 22, 2024
@wooorm wooorm merged commit a87a9d1 into remarkjs:main Apr 22, 2024
5 checks passed
@wooorm wooorm added 📚 area/docs This affects documentation 💪 phase/solved Post is done labels Apr 22, 2024
@wooorm
Copy link
Member

wooorm commented Apr 22, 2024

Added, thanks!

This comment has been minimized.

@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done
Development

Successfully merging this pull request may close these issues.

3 participants