Showing 1,297 of 1,297 total issues
Too many nested callbacks (5). Maximum allowed is 3. Open
return _context4.abrupt('return', _promise2.default.all([this._get_ghost(namedId), this._get_shell(namedId, shellname, GhostViewClass), this._get_balloon(balloonname, GhostViewClass)]).then(function (_ref5) {
- Read upRead up
- Exclude checks
enforce a maximum depth that callbacks can be nested (max-nested-callbacks)
Many JavaScript libraries use the callback pattern to manage asynchronous operations. A program of any complexity will most likely need to manage several asynchronous operations at various levels of concurrency. A common pitfall that is easy to fall into is nesting callbacks, which makes code more difficult to read the deeper the callbacks are nested.
foo(function () {
bar(function () {
baz(function() {
qux(function () {
});
});
});
});
Rule Details
This rule enforces a maximum depth that callbacks can be nested to increase code clarity.
Options
This rule has a number or object option:
-
"max"
(default10
) enforces a maximum depth that callbacks can be nested
Deprecated: The object property maximum
is deprecated; please use the object property max
instead.
max
Examples of incorrect code for this rule with the { "max": 3 }
option:
/*eslint max-nested-callbacks: ["error", 3]*/
foo1(function() {
foo2(function() {
foo3(function() {
foo4(function() {
// Do something
});
});
});
});
Examples of correct code for this rule with the { "max": 3 }
option:
/*eslint max-nested-callbacks: ["error", 3]*/
foo1(handleFoo1);
function handleFoo1() {
foo2(handleFoo2);
}
function handleFoo2() {
foo3(handleFoo3);
}
function handleFoo3() {
foo4(handleFoo4);
}
function handleFoo4() {
foo5();
}
Further Reading
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-len](max-len.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 317 exceeds the maximum line length of 100. Open
var _ref8 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(fs, dirpath) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 461 exceeds the maximum line length of 100. Open
var _ref11 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee9(balloonname, GhostViewClass) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 409 exceeds the maximum line length of 100. Open
var _ref10 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee8(namedId, shellname) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 445 exceeds the maximum line length of 100. Open
var GhostViewClass = arguments.length <= 1 || arguments[1] === undefined ? this.GhostViewClass : arguments[1];
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 508 exceeds the maximum line length of 100. Open
var _ref12 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee10(balloonname) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 361 exceeds the maximum line length of 100. Open
var _ref9 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(namedId, shellname, GhostViewClass) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 560 exceeds the maximum line length of 100. Open
var _ref13 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee11(target) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 544 exceeds the maximum line length of 100. Open
var GhostViewClass = arguments.length <= 1 || arguments[1] === undefined ? this.GhostViewClass : arguments[1];
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 587 exceeds the maximum line length of 100. Open
if (!(target instanceof URL || target instanceof String || typeof target === 'string')) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 562 exceeds the maximum line length of 100. Open
var nanikaStorage, nar, dirpath, sakuraname, install_results, ghost_result, balloon_result, profile;
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 7 exceeds the maximum line length of 100. Open
exports.NamedKernelManagerController = exports.NamedKernelManager = exports.NamedKernelManagerControllers = exports.NamedKernelManagerRoutings = undefined;
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 611 exceeds the maximum line length of 100. Open
dirpath = typeof from === 'string' || from instanceof String ? from : this.namedId(from);
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Too many nested callbacks (4). Maximum allowed is 3. Open
install_results.forEach(function (install_result) {
- Read upRead up
- Exclude checks
enforce a maximum depth that callbacks can be nested (max-nested-callbacks)
Many JavaScript libraries use the callback pattern to manage asynchronous operations. A program of any complexity will most likely need to manage several asynchronous operations at various levels of concurrency. A common pitfall that is easy to fall into is nesting callbacks, which makes code more difficult to read the deeper the callbacks are nested.
foo(function () {
bar(function () {
baz(function() {
qux(function () {
});
});
});
});
Rule Details
This rule enforces a maximum depth that callbacks can be nested to increase code clarity.
Options
This rule has a number or object option:
-
"max"
(default10
) enforces a maximum depth that callbacks can be nested
Deprecated: The object property maximum
is deprecated; please use the object property max
instead.
max
Examples of incorrect code for this rule with the { "max": 3 }
option:
/*eslint max-nested-callbacks: ["error", 3]*/
foo1(function() {
foo2(function() {
foo3(function() {
foo4(function() {
// Do something
});
});
});
});
Examples of correct code for this rule with the { "max": 3 }
option:
/*eslint max-nested-callbacks: ["error", 3]*/
foo1(handleFoo1);
function handleFoo1() {
foo2(handleFoo2);
}
function handleFoo2() {
foo3(handleFoo3);
}
function handleFoo3() {
foo4(handleFoo4);
}
function handleFoo4() {
foo5();
}
Further Reading
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-len](max-len.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 83 exceeds the maximum line length of 100. Open
var _this = (0, _possibleConstructorReturn3.default)(this, (0, _getPrototypeOf2.default)(NamedKernelManager).call(this, components, routes, controllerClasses));
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 197 exceeds the maximum line length of 100. Open
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(namedId, fromNamedId) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Too many nested callbacks (4). Maximum allowed is 3. Open
return _regenerator2.default.wrap(function _callee3$(_context3) {
- Read upRead up
- Exclude checks
enforce a maximum depth that callbacks can be nested (max-nested-callbacks)
Many JavaScript libraries use the callback pattern to manage asynchronous operations. A program of any complexity will most likely need to manage several asynchronous operations at various levels of concurrency. A common pitfall that is easy to fall into is nesting callbacks, which makes code more difficult to read the deeper the callbacks are nested.
foo(function () {
bar(function () {
baz(function() {
qux(function () {
});
});
});
});
Rule Details
This rule enforces a maximum depth that callbacks can be nested to increase code clarity.
Options
This rule has a number or object option:
-
"max"
(default10
) enforces a maximum depth that callbacks can be nested
Deprecated: The object property maximum
is deprecated; please use the object property max
instead.
max
Examples of incorrect code for this rule with the { "max": 3 }
option:
/*eslint max-nested-callbacks: ["error", 3]*/
foo1(function() {
foo2(function() {
foo3(function() {
foo4(function() {
// Do something
});
});
});
});
Examples of correct code for this rule with the { "max": 3 }
option:
/*eslint max-nested-callbacks: ["error", 3]*/
foo1(handleFoo1);
function handleFoo1() {
foo2(handleFoo2);
}
function handleFoo2() {
foo3(handleFoo3);
}
function handleFoo3() {
foo4(handleFoo4);
}
function handleFoo4() {
foo5();
}
Further Reading
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-len](max-len.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Too many nested callbacks (4). Maximum allowed is 3. Open
return _regenerator2.default.wrap(function _callee5$(_context5) {
- Read upRead up
- Exclude checks
enforce a maximum depth that callbacks can be nested (max-nested-callbacks)
Many JavaScript libraries use the callback pattern to manage asynchronous operations. A program of any complexity will most likely need to manage several asynchronous operations at various levels of concurrency. A common pitfall that is easy to fall into is nesting callbacks, which makes code more difficult to read the deeper the callbacks are nested.
foo(function () {
bar(function () {
baz(function() {
qux(function () {
});
});
});
});
Rule Details
This rule enforces a maximum depth that callbacks can be nested to increase code clarity.
Options
This rule has a number or object option:
-
"max"
(default10
) enforces a maximum depth that callbacks can be nested
Deprecated: The object property maximum
is deprecated; please use the object property max
instead.
max
Examples of incorrect code for this rule with the { "max": 3 }
option:
/*eslint max-nested-callbacks: ["error", 3]*/
foo1(function() {
foo2(function() {
foo3(function() {
foo4(function() {
// Do something
});
});
});
});
Examples of correct code for this rule with the { "max": 3 }
option:
/*eslint max-nested-callbacks: ["error", 3]*/
foo1(handleFoo1);
function handleFoo1() {
foo2(handleFoo2);
}
function handleFoo2() {
foo3(handleFoo3);
}
function handleFoo3() {
foo4(handleFoo4);
}
function handleFoo4() {
foo5();
}
Further Reading
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-len](max-len.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 133 exceeds the maximum line length of 100. Open
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(namedId, fromNamedId) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/
Line 406 exceeds the maximum line length of 100. Open
var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7(target, from) {
- Read upRead up
- Exclude checks
enforce a maximum line length (max-len)
Very long lines of code in any language can be difficult to read. In order to aid in readability and maintainability many coders have developed a convention to limit lines of code to X number of characters (traditionally 80 characters).
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" }; // very long
Rule Details
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.
Options
This rule has a number or object option:
-
"code"
(default80
) enforces a maximum line length -
"tabWidth"
(default4
) specifies the character width for tab characters -
"comments"
enforces a maximum line length for comments; defaults to value ofcode
-
"ignorePattern"
ignores lines matching a regular expression; can only match a single line and need to be double escaped when written in YAML or JSON -
"ignoreComments": true
ignores all trailing comments and comments on their own line -
"ignoreTrailingComments": true
ignores only trailing comments -
"ignoreUrls": true
ignores lines that contain a URL -
"ignoreStrings": true
ignores lines that contain a double-quoted or single-quoted string -
"ignoreTemplateLiterals": true
ignores lines that contain a template literal -
"ignoreRegExpLiterals": true
ignores lines that contain a RegExp literal
code
Examples of incorrect code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
Examples of correct code for this rule with the default { "code": 80 }
option:
/*eslint max-len: ["error", 80]*/
var foo = {
"bar": "This is a bar.",
"baz": { "qux": "This is a qux" },
"easier": "to read"
};
tabWidth
Examples of incorrect code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
Examples of correct code for this rule with the default { "tabWidth": 4 }
option:
/*eslint max-len: ["error", 80, 4]*/
\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
\t \t \t \t "baz": { "qux": "This is a qux" }
\t \t };
comments
Examples of incorrect code for this rule with the { "comments": 65 }
option:
/*eslint max-len: ["error", { "comments": 65 }]*/
/**
* This is a comment that violates the maximum line length we have specified
**/
ignoreComments
Examples of correct code for this rule with the { "ignoreComments": true }
option:
/*eslint max-len: ["error", { "ignoreComments": true }]*/
/**
* This is a really really really really really really really really really long comment
**/
ignoreTrailingComments
Examples of correct code for this rule with the { "ignoreTrailingComments": true }
option:
/*eslint max-len: ["error", { "ignoreTrailingComments": true }]*/
var foo = 'bar'; // This is a really really really really really really really long comment
ignoreUrls
Examples of correct code for this rule with the { "ignoreUrls": true }
option:
/*eslint max-len: ["error", { "ignoreUrls": true }]*/
var url = 'https://www.example.com/really/really/really/really/really/really/really/long';
ignoreStrings
Examples of correct code for this rule with the { "ignoreStrings": true }
option:
/*eslint max-len: ["error", { "ignoreStrings": true }]*/
var longString = 'this is a really really really really really long string!';
ignoreTemplateLiterals
Examples of correct code for this rule with the { "ignoreTemplateLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreTemplateLiterals": true }]*/
var longTemplateLiteral = `this is a really really really really really long template literal!`;
ignoreRegExpLiterals
Examples of correct code for this rule with the { "ignoreRegExpLiterals": true }
option:
/*eslint max-len: ["error", { "ignoreRegExpLiterals": true }]*/
var longRegExpLiteral = /this is a really really really really really long regular expression!/;
ignorePattern
Examples of correct code for this rule with the { "ignorePattern": true }
option:
/*eslint max-len: ["error", { "ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/" }]*/
var dep = require('really/really/really/really/really/really/really/really/long/module');
Related Rules
- [complexity](complexity.md)
- [max-depth](max-depth.md)
- [max-nested-callbacks](max-nested-callbacks.md)
- [max-params](max-params.md)
- [max-statements](max-statements.md) Source: http://eslint.org/docs/rules/