The eslint max line length is set to 120, but I have a svg and its path is longer than 120, what can I do to meet the max-line-length?
<path d="M47.2388, 12.45 ...................."/>
The accepted answer is wrong, the "d" attribute of a path is not a Template Literal so ignoreTemplateLiterals does not make sense.
In the same way, ignoreStrings does not work, at least in my vue project.
The best solution for me is to use ignorePattern like this:
ignorePattern: 'd="([\\s\\S]*?)"'
You alway can check the documentation: https://eslint.org/docs/rules/max-len
"max-len": ["error", {"ignoreTemplateLiterals": true, "ignoreStrings": true}]
or
ESLint-plugin-React
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With