template-lint
template-lint copied to clipboard
Sanity check of Aurelia-flavor template HTML
Following ``` TypeScript export class Foo{ field1: number; field2: number; @computedFrom("field1", "missingField1", "field2", "missingField2") get computedField(){ return this.field1 + this.field2; } } ``` ``` HTML \${computedField} ``` should report that...
- [ ] For known types, check that the access-chain target is assignable to the binding target. Don't know how to do type assignment checking with the typescript library. ~~I...
Use of generics (with static type arguments) in source code should be supported by static type check.
### Primary Classes - AuLint - perform linting (as configured) of a html file and return results. - AuProject - maintain Aurelia resources, lint templates, report results (event).
when requiring an html only component- eg: ``, verify the component doesn't have a view-model. Using the previous require statement as an example, with this rule it would be illegal...
Aurelia allows binding to locals that may not exist initially. example (ref): ``` ${someName.attributes['expanded'].value} ``` currently this will throw an error that `someName` is missing from `Foo`. > requires #106,...
Basic child checking implemented as ValidChildRule (see config). Full validation checking of each element's children would be better. references: https://www.w3.org/TR/html5/dom.html#flow-content-1
Upon finding a converter: ``` ${some.value | booBoo} ``` should do the following: - reverse naming convention: `booBoo` > `BooBooValueConverter` - look for `{caller-base-path}\boo-boo.ts` - fallback: look for any module...
item.ts ``` export interface Item {} ``` page.ts ``` import {Item} from "./item"; export class PageViewModel { items: Item[]; } ``` page.html ``` ${items.length} ``` lint output (0.8.1) ``` [10:35:52]...