google / tsec

Apache License 2.0
123 stars 19 forks source link

Suppress by error code #15

Closed koto closed 3 years ago

koto commented 3 years ago

Extracted from https://github.com/microsoft/vscode/pull/108682:

@jrieken: Would it be possible to teach tsec more than one error code and to able to suppress certain error codes (instead of files)?

The use case Johannes outlined in vscode is their usage of dynamic imports - there's nothing actionable for the projects to move off them, but tsec should be able to surface violations of a different kind in the files.

uraj commented 3 years ago

Maybe we can support wildcards in the exemption list, so that we can have something like

{
    "ban-dynamic-imports": ["**/*.ts"]
}