Question : plugin to support mustache

Hello,

Someone in my company asked me if there is a way to add custom rule for .mustache files.

As I dive into it, I found nothing.

Is there a plugin to add mustache files, and is there a way to create rule on it ?

thank you in advance :slight_smile:

Hi,

Sorry, but you would need to write a custom plugin for this.

 
Ann

Hello Ann,

My initial need was to create a security hotspot if there is the triple mustache.

As written in the mustache documentation

All variables are HTML escaped by default. If you want to return raw contents without escaping, use the triple mustache: {{{name}}}.

You can also use & to return its raw contents: {{& name}}. This may be useful when changing delimiters (see “Set Delimiter” below).

But I don’t know how much it would cost to create a custom plugin with a linter for mustache, just for one rule :confused:

Hi,

Yeah… it might be a bit of overkill.

I’ve flagged this for PM attention so they’re aware of the Mustache interest. And knowing the specifics of what you’re interested in may help, although I wouldn’t hold my breath.

 
Ann

Thanks for that ! :slight_smile:

Charles