qwik icon indicating copy to clipboard operation
qwik copied to clipboard

[🐞] ESLint rules do not point to their docs

Open samijaber opened this issue 1 year ago • 2 comments

Which component is affected?

Qwik Runtime

Describe the bug

If an ESLint rule finds an issue, it will have a URL that points to https://github.com/BuilderIO/qwik instead of a more specific URL:

CleanShot 2023-05-07 at 13 43 06@2x

https://github.com/BuilderIO/qwik/blob/b98019567447814833f31e08ae9df0855fc04765/packages/eslint-plugin-qwik/src/loaderLocation.ts#L23

Reproduction

N/A

Steps to reproduce

https://github.com/BuilderIO/qwik/blob/b98019567447814833f31e08ae9df0855fc04765/packages/eslint-plugin-qwik/src/loaderLocation.ts#L23

System Info

N/A

Additional Information

I'm not sure what the best URL is for this particular eslint rule, but also some other rules also don't point to docs that explain valid/invalid code:

https://github.com/BuilderIO/qwik/blob/b98019567447814833f31e08ae9df0855fc04765/packages/eslint-plugin-qwik/src/unusedServer.ts#L10-L11

https://github.com/BuilderIO/qwik/blob/b98019567447814833f31e08ae9df0855fc04765/packages/eslint-plugin-qwik/src/useMethodUsage.ts#L12

samijaber avatar May 07 '23 16:05 samijaber

Hi @samijaber

My idea would be to offer smth similar to https://eslint.org/docs/latest/rules/. So an overview with all qwik eslint rules + a detail view where we explain good and bad examples.

i quickly hacked the overview together: localhost_3000_docs_advanced_eslint_

Is this going into the direction you thought about @samijaber ? And @manucorporat what do you think? continue or go with another solution instead?

zanettin avatar May 08 '23 20:05 zanettin

i would love it so much!

manucorporat avatar May 08 '23 21:05 manucorporat