Bring this back on the table. We are currently using @typespec/linter a library to make linter rules that plug in the onValidate step of the typescript compilation.
The problem with this approach:
- getting issue when libraries get loaded twice(e.g. different version loaded in emitter jscode and typespec import)
- not very clean to enable rules provided by another library
Idea with a built-in linter system is that the compiler would be aware of the various linting rules and allow better customization from other libraries and spec author.
Ideas
This is just some idea but could have something like this in a spec
#enable no-inline-models warn
#disable no-unions
this could even be the way libraries decide which rules they enable themself.
Other related issues
Proposal https://gist.github.com/timotheeguerin/9d665c82f89d3a07a406a8928fb1e2bd
Bring this back on the table. We are currently using
@typespec/lintera library to make linter rules that plug in theonValidatestep of the typescript compilation.The problem with this approach:
Idea with a built-in linter system is that the compiler would be aware of the various linting rules and allow better customization from other libraries and spec author.
Ideas
This is just some idea but could have something like this in a spec
this could even be the way libraries decide which rules they enable themself.
Other related issues
warnas anerrorProposal https://gist.github.com/timotheeguerin/9d665c82f89d3a07a406a8928fb1e2bd