Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: remove ESLint max-len rule #41509

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ module.exports = {
line: {
// Ignore all lines that have less characters than 20 and all lines that
// start with something that looks like a variable name or code.
// eslint-disable-next-line max-len
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].* ',
ignoreInlineComments: true,
ignoreConsecutiveComments: true,
Expand Down Expand Up @@ -165,14 +164,6 @@ module.exports = {
'key-spacing': ['error', { mode: 'strict' }],
'keyword-spacing': 'error',
'linebreak-style': ['error', 'unix'],
'max-len': ['error', {
code: 80,
ignorePattern: '^// Flags:',
ignoreRegExpLiterals: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
tabWidth: 2,
}],
'new-parens': 'error',
'no-async-promise-executor': 'error',
'no-case-declarations': 'error',
Expand Down Expand Up @@ -215,7 +206,6 @@ module.exports = {
'no-proto': 'error',
'no-redeclare': ['error', { 'builtinGlobals': false }],
'no-restricted-modules': ['error', 'sys'],
/* eslint-disable max-len */
'no-restricted-properties': [
'error',
{
Expand Down Expand Up @@ -268,7 +258,6 @@ module.exports = {
message: 'Use Number.isNaN() instead of the global isNaN() function.',
},
],
/* eslint-enable max-len */
'no-return-await': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
Expand Down
1 change: 0 additions & 1 deletion test/es-module/test-esm-import-assertion-2.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion test/parallel/test-http2-binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-policy-integrity-flag.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const emptySRI = `sha512-${emptyHash.digest('base64')}`;
const policyHash = crypto.createHash('sha512');
policyHash.update(fs.readFileSync(depPolicy));

/* eslint-disable max-len */
// When using \n only
const nixPolicySRI = 'sha512-u/nXI6UacK5fKDC2bopcgnuQY4JXJKlK3dESO3GIKKxwogVHjJqpF9rgk7Zw+TJXIc96xBUWKHuUgOzic8/4tQ==';
// When \n is turned into \r\n
Expand Down
3 changes: 1 addition & 2 deletions test/parallel/test-readline-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -250,7 +249,7 @@ addTest('\x1b[A\x1b[B\x1b[2A\x1b[2B', [
]);

// `rxvt` keys with modifiers.
// eslint-disable-next-line max-len

Trott marked this conversation as resolved.
Show resolved Hide resolved
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 },
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-url-parse-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -2689,7 +2689,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,',
Expand Down Expand Up @@ -3146,7 +3145,7 @@ assert.strictEqual(
'[GeneratorFunction: generator] {\n' +
' [length]: 0,\n' +
" [name]: 'generator',\n" +
" [prototype]: Object [Generator] { [Symbol(Symbol.toStringTag)]: 'Generator' },\n" + // eslint-disable-line max-len
" [prototype]: Object [Generator] { [Symbol(Symbol.toStringTag)]: 'Generator' },\n" +
" [Symbol(Symbol.toStringTag)]: 'GeneratorFunction'\n" +
'}'
);
Expand Down