Skip to content

Commit f7088e0

Browse files
committed
tools: ignore URLs in line length linting
Where inclusion of a lengthy URL causes a line to exceed 80 characters in our code base, do not report the line length as a linting error. PR-URL: nodejs#11890 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent d22346d commit f7088e0

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

.eslintrc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ rules:
9797
key-spacing: [2, {mode: minimum}]
9898
keyword-spacing: 2
9999
linebreak-style: [2, unix]
100-
max-len: [2, 80, 2]
100+
max-len: [2, {code: 80, ignoreUrls: true, tabWidth: 2}]
101101
new-parens: 2
102102
no-mixed-spaces-and-tabs: 2
103103
no-multiple-empty-lines: [2, {max: 2, maxEOF: 0, maxBOF: 0}]

lib/_http_server.js

-2
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,9 @@ function Server(requestListener) {
236236
this.on('request', requestListener);
237237
}
238238

239-
/* eslint-disable max-len */
240239
// Similar option to this. Too lazy to write my own docs.
241240
// http://www.squid-cache.org/Doc/config/half_closed_clients/
242241
// http://wiki.squid-cache.org/SquidFaq/InnerWorkings#What_is_a_half-closed_filedescriptor.3F
243-
/* eslint-enable max-len */
244242
this.httpAllowHalfOpen = false;
245243

246244
this.on('connection', connectionListener);

test/parallel/test-process-env.js

-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ if (process.argv[2] === 'you-are-the-child') {
4949
delete process.env.NON_EXISTING_VARIABLE;
5050
assert.strictEqual(true, delete process.env.NON_EXISTING_VARIABLE);
5151

52-
/* eslint-disable max-len */
5352
/* For the moment we are not going to support setting the timezone via the
5453
* environment variables. The problem is that various V8 platform backends
5554
* deal with timezone in different ways. The windows platform backend caches
@@ -66,7 +65,6 @@ date = new Date('Fri, 10 Sep 1982 03:15:00 GMT');
6665
assert.strictEqual(3, date.getUTCHours());
6766
assert.strictEqual(5, date.getHours());
6867
*/
69-
/* eslint-enable max-len */
7068

7169
// Environment variables should be case-insensitive on Windows, and
7270
// case-sensitive on other platforms.

0 commit comments

Comments
 (0)