eslint-plugin-vue-pug-sfc
eslint-plugin-vue-pug-sfc copied to clipboard
Mutliline Backtick Support
Request / Idea
Before the pug warnings or errors, I got multiple warnings like this:
Please report token: {"type":"attribute","loc":{"start":{"line":26,"column":5},"end":{"line":31,"column":7}},"name":":rules","val":"`[\n v => $v.form.email.required,\n v => $v.form.email.email,\n v => $v.form.email.maxLength,\n v => $v.form.email.validOnServer,\n ]`","mustEscape":true}
It does not affect the library functionalities, but it could be nice to have the support. For example when you use validation libraries.
Input
input("email", "email", "email", "EMAIL")(
v-model.trim="form.name"
:rules=`[
v => $v.form.email.required,
v => $v.form.email.email,
v => $v.form.email.maxLength,
v => $v.form.email.validOnServer,
]`
)
Expected Output
No report token log.
Additional Context
have the same issue with Vue
TwoPaneForm(
:input='store.text'
:input-is-invalid-label=`$t('rewriter.invalid-source', {
min: validationRules.minimumWords,
max: $tc('count.words', validationRules.maximumWords),
})`
:input-validator='textIsValid'
:input-placeholder=`$t('rewriter.source-placeholder')`
:result-input-classes=`{ '_sentences': enableSentencesModel }`
:result-is-empty='!hasRewritten'
v-bind='{ textIsChanged, isEmpty }'
:loading='store.loading'
@input='setText($event)'
)
Please report token: {"type":"attribute","loc":{"start":{"line":8,"column":3},"end":{"line":11,"column":6}},"name":":input-is-invalid-label","val":"`$t('rewriter.inva
The line is here https://github.com/Shinigami92/eslint-plugin-vue-pug-sfc/blob/99c0c01b35d658c95b9fe2c40185b153002f21ae/src/utils/index.ts#L335
Who wants to help and setup a PR for that?
i have no background in tool development, sorry :( just a frontend designer, more tied with Figma than Typescript