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

include rulesMeta by default for all linting #674

Merged
merged 1 commit into from Jul 21, 2022
Merged

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
@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?

index.js Outdated Show resolved Hide resolved
@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.

@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.

None yet

2 participants