Skip to content

Commit 09b0715

Browse files
committed
tools: remove ESLint max-len rule
Refs: nodejs#41463 (comment) Refs: nodejs#41463 (comment)
1 parent 7343433 commit 09b0715

File tree

7 files changed

+8
-19
lines changed

7 files changed

+8
-19
lines changed

.eslintrc.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ module.exports = {
123123
line: {
124124
// Ignore all lines that have less characters than 20 and all lines that
125125
// start with something that looks like a variable name or code.
126-
// eslint-disable-next-line max-len
127126
ignorePattern: '.{0,20}$|[a-z]+ ?[0-9A-Z_.(/=:[#-]|std|http|ssh|ftp|(let|var|const) [a-z_A-Z0-9]+ =|[b-z] |[a-z]*[0-9].* ',
128127
ignoreInlineComments: true,
129128
ignoreConsecutiveComments: true,
@@ -165,14 +164,6 @@ module.exports = {
165164
'key-spacing': ['error', { mode: 'strict' }],
166165
'keyword-spacing': 'error',
167166
'linebreak-style': ['error', 'unix'],
168-
'max-len': ['error', {
169-
code: 80,
170-
ignorePattern: '^// Flags:',
171-
ignoreRegExpLiterals: true,
172-
ignoreTemplateLiterals: true,
173-
ignoreUrls: true,
174-
tabWidth: 2,
175-
}],
176167
'new-parens': 'error',
177168
'no-async-promise-executor': 'error',
178169
'no-case-declarations': 'error',
@@ -215,7 +206,6 @@ module.exports = {
215206
'no-proto': 'error',
216207
'no-redeclare': ['error', { 'builtinGlobals': false }],
217208
'no-restricted-modules': ['error', 'sys'],
218-
/* eslint-disable max-len */
219209
'no-restricted-properties': [
220210
'error',
221211
{
@@ -268,7 +258,6 @@ module.exports = {
268258
message: 'Use Number.isNaN() instead of the global isNaN() function.',
269259
},
270260
],
271-
/* eslint-enable max-len */
272261
'no-return-await': 'error',
273262
'no-self-assign': 'error',
274263
'no-self-compare': 'error',

test/es-module/test-esm-import-assertion-2.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import '../common/index.mjs';
33
import { strictEqual } from 'assert';
44

5-
// eslint-disable-next-line max-len
5+
66
import secret from '../fixtures/experimental.json' assert { type: 'json', unsupportedAssertion: 'should ignore' };
77

88
strictEqual(secret.ofLife, 42);

test/parallel/test-http2-binding.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const expectedHeaderNames = {
107107
HTTP2_HEADER_ACCEPT_LANGUAGE: 'accept-language',
108108
HTTP2_HEADER_ACCEPT_RANGES: 'accept-ranges',
109109
HTTP2_HEADER_ACCEPT: 'accept',
110-
HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: 'access-control-allow-credentials', // eslint-disable-line max-len
110+
HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: 'access-control-allow-credentials',
111111
HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: 'access-control-allow-headers',
112112
HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: 'access-control-allow-methods',
113113
HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: 'access-control-allow-origin',

test/parallel/test-policy-integrity-flag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const emptySRI = `sha512-${emptyHash.digest('base64')}`;
2121
const policyHash = crypto.createHash('sha512');
2222
policyHash.update(fs.readFileSync(depPolicy));
2323

24-
/* eslint-disable max-len */
24+
2525
// When using \n only
2626
const nixPolicySRI = 'sha512-u/nXI6UacK5fKDC2bopcgnuQY4JXJKlK3dESO3GIKKxwogVHjJqpF9rgk7Zw+TJXIc96xBUWKHuUgOzic8/4tQ==';
2727
// When \n is turned into \r\n

test/parallel/test-readline-keys.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ addTest('a\x1baA\x1bA', [
136136
]);
137137

138138
// xterm/gnome ESC [ letter (with modifiers)
139-
/* eslint-disable max-len */
139+
140140
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', [
141141
{ name: 'f1', sequence: '\x1b[2P', code: '[P', shift: true, meta: false, ctrl: false },
142142
{ name: 'f1', sequence: '\x1b[3P', code: '[P', shift: false, meta: true, ctrl: false },
@@ -250,7 +250,7 @@ addTest('\x1b[A\x1b[B\x1b[2A\x1b[2B', [
250250
]);
251251

252252
// `rxvt` keys with modifiers.
253-
// eslint-disable-next-line max-len
253+
254254
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^', [
255255
{ name: 'f9', sequence: '\x1b[20~', code: '[20~' },
256256
{ name: 'insert', sequence: '\x1b[2$', code: '[2$', shift: true },

test/parallel/test-url-parse-format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ const parseTests = {
844844
hostname: 'a.b',
845845
hash: null,
846846
pathname: '/%09bc%0Adr%0Def%20g%22hq%27j%3Ckl%3E',
847-
path: '/%09bc%0Adr%0Def%20g%22hq%27j%3Ckl%3E?mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz', // eslint-disable-line max-len
847+
path: '/%09bc%0Adr%0Def%20g%22hq%27j%3Ckl%3E?mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz',
848848
search: '?mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz',
849849
query: 'mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz',
850850
href: 'http://a.b/%09bc%0Adr%0Def%20g%22hq%27j%3Ckl%3E?mn%5Cop%5Eq=r%6099%7Bst%7Cuv%7Dwz'

test/parallel/test-util-inspect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2689,7 +2689,7 @@ assert.strictEqual(
26892689

26902690
expected = [
26912691
'[',
2692-
/* eslint-disable max-len */
2692+
26932693
' \u001b[33m0\u001b[39m, \u001b[33m1\u001b[39m, \u001b[33m2\u001b[39m, \u001b[33m3\u001b[39m,',
26942694
' \u001b[33m4\u001b[39m, \u001b[33m5\u001b[39m, \u001b[33m6\u001b[39m, \u001b[33m7\u001b[39m,',
26952695
' \u001b[33m8\u001b[39m, \u001b[33m9\u001b[39m, \u001b[33m10\u001b[39m, \u001b[33m11\u001b[39m,',
@@ -3146,7 +3146,7 @@ assert.strictEqual(
31463146
'[GeneratorFunction: generator] {\n' +
31473147
' [length]: 0,\n' +
31483148
" [name]: 'generator',\n" +
3149-
" [prototype]: Object [Generator] { [Symbol(Symbol.toStringTag)]: 'Generator' },\n" + // eslint-disable-line max-len
3149+
" [prototype]: Object [Generator] { [Symbol(Symbol.toStringTag)]: 'Generator' },\n" +
31503150
" [Symbol(Symbol.toStringTag)]: 'GeneratorFunction'\n" +
31513151
'}'
31523152
);

0 commit comments

Comments
 (0)