microsoft / dtslint

A utility built on TSLint for linting TypeScript declaration (.d.ts) files.
MIT License
925 stars 86 forks source link

Linting integration with monaco editor #330

Open nikhilnxvverma1 opened 3 years ago

nikhilnxvverma1 commented 3 years ago

Hello I wanted to instantiate monaco editor in an "ambient context" such that no logical code is allowed(only type declarations). I couldn't find the right configuration in monaco for it. I was hoping dtslint would help but I can't figure out how to integrate it.

Its funny because VSCode itself uses monaco in an ambient context. I feel like am missing something obvious here.

I want to show red squiggles to the user whenever they are writing any prohibitive code in an ambient context. I am making a reflection system in typescript and I only want to consume typescript AST generated by the user as given in ambient context.

Thanks.