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

Fix types of rule arguments #289

Merged
merged 1 commit into from
Apr 4, 2022
Merged

Fix types of rule arguments #289

merged 1 commit into from
Apr 4, 2022

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Apr 1, 2022

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

Non-array arguments are a rule's options, not a severity.

Makes remark().use(remarkLintUnorderedListMarkerStyle, 'off') a type error, to match the runtime error:

1:1: Incorrect unordered list item marker style `off`: use either `'-'`, `'*'`, or `'+'`

@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Apr 1, 2022
@github-actions

This comment has been minimized.

@wooorm
Copy link
Member

wooorm commented Apr 1, 2022

Can you fill out the checklist in the template? :)

Comment on lines +272 to +273
// The following rule accepts a number:
.use(remarkLintMaximumLineLength, 72)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The same correction, in the readme.

@github-actions github-actions bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Apr 1, 2022
@jablko
Copy link
Contributor Author

jablko commented Apr 1, 2022

  • Filled out now. 👍

@wooorm wooorm changed the title Fix rule parameter type Fix types of rule arguments Apr 4, 2022
@wooorm wooorm merged commit d1e24ff into remarkjs:main Apr 4, 2022
@wooorm wooorm added ☂️ area/types This affects typings 💪 phase/solved Post is done labels Apr 4, 2022
@github-actions

This comment has been minimized.

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

Successfully merging this pull request may close these issues.

None yet

2 participants