vue/max-len
enforce a maximum line length in
.vuefiles
📖 Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. This rule is the similar rule as core max-len rule but it applies to the source code in .vue.
🔧 Options
js
{
"vue/max-len": ["error", {
"code": 80,
"template": 80,
"tabWidth": 2,
"comments": 80,
"ignorePattern": "",
"ignoreComments": false,
"ignoreTrailingComments": false,
"ignoreUrls": false,
"ignoreStrings": false,
"ignoreTemplateLiterals": false,
"ignoreRegExpLiterals": false,
"ignoreHTMLAttributeValues": false,
"ignoreHTMLTextContents": false,
}]
}code... enforces a maximum line length. default80template... enforces a maximum line length for<template>. defaults to value ofcodetabWidth... specifies the character width for tab characters. default2comments... enforces a maximum line length for comments. defaults to value ofcodeignorePattern... ignores lines matching a regular expression. can only match a single line and need to be double escaped when written in YAML or JSONignoreComments... iftrue, ignores all trailing comments and comments on their own line. defaultfalseignoreTrailingComments... iftrue, ignores only trailing comments. defaultfalseignoreUrls... iftrue, ignores lines that contain a URL. defaultfalseignoreStrings... iftrue, ignores lines that contain a double-quoted or single-quoted string. defaultfalseignoreTemplateLiterals... iftrue, ignores lines that contain a template literal. defaultfalseignoreRegExpLiterals... iftrue, ignores lines that contain a RegExp literal. defaultfalseignoreHTMLAttributeValues... iftrue, ignores lines that contain a HTML attribute value. defaultfalseignoreHTMLTextContents... iftrue, ignores lines that contain a HTML text content. defaultfalse
"code": 40
"template": 120
"comments": 65
"ignoreComments": true
"ignoreTrailingComments": true
"ignoreUrls": true
"ignoreStrings": true
"ignoreTemplateLiterals": true
"ignoreRegExpLiterals": true
"ignoreHTMLAttributeValues": true
"ignoreHTMLTextContents": true
📚 Further Reading
🚀 Version
This rule was introduced in eslint-plugin-vue v6.1.0
🔍 Implementation
Taken with ❤️ from ESLint core