From 870044ffa124209f18e82aff4c7bc902fb80e749 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 21 Jan 2022 07:28:07 -0800 Subject: [PATCH] tools: increase maximum line length to 120 characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/41586 Reviewed-By: Michaƫl Zasso Reviewed-By: Mestery Reviewed-By: Matteo Collina Reviewed-By: James M Snell Reviewed-By: Beth Griggs Reviewed-By: Tierney Cyren --- .eslintrc.js | 4 +--- test/es-module/test-esm-import-assertion-2.mjs | 1 - test/parallel/test-http2-binding.js | 2 +- test/parallel/test-readline-keys.js | 3 --- test/parallel/test-url-parse-format.js | 2 +- test/parallel/test-util-inspect.js | 2 -- 6 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3f2d4ace7c0c19..2ba2f71b45bbc9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -163,7 +163,7 @@ module.exports = { 'keyword-spacing': 'error', 'linebreak-style': ['error', 'unix'], 'max-len': ['error', { - code: 80, + code: 120, ignorePattern: '^// Flags:', ignoreRegExpLiterals: true, ignoreTemplateLiterals: true, @@ -186,7 +186,6 @@ module.exports = { 'no-proto': 'error', 'no-redeclare': ['error', { 'builtinGlobals': false }], 'no-restricted-modules': ['error', 'sys'], - /* eslint-disable max-len */ 'no-restricted-properties': [ 'error', { @@ -239,7 +238,6 @@ module.exports = { message: 'Use Number.isNaN() instead of the global isNaN() function.', }, ], - /* eslint-enable max-len */ 'no-return-await': 'error', 'no-self-compare': 'error', 'no-tabs': 'error', diff --git a/test/es-module/test-esm-import-assertion-2.mjs b/test/es-module/test-esm-import-assertion-2.mjs index 3598f353a3f9d5..70947fcf212d61 100644 --- a/test/es-module/test-esm-import-assertion-2.mjs +++ b/test/es-module/test-esm-import-assertion-2.mjs @@ -2,7 +2,6 @@ import '../common/index.mjs'; import { strictEqual } from 'assert'; -// eslint-disable-next-line max-len import secret from '../fixtures/experimental.json' assert { type: 'json', unsupportedAssertion: 'should ignore' }; strictEqual(secret.ofLife, 42); diff --git a/test/parallel/test-http2-binding.js b/test/parallel/test-http2-binding.js index e81a58dfe8a5c1..29f2901e85e6e0 100644 --- a/test/parallel/test-http2-binding.js +++ b/test/parallel/test-http2-binding.js @@ -107,7 +107,7 @@ const expectedHeaderNames = { HTTP2_HEADER_ACCEPT_LANGUAGE: 'accept-language', HTTP2_HEADER_ACCEPT_RANGES: 'accept-ranges', HTTP2_HEADER_ACCEPT: 'accept', - HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: 'access-control-allow-credentials', // eslint-disable-line max-len + HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: 'access-control-allow-credentials', HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: 'access-control-allow-headers', HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: 'access-control-allow-methods', HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: 'access-control-allow-origin', diff --git a/test/parallel/test-readline-keys.js b/test/parallel/test-readline-keys.js index 8ae0d680d5f039..01757b302a7991 100644 --- a/test/parallel/test-readline-keys.js +++ b/test/parallel/test-readline-keys.js @@ -136,7 +136,6 @@ addTest('a\x1baA\x1bA', [ ]); // xterm/gnome ESC [ letter (with modifiers) -/* eslint-disable max-len */ addTest('\x1b[2P\x1b[3P\x1b[4P\x1b[5P\x1b[6P\x1b[7P\x1b[8P\x1b[3Q\x1b[8Q\x1b[3R\x1b[8R\x1b[3S\x1b[8S', [ { name: 'f1', sequence: '\x1b[2P', code: '[P', shift: true, meta: false, ctrl: false }, { name: 'f1', sequence: '\x1b[3P', code: '[P', shift: false, meta: true, ctrl: false }, @@ -152,7 +151,6 @@ addTest('\x1b[2P\x1b[3P\x1b[4P\x1b[5P\x1b[6P\x1b[7P\x1b[8P\x1b[3Q\x1b[8Q\x1b[3R\ { name: 'f4', sequence: '\x1b[3S', code: '[S', meta: true }, { name: 'f4', sequence: '\x1b[8S', code: '[S', shift: true, meta: true, ctrl: true }, ]); -/* eslint-enable max-len */ // xterm/gnome ESC O letter addTest('\x1bOP\x1bOQ\x1bOR\x1bOS', [ @@ -250,7 +248,6 @@ addTest('\x1b[A\x1b[B\x1b[2A\x1b[2B', [ ]); // `rxvt` keys with modifiers. -// eslint-disable-next-line max-len addTest('\x1b[20~\x1b[2$\x1b[2^\x1b[3$\x1b[3^\x1b[5$\x1b[5^\x1b[6$\x1b[6^\x1b[7$\x1b[7^\x1b[8$\x1b[8^', [ { name: 'f9', sequence: '\x1b[20~', code: '[20~' }, { name: 'insert', sequence: '\x1b[2$', code: '[2$', shift: true }, diff --git a/test/parallel/test-url-parse-format.js b/test/parallel/test-url-parse-format.js index 4fce198624a6fc..e1cf80a2778abd 100644 --- a/test/parallel/test-url-parse-format.js +++ b/test/parallel/test-url-parse-format.js @@ -844,7 +844,7 @@ const parseTests = { hostname: 'a.b', hash: null, pathname: '/%09bc%0Adr%0Def%20g%22hq%27j%3Ckl%3E', - path: '/%09bc%0Adr%0Def%20g%22hq%27j%3Ckl%3E?mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz', // eslint-disable-line max-len + path: '/%09bc%0Adr%0Def%20g%22hq%27j%3Ckl%3E?mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz', search: '?mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz', query: 'mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz', href: 'http://a.b/%09bc%0Adr%0Def%20g%22hq%27j%3Ckl%3E?mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz' diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 64852a8bca38b7..43913c3ab4c9da 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -2690,7 +2690,6 @@ assert.strictEqual( expected = [ '[', - /* eslint-disable max-len */ ' \u001b[33m0\u001b[39m, \u001b[33m1\u001b[39m, \u001b[33m2\u001b[39m, \u001b[33m3\u001b[39m,', ' \u001b[33m4\u001b[39m, \u001b[33m5\u001b[39m, \u001b[33m6\u001b[39m, \u001b[33m7\u001b[39m,', ' \u001b[33m8\u001b[39m, \u001b[33m9\u001b[39m, \u001b[33m10\u001b[39m, \u001b[33m11\u001b[39m,', @@ -2706,7 +2705,6 @@ assert.strictEqual( ' \u001b[33m48\u001b[39m, \u001b[33m49\u001b[39m, \u001b[33m50\u001b[39m, \u001b[33m51\u001b[39m,', ' \u001b[33m52\u001b[39m, \u001b[33m53\u001b[39m, \u001b[33m54\u001b[39m, \u001b[33m55\u001b[39m,', ' \u001b[33m56\u001b[39m, \u001b[33m57\u001b[39m, \u001b[33m58\u001b[39m, \u001b[33m59\u001b[39m', - /* eslint-enable max-len */ ']', ].join('\n');