codelyzer icon indicating copy to clipboard operation
codelyzer copied to clipboard

There should be some rules covering the templates

Open MFateen opened this issue 10 years ago • 1 comments

There is currently no way to lint the templates and check whether the selectors are correctly written or even if they are closed. for example if I have a component Sample with selector sample and then in a different file I have :

Import Sample from './sample.ts';
@Component({
  selector: 'example',
  template: `<samples></samples>`
})

This currently doesn't produce any linting errors, although samples is neither a native html selector nor the selector of the imported file sample.ts.

another example is having template: '<sampl></sample>' . I believe that there should be simple parsing for the templates (at least the inline ones).

MFateen avatar Jul 26 '16 14:07 MFateen

This requires offline compilation and is already in the roadmap.

mgechev avatar Jul 26 '16 19:07 mgechev