codelyzer
codelyzer copied to clipboard
There should be some rules covering the templates
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).
This requires offline compilation and is already in the roadmap.