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

[@types/stylelint] Add missing context parameter to Plugin #56811

Closed
wants to merge 1 commit into from

Conversation

reececomo
Copy link

@reececomo reececomo commented Oct 27, 2021

What's changed?

  • Added missing context: { fix: boolean; newline: string; } argument to rule function. This allows rules created with createPlugin(...) to autofix linting mistakes.

See stylelint docs:

If your plugin rule supports autofixing, then ruleFunction should also accept a third argument: context.

Template

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.

https://stylelint.io/developer-guide/rules#add-autofix
> If your plugin rule supports autofixing, then ruleFunction should also accept a third argument: context.
@typescript-bot typescript-bot added this to Needs Author Action in New Pull Request Status Board Oct 27, 2021
@ybiquitous
Copy link
Contributor

Hi, stylelint@14 has provided its type definitions, so @types/stylelint seems no longer necessary. See below:

@reececomo
Copy link
Author

Thanks for that, @ybiquitous! It slipped my mind complete 🙇

@reececomo reececomo closed this Dec 1, 2021
@reececomo reececomo deleted the patch-1 branch December 1, 2021 14:09
@typescript-bot typescript-bot removed this from Needs Author Action in New Pull Request Status Board Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants