Lwc: Should compiler attempt to validation HTML attributes?

Created on 9 May 2019  路  4Comments  路  Source: salesforce/lwc

Description

Today the LWC compiler tries to validate attributes attached to standard HTML elements. The LWC compiler maintains a list of known attributes for all the standard elements. While this approach prevents attribute misspelling issues, it also prevents developers to experiment with emerging/unstable HTML APIs.

IMO, the LWC compiler should not report an error on unknown HTML attributes. Standard HTML attribute validation should be delegated to a linter for example.

question

All 4 comments

I like the idea of moving the more strict things to linting, we should figure out the principles for doing this everywhere else.

Yes, restriction has to be lifted for css as well, which is needed by slds v3 anyways. I think we will have to relax this, and find other solutions for typos and mistakes.

@jodarove is going to take a look, to see how to lift the restrictions.

Was this page helpful?
0 / 5 - 0 ratings