$ npm install -D @markuplint/erb-parser
$ yarn add -D @markuplint/erb-parser
Add parser
option into your confugration file.
{
"parser": {
".erb$": "@markuplint/erb-parser"
}
}
Unsupported the syntax that is complex on the attribute value.
✅ Available code:
<div attr="<%= value %>"></div>
<div attr='<%= value %>'></div>
<div attr="<%= value %>-<%= value2 %>-<%= value3 %>"></div>
❌ Unavailable code:
Didn't nest by quotations.
<div attr=<%= value %>></div>
Mixed the tags and spaces.
<div attr=" <%= value %> "></div>
<div attr="<%= value %> <%= value2 %>"></div>