sindresorhus / awesome-lint

Linter for Awesome lists
MIT License
600 stars 56 forks source link

Can't add markdown footnotes to list item without the linter throwing errors #160

Open rickstaa opened 1 year ago

rickstaa commented 1 year ago

For one of my projects, I try to add a footnote to a list item:

- [url](https://www.url.com) - Description[^1].

[^1]: Some footnote.

This, however, keeps throwing a Found reference to undefined definition remark-lint:no-undefined-references error.

What I already tried

I tried placing the footnote after the punctuation mark, but this does not seem to fix the issue and throws an additional List item description must end with proper punctuation remark-lint:awesome-list-item error.

My current workaround

The only thing I can currently think of is adding <!--lint ignores no-undefined-references--> above this reference. I however would love another way since this is a bit constrictive.

How to reproduce

  1. Paste the example code above in a markdown file.
  2. Run the awesome-linter.
  3. See the errors that appear.
sindresorhus commented 1 year ago

You should open an issue on the no-undefined-references rule as it's where the problem is.

rickstaa commented 1 year ago

You should open an issue on the no-undefined-references rule, as it's where the problem is.

I think I found the problem (see https://github.com/remarkjs/remark-lint/issues/234#issuecomment-629099478). The footnotes are also not accepted when they are not in a list item:

Test[^1].

[^1]: A footnote.

I think this could be solved by adding the remark-gfm to awesome-lint package. Do you have a way to extend the awesome-lint? I tried to add a remark configuration file:

{
  "dependencies": {
    "remark-gfm": "^3.0.1"
  },
  "remarkConfig": {
    "plugins": [
      "remark-gfm"
    ]
  }
}

But according to https://github.com/sindresorhus/awesome-lint/issues/144, there is not yet a way to extend awesome-lint. Is there a way to add remark-gfm to the package?