Closed sebiniemann closed 4 years ago
Hey @SebastianNiemann Thanks for posting this issue. Implementation details of the core max-len
rule result in throwing an error in the Vue template as well. We could probably introduce dedicated max-len
rule, with updated logic, to allow setting different values for template and JS, as well as disabling one or another. What do you think @mysticatea? Perhaps you have other idea here? :)
It's a good idea. We can add vue/max-len
rule for additional settings.
Please i need this!
Good Idea! Also searched for that
Can't wait for this to be implemented, it's definitely a must! I have eslint-disable max-len
scattered throughout many of my Vue templates, which is obviously not ideal.
Any progress ?
Please describe what the rule should do: Currently, any line within
<template>
is forced to respect themax-len
rule, without any option to ignore text-focused nodes (i.e. text nodes and phrasing content).This does not seems to be in line with the current ignore options for
max-len
, as it already allows to keep long string, URLs, template literals, RegExp literals, ... together in a single line.What category should the rule belong to?
It's a proposal to add an ignore option.
Provide 2-3 code examples that this rule should warn about: The following examples should be fine (NO warning):
Text node within a flow content:
Phrasing node within a flow content
Additional context This issue was already mentioned in another context (to deactivate eslint completely -- what should never be the recommended solution in my opinion) by @MaxMilton (https://github.com/vuejs/eslint-plugin-vue/issues/260#issuecomment-354322849):