microsoft / typescript-lit-html-plugin

TypeScript server plugin that adds intellisense for lit-html template strings
MIT License
255 stars 21 forks source link

Configuration settings for html/css validation #17

Open justinribeiro opened 6 years ago

justinribeiro commented 6 years ago

@sjmiles noted this in https://github.com/mjbvz/vscode-lit-html/issues/42

I tried to solve this by disabling validation, i.e.

"html.validate.styles": false, "css.validate": false which had no effect.

Ideally ts-lit-html-plugin honors those configuration options.

With the update to StyledTemplateLanguageService, I'm wondering what your thoughts are on updating the TsHtmlPluginConfiguration interface to be enable validate and lint configuration options similar to styled? Or if there's a better configuration integration approach I'm not quite seeing.

mjbvz commented 5 years ago

Yes we should at least expose a way to disable validation. I propose a setting like:

{
  "compilerOptions": {
    "plugins": [
      {
        "name": "typescript-lit-html-plugin",
        "css": { "validate": false }
      }
    ]
  }
}

The styled plugin has a number of settings that are also supported: https://github.com/Microsoft/typescript-styled-plugin#configuration