Open
Description
What rule do you want to change?
no-empty-definitions
What change do you want to make?
Generate fewer warnings
How do you think the change should be implemented?
A new option
Example code
<!-- eslint markdown/no-empty-definitions: ["error", { allowDefinitions: ["//", "comment"] }] -->
[//]: # (This is a comment) <!-- allowed, not reported -->
[comment]: # (Another comment) <!-- allowed, not reported -->
[foo]: # <!-- still reported as empty -->
What does the rule currently do for this code?
Reports all empty definitions as errors, including [//]: # (This is a comment)
and [comment]: # (Another comment)
.
What will the rule do after it's changed?
Will not report empty definitions whose label is in the allowDefinitions array (e.g., [//]: # (This is a comment)
).
Participation
- I am willing to submit a pull request to implement this change.
Additional comments
This change will help users who use Markdown comments or placeholders