sindresorhus / awesome-lint

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

Link references should be allowed #161

Open mgrojo opened 1 year ago

mgrojo commented 1 year ago
- [gtkada] - Ada graphical toolkit based on Gtk3 components.

 [gtkada]: https://github.com/AdaCore/gtkada

Why does this format not work? For the end user will be the same. We want the reference to be able to link to the same URL in the description of applications using this library.

See the workaround I had to do in https://github.com/ohenley/awesome-ada/pull/111/files. We'd like to not have to repeat the URL anywhere. See https://github.com/ohenley/awesome-ada/pull/109#issuecomment-1445230662

sindresorhus commented 1 year ago

Can you include the lint error you get?

mgrojo commented 1 year ago

Can you include the lint error you get?

Invalid list item link remark-lint:awesome-list-item

https://github.com/mgrojo/awesome-ada/actions/runs/4331204896/jobs/7562895908#step:3:26

mgrojo commented 1 year ago

Is it possible to disable only this specific check? I tried with this:

<!--lint disable awesome-list-item-->

but it disables some other checks that I wouldn't like to lose, like starting a description with a lower-case letter.

WillForan commented 8 months ago

getting this to pass looks easy enough -- instead of a link the first child element is a linkReference, in list-item.js that could look like

function validateListItemLink(link, file) {

    // TODO: confirm reference exists
    if (link.type === "linkReference") {
        return true;
    }

....

but then there's no guarantee the reference is actually defined. I've no idea how that could or should be done

- [gtkada] - Ada graphical toolkit based on Gtk3 components.
- [neverlinked] - This won't get flagged even though the reference is meaningless.

 [gtkada]: https://github.com/AdaCore/gtkada
WillForan commented 8 months ago

oh maybe undefined references will be caught by noUndefinedReferences already used in config.js!