Use markuplint with PHP.
$ npm install -D @markuplint/php-parser
$ yarn add -D @markuplint/php-parser
Add parser
option to your configuration.
{
"parser": {
".php$": "@markuplint/php-parser"
}
}
It's not able to support syntaxes if one's attribute is complex.
✅ Available codes
<div attr="<?php echo value; ?>"></div>
<div attr='<?php echo value; ?>'></div>
<div attr="<?php echo value; ?>-<?php echo value2; ?>-<?php echo value3; ?>"></div>
❌ Unavailable codes
If it doesn't nest by quotations.
<div attr=<?php echo value; ?>></div>