diff --git a/.eslintrc.js b/.eslintrc.js index c4da703ecebc7e..c2c8e1df7e58d3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,6 +19,7 @@ const hacks = [ 'eslint-plugin-markdown', '@babel/eslint-parser', '@babel/plugin-syntax-import-attributes', + '@stylistic/eslint-plugin-js', ]; Module._findPath = (request, paths, isMain) => { const r = ModuleFindPath(request, paths, isMain); @@ -39,7 +40,7 @@ module.exports = { es2022: true, }, extends: ['eslint:recommended', 'plugin:jsdoc/recommended'], - plugins: ['jsdoc', 'markdown', 'node-core'], + plugins: ['jsdoc', 'markdown', 'node-core', '@stylistic/js'], parser: '@babel/eslint-parser', parserOptions: { babelOptions: { @@ -133,11 +134,7 @@ module.exports = { // https://eslint.org/docs/rules/ 'accessor-pairs': 'error', 'array-callback-return': 'error', - 'arrow-parens': 'error', - 'arrow-spacing': 'error', 'block-scoped-var': 'error', - 'block-spacing': 'error', - 'brace-style': ['error', '1tbs', { allowSingleLine: true }], 'capitalized-comments': ['error', 'always', { line: { // Ignore all lines that have less characters than 20 and all lines that @@ -150,49 +147,17 @@ module.exports = { ignorePattern: '.*', }, }], - 'comma-dangle': ['error', 'always-multiline'], - 'comma-spacing': 'error', - 'comma-style': 'error', - 'computed-property-spacing': 'error', 'default-case-last': 'error', - 'dot-location': ['error', 'property'], 'dot-notation': 'error', - 'eol-last': 'error', 'eqeqeq': ['error', 'smart'], - 'func-call-spacing': 'error', 'func-name-matching': 'error', 'func-style': ['error', 'declaration', { allowArrowFunctions: true }], - 'indent': ['error', 2, { - ArrayExpression: 'first', - CallExpression: { arguments: 'first' }, - FunctionDeclaration: { parameters: 'first' }, - FunctionExpression: { parameters: 'first' }, - MemberExpression: 'off', - ObjectExpression: 'first', - SwitchCase: 1, - }], - 'key-spacing': 'error', - 'keyword-spacing': 'error', - 'linebreak-style': 'error', - 'max-len': ['error', { - code: 120, - ignorePattern: '^// Flags:', - ignoreRegExpLiterals: true, - ignoreTemplateLiterals: true, - ignoreUrls: true, - tabWidth: 2, - }], - 'new-parens': 'error', - 'no-confusing-arrow': 'error', 'no-constant-condition': ['error', { checkLoops: false }], 'no-constructor-return': 'error', 'no-duplicate-imports': 'error', 'no-else-return': 'error', - 'no-extra-parens': ['error', 'functions'], 'no-lonely-if': 'error', 'no-mixed-requires': 'error', - 'no-multi-spaces': ['error', { ignoreEOLComments: true }], - 'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0, maxBOF: 0 }], 'no-new-require': 'error', 'no-path-concat': 'error', 'no-proto': 'error', @@ -257,10 +222,8 @@ module.exports = { }, ], 'no-self-compare': 'error', - 'no-tabs': 'error', 'no-template-curly-in-string': 'error', 'no-throw-literal': 'error', - 'no-trailing-spaces': 'error', 'no-undef': ['error', { typeof: true }], 'no-undef-init': 'error', 'no-unused-expressions': ['error', { allowShortCircuit: true }], @@ -276,39 +239,11 @@ module.exports = { 'no-useless-return': 'error', 'no-var': 'error', 'no-void': 'error', - 'no-whitespace-before-property': 'error', - 'object-curly-newline': 'error', - 'object-curly-spacing': ['error', 'always'], 'one-var': ['error', { initialized: 'never' }], - 'one-var-declaration-per-line': 'error', - 'operator-linebreak': ['error', 'after'], - 'padding-line-between-statements': [ - 'error', - { blankLine: 'always', prev: 'function', next: 'function' }, - ], 'prefer-const': ['error', { ignoreReadBeforeAssign: true }], 'prefer-object-has-own': 'error', - 'quotes': ['error', 'single', { avoidEscape: true }], - 'quote-props': ['error', 'consistent'], - 'rest-spread-spacing': 'error', - 'semi': 'error', - 'semi-spacing': 'error', - 'space-before-blocks': ['error', 'always'], - 'space-before-function-paren': ['error', { - anonymous: 'never', - named: 'never', - asyncArrow: 'always', - }], - 'space-in-parens': 'error', - 'space-infix-ops': 'error', - 'space-unary-ops': 'error', - 'spaced-comment': ['error', 'always', { - 'block': { 'balanced': true }, - 'exceptions': ['-'], - }], 'strict': ['error', 'global'], 'symbol-description': 'error', - 'template-curly-spacing': 'error', 'unicode-bom': 'error', 'valid-typeof': ['error', { requireStringLiterals: true }], @@ -327,6 +262,74 @@ module.exports = { 'jsdoc/check-tag-names': 'off', 'jsdoc/require-returns': 'off', + // Stylistic rules + '@stylistic/js/arrow-parens': 'error', + '@stylistic/js/arrow-spacing': 'error', + '@stylistic/js/block-spacing': 'error', + '@stylistic/js/brace-style': ['error', '1tbs', { allowSingleLine: true }], + '@stylistic/js/comma-dangle': ['error', 'always-multiline'], + '@stylistic/js/comma-spacing': 'error', + '@stylistic/js/comma-style': 'error', + '@stylistic/js/computed-property-spacing': 'error', + '@stylistic/js/dot-location': ['error', 'property'], + '@stylistic/js/eol-last': 'error', + '@stylistic/js/func-call-spacing': 'error', + '@stylistic/js/indent': ['error', 2, { + ArrayExpression: 'first', + CallExpression: { arguments: 'first' }, + FunctionDeclaration: { parameters: 'first' }, + FunctionExpression: { parameters: 'first' }, + MemberExpression: 'off', + ObjectExpression: 'first', + SwitchCase: 1, + }], + '@stylistic/js/key-spacing': 'error', + '@stylistic/js/keyword-spacing': 'error', + '@stylistic/js/linebreak-style': 'error', + '@stylistic/js/max-len': ['error', { + code: 120, + ignorePattern: '^// Flags:', + ignoreRegExpLiterals: true, + ignoreTemplateLiterals: true, + ignoreUrls: true, + tabWidth: 2, + }], + '@stylistic/js/new-parens': 'error', + '@stylistic/js/no-confusing-arrow': 'error', + '@stylistic/js/no-extra-parens': ['error', 'functions'], + '@stylistic/js/no-multi-spaces': ['error', { ignoreEOLComments: true }], + '@stylistic/js/no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0, maxBOF: 0 }], + '@stylistic/js/no-tabs': 'error', + '@stylistic/js/no-trailing-spaces': 'error', + '@stylistic/js/no-whitespace-before-property': 'error', + '@stylistic/js/object-curly-newline': 'error', + '@stylistic/js/object-curly-spacing': ['error', 'always'], + '@stylistic/js/one-var-declaration-per-line': 'error', + '@stylistic/js/operator-linebreak': ['error', 'after'], + '@stylistic/js/padding-line-between-statements': [ + 'error', + { blankLine: 'always', prev: 'function', next: 'function' }, + ], + '@stylistic/js/quotes': ['error', 'single', { avoidEscape: true }], + '@stylistic/js/quote-props': ['error', 'consistent'], + '@stylistic/js/rest-spread-spacing': 'error', + '@stylistic/js/semi': 'error', + '@stylistic/js/semi-spacing': 'error', + '@stylistic/js/space-before-blocks': ['error', 'always'], + '@stylistic/js/space-before-function-paren': ['error', { + anonymous: 'never', + named: 'never', + asyncArrow: 'always', + }], + '@stylistic/js/space-in-parens': 'error', + '@stylistic/js/space-infix-ops': 'error', + '@stylistic/js/space-unary-ops': 'error', + '@stylistic/js/spaced-comment': ['error', 'always', { + 'block': { 'balanced': true }, + 'exceptions': ['-'], + }], + '@stylistic/js/template-curly-spacing': 'error', + // Custom rules from eslint-plugin-node-core 'node-core/no-unescaped-regexp-dot': 'error', 'node-core/no-duplicate-requires': 'error', diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml index e8d24adb6e00aa..bdb3b88721edad 100644 --- a/doc/.eslintrc.yaml +++ b/doc/.eslintrc.yaml @@ -13,5 +13,5 @@ rules: prefer-rest-params: error prefer-template: error - # Stylistic Issues - no-multiple-empty-lines: [error, {max: 1, maxEOF: 0, maxBOF: 0}] + # Stylistic rules + '@stylistic/js/no-multiple-empty-lines': [error, {max: 1, maxEOF: 0, maxBOF: 0}] diff --git a/doc/api/dns.md b/doc/api/dns.md index 25709994e1bcc3..0c16767f336afe 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -163,7 +163,7 @@ Returns an array of IP address strings, formatted according to [RFC 5952][], that are currently configured for DNS resolution. A string will include a port section if a custom port is used. - + ```js [ @@ -468,7 +468,7 @@ will be present on the object: Here is an example of the `ret` object passed to the callback: - + ```js [ { type: 'A', address: '127.0.0.1', ttl: 299 }, @@ -932,7 +932,7 @@ Returns an array of IP address strings, formatted according to [RFC 5952][], that are currently configured for DNS resolution. A string will include a port section if a custom port is used. - + ```js [ @@ -1133,7 +1133,7 @@ present on the object: Here is an example of the result object: - + ```js [ { type: 'A', address: '127.0.0.1', ttl: 299 }, diff --git a/doc/api/http.md b/doc/api/http.md index ab74b49e7e587c..a4cbf9db672573 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -38,7 +38,7 @@ property, which is an array of `[key, value, key2, value2, ...]`. For example, the previous message header object might have a `rawHeaders` list like the following: - + ```js [ 'ConTent-Length', '123456', diff --git a/doc/api/http2.md b/doc/api/http2.md index f32e02956fcbb3..b7c27b523b313f 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -3585,7 +3585,7 @@ Accept: text/plain Then `request.url` will be: - + ```js '/status?name=ryan' diff --git a/doc/api/os.md b/doc/api/os.md index ce66dd25401609..ff2e5e4d243837 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -91,7 +91,7 @@ The properties included on each object include: * `idle` {number} The number of milliseconds the CPU has spent in idle mode. * `irq` {number} The number of milliseconds the CPU has spent in irq mode. - + ```js [ diff --git a/doc/api/process.md b/doc/api/process.md index 3f191d9fe73504..25ab47d161af8e 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1722,7 +1722,7 @@ Results in `process.execArgv`: And `process.argv`: - + ```js ['/usr/local/bin/node', 'script.js', '--version'] @@ -1742,7 +1742,7 @@ added: v0.1.100 The `process.execPath` property returns the absolute pathname of the executable that started the Node.js process. Symbolic links, if any, are resolved. - + ```js '/usr/local/bin/node' diff --git a/doc/api/zlib.md b/doc/api/zlib.md index a33de3833cbe9f..d5daa16a007f9f 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -264,7 +264,7 @@ From `zlib/zconf.h`, modified for Node.js usage: The memory requirements for deflate are (in bytes): - + ```js (1 << (windowBits + 2)) + (1 << (memLevel + 9)) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 834e2a1d814d7a..0cf84a0da5ee9e 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -4,9 +4,6 @@ env: rules: prefer-object-spread: error no-buffer-constructor: error - no-mixed-operators: - - error - - groups: [['&&', '||']] no-restricted-syntax: # Config copied from .eslintrc.js - error @@ -179,6 +176,12 @@ rules: - error - name: url message: Require `internal/url` instead of `url`. + + # Stylistic rules + '@stylistic/js/no-mixed-operators': + - error + - groups: [['&&', '||']] + # Custom rules in tools/eslint-rules node-core/avoid-prototype-pollution: error node-core/lowercase-name-for-primitive: error diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml index 1c1cfd4ef93e9a..c5f30b45229e04 100644 --- a/test/.eslintrc.yaml +++ b/test/.eslintrc.yaml @@ -8,7 +8,6 @@ rules: multiline-comment-style: [error, separate-lines] prefer-const: error symbol-description: off - comma-dangle: [error, always-multiline] no-restricted-syntax: # Config copied from .eslintrc.js @@ -54,6 +53,9 @@ rules: - selector: Identifier[name='webcrypto'] message: Use `globalThis.crypto`. + # Stylistic rules + '@stylistic/js/comma-dangle': [error, always-multiline] + # Custom rules in tools/eslint-rules node-core/prefer-assert-iferror: error node-core/prefer-assert-methods: error @@ -83,7 +85,7 @@ overrides: - sequential/*.js - sequential/*.mjs rules: - comma-dangle: [error, { + '@stylistic/js/comma-dangle': [error, { arrays: always-multiline, exports: always-multiline, functions: only-multiline, diff --git a/test/common/dns.js b/test/common/dns.js index 578f823684bbf9..d854c73629a07c 100644 --- a/test/common/dns.js +++ b/test/common/dns.js @@ -40,7 +40,7 @@ function readDomainFromPacket(buffer, offset) { } // Pointer to another part of the packet. assert.strictEqual(length & 0xC0, 0xC0); - // eslint-disable-next-line space-infix-ops, space-unary-ops + // eslint-disable-next-line @stylistic/js/space-infix-ops, @stylistic/js/space-unary-ops const pointeeOffset = buffer.readUInt16BE(offset) &~ 0xC000; return { nread: 2, diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 3132c52504421d..4c4073699f0548 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -730,7 +730,7 @@ assert.throws( // before the assertion causes any wrong assertion message. // Therefore, don't reformat the following code. // Refs: https://github.com/nodejs/node/issues/30872 - try { assert.ok(0); // eslint-disable-line no-useless-catch, brace-style + try { assert.ok(0); // eslint-disable-line no-useless-catch, @stylistic/js/brace-style } catch (err) { throw err; } @@ -767,7 +767,7 @@ assert.throws( // before the assertion causes any wrong assertion message. // Therefore, don't reformat the following code. // Refs: https://github.com/nodejs/node/issues/30872 - function test() { assert.ok(0); // eslint-disable-line brace-style + function test() { assert.ok(0); // eslint-disable-line @stylistic/js/brace-style } test(); }, @@ -804,7 +804,7 @@ assert.throws( () => { a( (() => 'string')() - // eslint-disable-next-line operator-linebreak + // eslint-disable-next-line @stylistic/js/operator-linebreak === 123 instanceof Buffer @@ -816,7 +816,7 @@ assert.throws( message: 'The expression evaluated to a falsy value:\n\n' + ' a(\n' + ' (() => \'string\')()\n' + - ' // eslint-disable-next-line operator-linebreak\n' + + ' // eslint-disable-next-line @stylistic/js/operator-linebreak\n' + ' ===\n' + ' 123 instanceof\n' + ' Buffer\n' + @@ -828,7 +828,7 @@ assert.throws( () => { a( (() => 'string')() - // eslint-disable-next-line operator-linebreak + // eslint-disable-next-line @stylistic/js/operator-linebreak === 123 instanceof Buffer @@ -840,7 +840,7 @@ assert.throws( message: 'The expression evaluated to a falsy value:\n\n' + ' a(\n' + ' (() => \'string\')()\n' + - ' // eslint-disable-next-line operator-linebreak\n' + + ' // eslint-disable-next-line @stylistic/js/operator-linebreak\n' + ' ===\n' + ' 123 instanceof\n' + ' Buffer\n' + @@ -848,7 +848,7 @@ assert.throws( } ); -/* eslint-disable indent */ +/* eslint-disable @stylistic/js/indent */ assert.throws(() => { a(( () => 'string')() === @@ -866,7 +866,7 @@ Buffer ' )\n' } ); -/* eslint-enable indent */ +/* eslint-enable @stylistic/js/indent */ assert.throws( () => { @@ -894,7 +894,7 @@ assert.throws( ); assert.throws( - // eslint-disable-next-line dot-notation, quotes + // eslint-disable-next-line dot-notation, @stylistic/js/quotes () => assert['ok']["apply"](null, [0]), { code: 'ERR_ASSERTION', diff --git a/test/parallel/test-internal-validators-validateoneof.js b/test/parallel/test-internal-validators-validateoneof.js index 5c5a62ef893726..116770a5d5e173 100644 --- a/test/parallel/test-internal-validators-validateoneof.js +++ b/test/parallel/test-internal-validators-validateoneof.js @@ -10,7 +10,7 @@ const { validateOneOf } = require('internal/validators'); const allowed = [2, 3]; assert.throws(() => validateOneOf(1, 'name', allowed), { code: 'ERR_INVALID_ARG_VALUE', - // eslint-disable-next-line quotes + // eslint-disable-next-line @stylistic/js/quotes message: `The argument 'name' must be one of: 2, 3. Received 1` }); } @@ -25,7 +25,7 @@ const { validateOneOf } = require('internal/validators'); const allowed = ['b', 'c']; assert.throws(() => validateOneOf('a', 'name', allowed), { code: 'ERR_INVALID_ARG_VALUE', - // eslint-disable-next-line quotes + // eslint-disable-next-line @stylistic/js/quotes message: `The argument 'name' must be one of: 'b', 'c'. Received 'a'` }); } @@ -40,7 +40,7 @@ const { validateOneOf } = require('internal/validators'); const allowed = [Symbol.for('b'), Symbol.for('c')]; assert.throws(() => validateOneOf(Symbol.for('a'), 'name', allowed), { code: 'ERR_INVALID_ARG_VALUE', - // eslint-disable-next-line quotes + // eslint-disable-next-line @stylistic/js/quotes message: `The argument 'name' must be one of: Symbol(b), Symbol(c). ` + 'Received Symbol(a)' }); diff --git a/test/parallel/test-policy-integrity-flag.js b/test/parallel/test-policy-integrity-flag.js index ddcd02236d27c0..1b4b013b900edd 100644 --- a/test/parallel/test-policy-integrity-flag.js +++ b/test/parallel/test-policy-integrity-flag.js @@ -21,12 +21,12 @@ const emptySRI = `sha512-${emptyHash.digest('base64')}`; const policyHash = crypto.createHash('sha512'); policyHash.update(fs.readFileSync(depPolicy)); -/* eslint-disable max-len */ +/* eslint-disable @stylistic/js/max-len */ // When using \n only const nixPolicySRI = 'sha512-u/nXI6UacK5fKDC2bopcgnuQY4JXJKlK3dESO3GIKKxwogVHjJqpF9rgk7Zw+TJXIc96xBUWKHuUgOzic8/4tQ=='; // When \n is turned into \r\n const windowsPolicySRI = 'sha512-OeyCPRo4OZMosHyquZXDHpuU1F4KzG9UHFnn12FMaHsvqFUt3TFZ+7wmZE7ThZ5rsQWkUjc9ZH0knGZ2e8BYPQ=='; -/* eslint-enable max-len */ +/* eslint-enable @stylistic/js/max-len */ const depPolicySRI = `${nixPolicySRI} ${windowsPolicySRI}`; { diff --git a/test/parallel/test-repl-colors.js b/test/parallel/test-repl-colors.js index dd1bdb1a08ee9e..e4187679039e20 100644 --- a/test/parallel/test-repl-colors.js +++ b/test/parallel/test-repl-colors.js @@ -1,4 +1,4 @@ -/* eslint-disable quotes */ +/* eslint-disable @stylistic/js/quotes */ 'use strict'; require('../common'); const { Duplex } = require('stream'); diff --git a/test/parallel/test-runner-coverage.js b/test/parallel/test-runner-coverage.js index 62338c2c3f7c33..c059e0ed8df936 100644 --- a/test/parallel/test-runner-coverage.js +++ b/test/parallel/test-runner-coverage.js @@ -22,7 +22,7 @@ function findCoverageFileForPid(pid) { } function getTapCoverageFixtureReport() { - /* eslint-disable max-len */ + /* eslint-disable @stylistic/js/max-len */ const report = [ '# start of coverage report', '# -------------------------------------------------------------------------------------------------------------------', @@ -36,7 +36,7 @@ function getTapCoverageFixtureReport() { '# -------------------------------------------------------------------------------------------------------------------', '# end of coverage report', ].join('\n'); - /* eslint-enable max-len */ + /* eslint-enable @stylistic/js/max-len */ if (common.isWindows) { return report.replaceAll('/', '\\'); @@ -46,7 +46,7 @@ function getTapCoverageFixtureReport() { } function getSpecCoverageFixtureReport() { - /* eslint-disable max-len */ + /* eslint-disable @stylistic/js/max-len */ const report = [ '\u2139 start of coverage report', '\u2139 -------------------------------------------------------------------------------------------------------------------', @@ -60,7 +60,7 @@ function getSpecCoverageFixtureReport() { '\u2139 -------------------------------------------------------------------------------------------------------------------', '\u2139 end of coverage report', ].join('\n'); - /* eslint-enable max-len */ + /* eslint-enable @stylistic/js/max-len */ if (common.isWindows) { return report.replaceAll('/', '\\'); diff --git a/test/parallel/test-runner-run.mjs b/test/parallel/test-runner-run.mjs index bda14a5e314d14..d6295522f96d95 100644 --- a/test/parallel/test-runner-run.mjs +++ b/test/parallel/test-runner-run.mjs @@ -350,7 +350,7 @@ describe('require(\'node:test\').run', { concurrency: true }, () => { }), { name: 'RangeError', code: 'ERR_OUT_OF_RANGE', - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len message: 'The value of "options.shard.index" is out of range. It must be >= 1 && <= 6 ("options.shard.total"). Received 0' }); }); @@ -365,7 +365,7 @@ describe('require(\'node:test\').run', { concurrency: true }, () => { }), { name: 'RangeError', code: 'ERR_OUT_OF_RANGE', - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len message: 'The value of "options.shard.index" is out of range. It must be >= 1 && <= 6 ("options.shard.total"). Received 7' }); }); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 4c9e0d683fe7d0..707a73820a4a59 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -1462,7 +1462,7 @@ if (typeof Symbol !== 'undefined') { } { - const x = new function() {}; // eslint-disable-line new-parens + const x = new function() {}; // eslint-disable-line @stylistic/js/new-parens assert.strictEqual(util.inspect(x), '{}'); } @@ -2056,7 +2056,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'"); // Verify that classes are properly inspected. [ - /* eslint-disable spaced-comment, no-multi-spaces, brace-style */ + /* eslint-disable @stylistic/js/spaced-comment, @stylistic/js/no-multi-spaces, @stylistic/js/brace-style */ // The whitespace is intentional. [class { }, '[class (anonymous)]'], [class extends Error { log() {} }, '[class (anonymous) extends Error]'], @@ -2064,14 +2064,14 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'"); '[class A]'], [class // Random { // comments /* */ are part of the toString() result - /* eslint-disable-next-line space-before-blocks */ + /* eslint-disable-next-line @stylistic/js/space-before-blocks */ äß/**/extends/*{*/TypeError{}, '[class äß extends TypeError]'], /* The whitespace and new line is intended! */ // Foobar !!! [class X extends /****/ Error // More comments {}, '[class X extends Error]'], - /* eslint-enable spaced-comment, no-multi-spaces, brace-style */ + /* eslint-enable @stylistic/js/spaced-comment, @stylistic/js/no-multi-spaces, @stylistic/js/brace-style */ ].forEach(([clazz, string]) => { const inspected = util.inspect(clazz); assert.strictEqual(inspected, string); @@ -2111,7 +2111,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'"); // "class" properties should not be detected as "class". { - // eslint-disable-next-line space-before-function-paren + // eslint-disable-next-line @stylistic/js/space-before-function-paren let obj = { class () {} }; assert.strictEqual( util.inspect(obj), @@ -3215,7 +3215,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" + // eslint-disable-line @stylistic/js/max-len " [Symbol(Symbol.toStringTag)]: 'GeneratorFunction'\n" + '}' ); diff --git a/test/parallel/test-webcrypto-export-import-ec.js b/test/parallel/test-webcrypto-export-import-ec.js index d0548f56662f94..27c37715be1838 100644 --- a/test/parallel/test-webcrypto-export-import-ec.js +++ b/test/parallel/test-webcrypto-export-import-ec.js @@ -380,8 +380,8 @@ async function testImportRaw({ name, publicUsages }, namedCurve) { // https://github.com/nodejs/node/issues/45859 (async function() { - const compressed = Buffer.from([48, 57, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, 3, 1, 7, 3, 34, 0, 2, 210, 16, 176, 166, 249, 217, 240, 18, 134, 128, 88, 180, 63, 164, 244, 113, 1, 133, 67, 187, 160, 12, 146, 80, 223, 146, 87, 194, 172, 174, 93, 209]); // eslint-disable-line max-len - const uncompressed = Buffer.from([48, 89, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, 3, 1, 7, 3, 66, 0, 4, 210, 16, 176, 166, 249, 217, 240, 18, 134, 128, 88, 180, 63, 164, 244, 113, 1, 133, 67, 187, 160, 12, 146, 80, 223, 146, 87, 194, 172, 174, 93, 209, 206, 3, 117, 82, 212, 129, 69, 12, 227, 155, 77, 16, 149, 112, 27, 23, 91, 250, 179, 75, 142, 108, 9, 158, 24, 241, 193, 152, 53, 131, 97, 232]); // eslint-disable-line max-len + const compressed = Buffer.from([48, 57, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, 3, 1, 7, 3, 34, 0, 2, 210, 16, 176, 166, 249, 217, 240, 18, 134, 128, 88, 180, 63, 164, 244, 113, 1, 133, 67, 187, 160, 12, 146, 80, 223, 146, 87, 194, 172, 174, 93, 209]); // eslint-disable-line @stylistic/js/max-len + const uncompressed = Buffer.from([48, 89, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, 3, 1, 7, 3, 66, 0, 4, 210, 16, 176, 166, 249, 217, 240, 18, 134, 128, 88, 180, 63, 164, 244, 113, 1, 133, 67, 187, 160, 12, 146, 80, 223, 146, 87, 194, 172, 174, 93, 209, 206, 3, 117, 82, 212, 129, 69, 12, 227, 155, 77, 16, 149, 112, 27, 23, 91, 250, 179, 75, 142, 108, 9, 158, 24, 241, 193, 152, 53, 131, 97, 232]); // eslint-disable-line @stylistic/js/max-len for (const name of ['ECDH', 'ECDSA']) { const options = { name, namedCurve: 'P-256' }; const key = await subtle.importKey('spki', compressed, options, true, []); diff --git a/test/parallel/test-zlib-brotli-16GB.js b/test/parallel/test-zlib-brotli-16GB.js index 6b7cd22abb74ec..ecdc0f46a198aa 100644 --- a/test/parallel/test-zlib-brotli-16GB.js +++ b/test/parallel/test-zlib-brotli-16GB.js @@ -6,7 +6,7 @@ const strictEqual = require('node:assert').strictEqual; // This tiny HEX string is a 16GB file. // This test verifies that the stream actually stops. -/* eslint-disable max-len */ +/* eslint-disable @stylistic/js/max-len */ const content = 'cfffff7ff82700e2b14020f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c32200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bffcfffff7ff82700e2b00040f7fe9ffffffff04f00c4610180eefd3fffffffe19f0088c30200ddfb7ffeffffc33f0110870500baf7fffcffff877f02200e0b0074effff9ffff0fff04401c1600e8defff3ffff1ffe0980382c00d0bdffe7ffff3ffc1300715800a07bff3f'; const buf = Buffer.from(content, 'hex'); diff --git a/tools/dep_updaters/update-eslint.sh b/tools/dep_updaters/update-eslint.sh index 60292fb505d293..dc429cabb647b4 100755 --- a/tools/dep_updaters/update-eslint.sh +++ b/tools/dep_updaters/update-eslint.sh @@ -47,7 +47,8 @@ rm -rf ../node_modules/eslint eslint-plugin-markdown \ @babel/core \ @babel/eslint-parser \ - @babel/plugin-syntax-import-attributes + @babel/plugin-syntax-import-attributes \ + @stylistic/eslint-plugin-js ) ( cd node_modules/eslint @@ -62,7 +63,8 @@ rm -rf ../node_modules/eslint eslint-plugin-markdown \ @babel/core \ @babel/eslint-parser \ - @babel/plugin-syntax-import-attributes + @babel/plugin-syntax-import-attributes \ + @stylistic/eslint-plugin-js ) # Use dmn to remove some unneeded files. "$NODE" "$NPM" exec --package=dmn@2.2.2 --yes -- dmn -f clean diff --git a/tools/eslint-rules/prefer-proto.js b/tools/eslint-rules/prefer-proto.js index 7273c1af294b02..fd992cbec3bf98 100644 --- a/tools/eslint-rules/prefer-proto.js +++ b/tools/eslint-rules/prefer-proto.js @@ -27,7 +27,7 @@ module.exports = { }, create(context) { return { - /* eslint max-len: 0 */ + /* eslint @stylistic/js/max-len: 0 */ 'CallExpression[arguments.length=1]:matches(\ [callee.type="Identifier"][callee.name="ObjectCreate"],\ [callee.type="MemberExpression"][callee.object.name="Object"][callee.property.name="create"]\ diff --git a/tools/node_modules/eslint/node_modules/@ampproject/remapping/dist/remapping.mjs b/tools/node_modules/eslint/node_modules/@ampproject/remapping/dist/remapping.mjs index b5eddeda5a7802..f3875999c027f7 100644 --- a/tools/node_modules/eslint/node_modules/@ampproject/remapping/dist/remapping.mjs +++ b/tools/node_modules/eslint/node_modules/@ampproject/remapping/dist/remapping.mjs @@ -1,17 +1,18 @@ import { decodedMappings, traceSegment, TraceMap } from '@jridgewell/trace-mapping'; -import { GenMapping, maybeAddSegment, setSourceContent, toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping'; +import { GenMapping, maybeAddSegment, setSourceContent, setIgnore, toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping'; -const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null); +const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false); const EMPTY_SOURCES = []; -function SegmentObject(source, line, column, name, content) { - return { source, line, column, name, content }; +function SegmentObject(source, line, column, name, content, ignore) { + return { source, line, column, name, content, ignore }; } -function Source(map, sources, source, content) { +function Source(map, sources, source, content, ignore) { return { map, sources, source, content, + ignore, }; } /** @@ -19,14 +20,14 @@ function Source(map, sources, source, content) { * (which may themselves be SourceMapTrees). */ function MapSource(map, sources) { - return Source(map, sources, '', null); + return Source(map, sources, '', null, false); } /** * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive * segment tracing ends at the `OriginalSource`. */ -function OriginalSource(source, content) { - return Source(null, EMPTY_SOURCES, source, content); +function OriginalSource(source, content, ignore) { + return Source(null, EMPTY_SOURCES, source, content, ignore); } /** * traceMappings is only called on the root level SourceMapTree, and begins the process of @@ -55,10 +56,12 @@ function traceMappings(tree) { if (traced == null) continue; } - const { column, line, name, content, source } = traced; + const { column, line, name, content, source, ignore } = traced; maybeAddSegment(gen, i, genCol, source, line, column, name); if (source && content != null) setSourceContent(gen, source, content); + if (ignore) + setIgnore(gen, source, true); } } return gen; @@ -69,7 +72,7 @@ function traceMappings(tree) { */ function originalPositionFor(source, line, column, name) { if (!source.map) { - return SegmentObject(source.source, line, column, name, source.content); + return SegmentObject(source.source, line, column, name, source.content, source.ignore); } const segment = traceSegment(source.map, line, column); // If we couldn't find a segment, then this doesn't exist in the sourcemap. @@ -114,7 +117,7 @@ function buildSourceMapTree(input, loader) { return tree; } function build(map, loader, importer, importerDepth) { - const { resolvedSources, sourcesContent } = map; + const { resolvedSources, sourcesContent, ignoreList } = map; const depth = importerDepth + 1; const children = resolvedSources.map((sourceFile, i) => { // The loading context gives the loader more information about why this file is being loaded @@ -126,20 +129,22 @@ function build(map, loader, importer, importerDepth) { depth, source: sourceFile || '', content: undefined, + ignore: undefined, }; // Use the provided loader callback to retrieve the file's sourcemap. // TODO: We should eventually support async loading of sourcemap files. const sourceMap = loader(ctx.source, ctx); - const { source, content } = ctx; + const { source, content, ignore } = ctx; // If there is a sourcemap, then we need to recurse into it to load its source files. if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth); - // Else, it's an an unmodified source file. + // Else, it's an unmodified source file. // The contents of this unmodified source file can be overridden via the loader context, // allowing it to be explicitly null or a string. If it remains undefined, we fall back to // the importing sourcemap's `sourcesContent` field. const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; - return OriginalSource(source, sourceContent); + const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false; + return OriginalSource(source, sourceContent, ignored); }); return MapSource(map, children); } @@ -155,6 +160,7 @@ class SourceMap { this.file = out.file; this.mappings = out.mappings; this.names = out.names; + this.ignoreList = out.ignoreList; this.sourceRoot = out.sourceRoot; this.sources = out.sources; if (!options.excludeContent) { diff --git a/tools/node_modules/eslint/node_modules/@ampproject/remapping/dist/remapping.umd.js b/tools/node_modules/eslint/node_modules/@ampproject/remapping/dist/remapping.umd.js index e292d4c37f8035..6b7b3bb520a45d 100644 --- a/tools/node_modules/eslint/node_modules/@ampproject/remapping/dist/remapping.umd.js +++ b/tools/node_modules/eslint/node_modules/@ampproject/remapping/dist/remapping.umd.js @@ -4,17 +4,18 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.remapping = factory(global.traceMapping, global.genMapping)); })(this, (function (traceMapping, genMapping) { 'use strict'; - const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null); + const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false); const EMPTY_SOURCES = []; - function SegmentObject(source, line, column, name, content) { - return { source, line, column, name, content }; + function SegmentObject(source, line, column, name, content, ignore) { + return { source, line, column, name, content, ignore }; } - function Source(map, sources, source, content) { + function Source(map, sources, source, content, ignore) { return { map, sources, source, content, + ignore, }; } /** @@ -22,14 +23,14 @@ * (which may themselves be SourceMapTrees). */ function MapSource(map, sources) { - return Source(map, sources, '', null); + return Source(map, sources, '', null, false); } /** * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive * segment tracing ends at the `OriginalSource`. */ - function OriginalSource(source, content) { - return Source(null, EMPTY_SOURCES, source, content); + function OriginalSource(source, content, ignore) { + return Source(null, EMPTY_SOURCES, source, content, ignore); } /** * traceMappings is only called on the root level SourceMapTree, and begins the process of @@ -58,10 +59,12 @@ if (traced == null) continue; } - const { column, line, name, content, source } = traced; + const { column, line, name, content, source, ignore } = traced; genMapping.maybeAddSegment(gen, i, genCol, source, line, column, name); if (source && content != null) genMapping.setSourceContent(gen, source, content); + if (ignore) + genMapping.setIgnore(gen, source, true); } } return gen; @@ -72,7 +75,7 @@ */ function originalPositionFor(source, line, column, name) { if (!source.map) { - return SegmentObject(source.source, line, column, name, source.content); + return SegmentObject(source.source, line, column, name, source.content, source.ignore); } const segment = traceMapping.traceSegment(source.map, line, column); // If we couldn't find a segment, then this doesn't exist in the sourcemap. @@ -117,7 +120,7 @@ return tree; } function build(map, loader, importer, importerDepth) { - const { resolvedSources, sourcesContent } = map; + const { resolvedSources, sourcesContent, ignoreList } = map; const depth = importerDepth + 1; const children = resolvedSources.map((sourceFile, i) => { // The loading context gives the loader more information about why this file is being loaded @@ -129,20 +132,22 @@ depth, source: sourceFile || '', content: undefined, + ignore: undefined, }; // Use the provided loader callback to retrieve the file's sourcemap. // TODO: We should eventually support async loading of sourcemap files. const sourceMap = loader(ctx.source, ctx); - const { source, content } = ctx; + const { source, content, ignore } = ctx; // If there is a sourcemap, then we need to recurse into it to load its source files. if (sourceMap) return build(new traceMapping.TraceMap(sourceMap, source), loader, source, depth); - // Else, it's an an unmodified source file. + // Else, it's an unmodified source file. // The contents of this unmodified source file can be overridden via the loader context, // allowing it to be explicitly null or a string. If it remains undefined, we fall back to // the importing sourcemap's `sourcesContent` field. const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; - return OriginalSource(source, sourceContent); + const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false; + return OriginalSource(source, sourceContent, ignored); }); return MapSource(map, children); } @@ -158,6 +163,7 @@ this.file = out.file; this.mappings = out.mappings; this.names = out.names; + this.ignoreList = out.ignoreList; this.sourceRoot = out.sourceRoot; this.sources = out.sources; if (!options.excludeContent) { diff --git a/tools/node_modules/eslint/node_modules/@ampproject/remapping/package.json b/tools/node_modules/eslint/node_modules/@ampproject/remapping/package.json index bf3dad29b5c235..091224c6730b07 100644 --- a/tools/node_modules/eslint/node_modules/@ampproject/remapping/package.json +++ b/tools/node_modules/eslint/node_modules/@ampproject/remapping/package.json @@ -1,6 +1,6 @@ { "name": "@ampproject/remapping", - "version": "2.2.1", + "version": "2.3.0", "description": "Remap sequential sourcemaps through transformations to point at the original source code", "keywords": [ "source", @@ -69,7 +69,7 @@ "typescript": "4.6.3" }, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" } } diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js index 2f900ebacdc6cd..85ef5d6cda3b78 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js @@ -6,27 +6,26 @@ Object.defineProperty(exports, "__esModule", { exports.codeFrameColumns = codeFrameColumns; exports.default = _default; var _highlight = require("@babel/highlight"); -var _chalk = _interopRequireWildcard(require("chalk"), true); +var _picocolors = _interopRequireWildcard(require("picocolors"), true); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -let chalkWithForcedColor = undefined; -function getChalk(forceColor) { +const colors = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, _picocolors.createColors)(false) : _picocolors.default; +const compose = (f, g) => v => f(g(v)); +let pcWithForcedColor = undefined; +function getColors(forceColor) { if (forceColor) { - var _chalkWithForcedColor; - (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({ - enabled: true, - level: 1 - }); - return chalkWithForcedColor; + var _pcWithForcedColor; + (_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true); + return pcWithForcedColor; } - return _chalk.default; + return colors; } let deprecationWarningShown = false; -function getDefs(chalk) { +function getDefs(colors) { return { - gutter: chalk.grey, - marker: chalk.red.bold, - message: chalk.red.bold + gutter: colors.gray, + marker: compose(colors.red, colors.bold), + message: compose(colors.red, colors.bold) }; } const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; @@ -88,10 +87,10 @@ function getMarkerLines(loc, source, opts) { } function codeFrameColumns(rawLines, loc, opts = {}) { const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts); - const chalk = getChalk(opts.forceColor); - const defs = getDefs(chalk); - const maybeHighlight = (chalkFn, string) => { - return highlighted ? chalkFn(string) : string; + const colors = getColors(opts.forceColor); + const defs = getDefs(colors); + const maybeHighlight = (fmt, string) => { + return highlighted ? fmt(string) : string; }; const lines = rawLines.split(NEWLINE); const { @@ -127,7 +126,7 @@ function codeFrameColumns(rawLines, loc, opts = {}) { frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; } if (highlighted) { - return chalk.reset(frame); + return colors.reset(frame); } else { return frame; } diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/index.js b/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/index.js deleted file mode 100644 index 90a871c4d78f6f..00000000000000 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; -const colorConvert = require('color-convert'); - -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Fix humans - styles.color.grey = styles.color.gray; - - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; - - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - } - - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/license b/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/package.json b/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/package.json deleted file mode 100644 index 65edb48c399c5c..00000000000000 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "ansi-styles", - "version": "3.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "color-convert": "^1.9.0" - }, - "devDependencies": { - "ava": "*", - "babel-polyfill": "^6.23.0", - "svg-term-cli": "^2.1.1", - "xo": "*" - }, - "ava": { - "require": "babel-polyfill" - } -} diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/readme.md b/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/readme.md deleted file mode 100644 index 3158e2df59ce66..00000000000000 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,147 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - - - - -## Install - -``` -$ npm install ansi-styles -``` - - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `gray` ("bright black") -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/index.js b/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/index.js deleted file mode 100644 index 1cc5fa89a95159..00000000000000 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/index.js +++ /dev/null @@ -1,228 +0,0 @@ -'use strict'; -const escapeStringRegexp = require('escape-string-regexp'); -const ansiStyles = require('ansi-styles'); -const stdoutColor = require('supports-color').stdout; - -const template = require('./templates.js'); - -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; - -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); - -const styles = Object.create(null); - -function applyOptions(obj, options) { - options = options || {}; - - // Detect level if not set manually - const scLevel = stdoutColor ? stdoutColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; -} - -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = Chalk; - - return chalk.template; - } - - applyOptions(this, options); -} - -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} - -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; -} - -styles.visible = { - get() { - return build.call(this, this._styles || [], true, 'visible'); - } -}; - -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, styles); - -function build(_styles, _empty, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder._empty = _empty; - - const self = this; - - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); - - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - return builder; -} - -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? '' : str; - } - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - for (const code of this._styles.slice().reverse()) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } - - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; - - return str; -} - -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } - - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return template(chalk, parts.join('')); -} - -Object.defineProperties(Chalk.prototype, styles); - -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = stdoutColor; -module.exports.default = module.exports; // For TypeScript diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/index.js.flow b/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/index.js.flow deleted file mode 100644 index 622caaa2e803f3..00000000000000 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/index.js.flow +++ /dev/null @@ -1,93 +0,0 @@ -// @flow strict - -type TemplateStringsArray = $ReadOnlyArray; - -export type Level = $Values<{ - None: 0, - Basic: 1, - Ansi256: 2, - TrueColor: 3 -}>; - -export type ChalkOptions = {| - enabled?: boolean, - level?: Level -|}; - -export type ColorSupport = {| - level: Level, - hasBasic: boolean, - has256: boolean, - has16m: boolean -|}; - -export interface Chalk { - (...text: string[]): string, - (text: TemplateStringsArray, ...placeholders: string[]): string, - constructor(options?: ChalkOptions): Chalk, - enabled: boolean, - level: Level, - rgb(r: number, g: number, b: number): Chalk, - hsl(h: number, s: number, l: number): Chalk, - hsv(h: number, s: number, v: number): Chalk, - hwb(h: number, w: number, b: number): Chalk, - bgHex(color: string): Chalk, - bgKeyword(color: string): Chalk, - bgRgb(r: number, g: number, b: number): Chalk, - bgHsl(h: number, s: number, l: number): Chalk, - bgHsv(h: number, s: number, v: number): Chalk, - bgHwb(h: number, w: number, b: number): Chalk, - hex(color: string): Chalk, - keyword(color: string): Chalk, - - +reset: Chalk, - +bold: Chalk, - +dim: Chalk, - +italic: Chalk, - +underline: Chalk, - +inverse: Chalk, - +hidden: Chalk, - +strikethrough: Chalk, - - +visible: Chalk, - - +black: Chalk, - +red: Chalk, - +green: Chalk, - +yellow: Chalk, - +blue: Chalk, - +magenta: Chalk, - +cyan: Chalk, - +white: Chalk, - +gray: Chalk, - +grey: Chalk, - +blackBright: Chalk, - +redBright: Chalk, - +greenBright: Chalk, - +yellowBright: Chalk, - +blueBright: Chalk, - +magentaBright: Chalk, - +cyanBright: Chalk, - +whiteBright: Chalk, - - +bgBlack: Chalk, - +bgRed: Chalk, - +bgGreen: Chalk, - +bgYellow: Chalk, - +bgBlue: Chalk, - +bgMagenta: Chalk, - +bgCyan: Chalk, - +bgWhite: Chalk, - +bgBlackBright: Chalk, - +bgRedBright: Chalk, - +bgGreenBright: Chalk, - +bgYellowBright: Chalk, - +bgBlueBright: Chalk, - +bgMagentaBright: Chalk, - +bgCyanBright: Chalk, - +bgWhiteBrigh: Chalk, - - supportsColor: ColorSupport -}; - -declare module.exports: Chalk; diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/license b/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/package.json b/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/package.json deleted file mode 100644 index bc324685a7625f..00000000000000 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "chalk", - "version": "2.4.2", - "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava", - "bench": "matcha benchmark.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls" - }, - "files": [ - "index.js", - "templates.js", - "types/index.d.ts", - "index.js.flow" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "devDependencies": { - "ava": "*", - "coveralls": "^3.0.0", - "execa": "^0.9.0", - "flow-bin": "^0.68.0", - "import-fresh": "^2.0.0", - "matcha": "^0.7.0", - "nyc": "^11.0.2", - "resolve-from": "^4.0.0", - "typescript": "^2.5.3", - "xo": "*" - }, - "types": "types/index.d.ts", - "xo": { - "envs": [ - "node", - "mocha" - ], - "ignores": [ - "test/_flow.js" - ] - } -} diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/readme.md b/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/readme.md deleted file mode 100644 index d298e2c48d64a0..00000000000000 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/node_modules/chalk/readme.md +++ /dev/null @@ -1,314 +0,0 @@ -

-
-
- Chalk -
-
-
-

- -> Terminal string styling done right - -[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) - -### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) - - - - -## Highlights - -- Expressive API -- Highly performant -- Ability to nest styles -- [256/Truecolor color support](#256-and-truecolor-color-support) -- Auto-detects color support -- Doesn't extend `String.prototype` -- Clean and focused -- Actively maintained -- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 - - -## Install - -```console -$ npm install chalk -``` - - - - - - -## Usage - -```js -const chalk = require('chalk'); - -console.log(chalk.blue('Hello world!')); -``` - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -const chalk = require('chalk'); -const log = console.log; - -// Combine styled and normal strings -log(chalk.blue('Hello') + ' World' + chalk.red('!')); - -// Compose multiple styles using the chainable API -log(chalk.blue.bgRed.bold('Hello world!')); - -// Pass in multiple arguments -log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); - -// Nest styles -log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); - -// Nest styles of the same type even (color, underline, background) -log(chalk.green( - 'I am a green line ' + - chalk.blue.underline.bold('with a blue substring') + - ' that becomes green again!' -)); - -// ES2015 template literal -log(` -CPU: ${chalk.red('90%')} -RAM: ${chalk.green('40%')} -DISK: ${chalk.yellow('70%')} -`); - -// ES2015 tagged template literal -log(chalk` -CPU: {red ${cpu.totalPercent}%} -RAM: {green ${ram.used / ram.total * 100}%} -DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} -`); - -// Use RGB colors in terminal emulators that support it. -log(chalk.keyword('orange')('Yay for orange colored text!')); -log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); -log(chalk.hex('#DEADED').bold('Bold gray!')); -``` - -Easily define your own themes: - -```js -const chalk = require('chalk'); - -const error = chalk.bold.red; -const warning = chalk.keyword('orange'); - -console.log(error('Error!')); -console.log(warning('Warning!')); -``` - -Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): - -```js -const name = 'Sindre'; -console.log(chalk.green('Hello %s'), name); -//=> 'Hello Sindre' -``` - - -## API - -### chalk.`