redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

Make no-unused-components linting rule configurable to apply only to specific components

Open fulstadev opened this issue 4 months ago • 1 comments

As your docs suggest:

However, your API document may contain common components used in other APIs. If that describes your use-case, turn this rule off.

...there may be components defined which are used in other APIs. It would thus be beneficial to make this rule specific to some components only, but the only configuration option I can see is to either turn it off entirely or not.

Maybe adding some of your already configurable rule keys like matchParentKeys could solve this issue by referring to the NamedSchema type and specifing an according anti-regex pattern (that matches all except the ones in relation to which the rules should not be applied).

fulstadev avatar Aug 05 '25 08:08 fulstadev

@fulstadev just in case, you can add the exceptions to the ignore file. Also, we are open to contributions 🙂.

tatomyr avatar Aug 15 '25 12:08 tatomyr