Skip to content

Conversation

@spence-s
Copy link
Contributor

@spence-s spence-s commented Jul 19, 2022

Simple addition for use in the vscode extension.

I had added a different package to get the rule docs, but it is broken for mono-repo based plugins, and this change was simpler than fixing the third party rule-docs package.

Note: we may want to add a similar change to lintFiles as we currently construct our urls in eslint-formatter-pretty with the broken package I mentioned.

related to: xojs/vscode-linter-xo#112

@spence-s spence-s changed the title feat: add optional rules meta option to lint text feat: add rulesMetaForResults option to lint text Jul 19, 2022
@spence-s spence-s requested a review from sindresorhus July 19, 2022 13:01
@sindresorhus
Copy link
Member

Note: we may want to add a similar change to lintFiles as we currently construct our urls in eslint-formatter-pretty with the broken package I mentioned.

👍 Is this something you would be willing to do in this PR?

@spence-s
Copy link
Contributor Author

👍 Is this something you would be willing to do in this PR?

Sure! The change is simple but a little more involved than in lintText, will need to update a few tests as well. Give me a couple of days for the changes and I will ping you again for re-review.

@spence-s spence-s changed the title feat: add rulesMetaForResults option to lint text include rulesMeta by default for all linting Jul 20, 2022
@spence-s
Copy link
Contributor Author

Per the latest update to this PR:

  • adds rulesMeta step for all linting and merges into the report
  • properly passes rulesMeta to the formatter in the cli
  • tests rules meta in lint-files and lint-text tests by modifying the hasRule function to check that corresponding metadata is there as well.

@spence-s spence-s requested a review from sindresorhus July 20, 2022 21:36
@sindresorhus sindresorhus merged commit cd86133 into xojs:main Jul 21, 2022
@sindresorhus
Copy link
Member

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.

2 participants