iljapostnovs / ui5plugin-linter

Linter for UI5 projects
Apache License 2.0
12 stars 3 forks source link

Ignore specific instances of an Linter Error #152

Open mateusz-matyjaszczyk opened 1 month ago

mateusz-matyjaszczyk commented 1 month ago

Hey,

I would like to ask if it is possible to ignore specific instances of an Linter error. I have following code: CleanShot 2024-09-20 at 17 43 42@2x which is showing an error but actually I want to unbind context of an not named model so this is exactly what I want to do. I don't want to disable WrongParametersLinter for the whole project, I would just like to ignore it in this line. Is there anything I can do to achieve this?

mateusz-matyjaszczyk commented 1 month ago

@iljapostnovs

iljapostnovs commented 1 month ago

Hi,

This works as documented by SAP, but you can add this method to exceptions in ui5 -> ui5linter un package.json: image

mateusz-matyjaszczyk commented 1 month ago

Hey, this method I am aware of. I don't want to do this as this will stop checking this method overall. What I am looking for is just ignore line below, something like @ts-ignore - i.e. ignoring next line with check, not all occurrences of it.

iljapostnovs commented 1 month ago

Yeah, there is no such feature currently. Probably will leave this as enhancement for the future.