diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 31aaa6125b42cd..7a6b667eabe280 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -249,3 +249,52 @@ globals: module: false internalBinding: false primordials: false +overrides: + - files: + - ./*/promises.js + - ./_stream_*.js + - ./_tls_common.js + - ./assert/*.js + - ./cluster.js + - ./console.js + - ./constants.js + - ./internal/assert.js + - ./internal/child_process/*.js + - ./internal/cli_table.js + - ./internal/debugger/inspect.js + - ./internal/events/*.js + - ./internal/fixed_queue.js + - ./internal/freelist.js + - ./internal/heap_utils.js + - ./internal/http.js + - ./internal/idna.js + - ./internal/js_stream_socket.js + - ./internal/mime.js + - ./internal/modules/*.js + - ./internal/per_context/messageport.js + - ./internal/policy/*.js + - ./internal/priority_queue.js + - ./internal/readline/*.js + - ./internal/readme.md + - ./internal/repl/history.js + - ./internal/source_map/prepare_stack_trace.js + - ./internal/structured_clone.js + - ./internal/test/*.js + - ./internal/test_runner/**/*.js + - ./internal/tls/secure-context.js + - ./internal/util/parse_args/*.js + - ./internal/v8_prof_processor.js + - ./internal/vm.js + - ./internal/watch_mode/*.js + - ./internal/webidl.js + - ./module.js + - ./path/*.js + - ./process.js + - ./punycode.js + - ./stream/*.js + - ./sys.js + - ./test.js + - ./url.js + - ./util/*.js + rules: + comma-dangle: [error, always-multiline] diff --git a/lib/internal/modules/cjs/helpers.js b/lib/internal/modules/cjs/helpers.js index cd8aaa6a700683..a6778ceed2950d 100644 --- a/lib/internal/modules/cjs/helpers.js +++ b/lib/internal/modules/cjs/helpers.js @@ -15,7 +15,7 @@ const { } = primordials; const { ERR_MANIFEST_DEPENDENCY_MISSING, - ERR_UNKNOWN_BUILTIN_MODULE + ERR_UNKNOWN_BUILTIN_MODULE, } = require('internal/errors').codes; const { BuiltinModule } = require('internal/bootstrap/loaders'); @@ -201,7 +201,7 @@ function addBuiltinLibsToObject(object, dummyModuleName) { }, set: setReal, configurable: true, - enumerable: false + enumerable: false, }); }); } diff --git a/lib/internal/policy/sri.js b/lib/internal/policy/sri.js index 72f7798ce4f333..675226a3a0723a 100644 --- a/lib/internal/policy/sri.js +++ b/lib/internal/policy/sri.js @@ -14,7 +14,7 @@ const { } = primordials; const { - ERR_SRI_PARSE + ERR_SRI_PARSE, } = require('internal/errors').codes; const kWSP = '[\\x20\\x09]'; const kVCHAR = '[\\x21-\\x7E]'; @@ -55,7 +55,7 @@ const parse = (str) => { algorithm: match[2], value: BufferFrom(match[3], 'base64'), options: match[4] === undefined ? null : match[4], - }) + }), }); prevIndex += match[0].length; } diff --git a/lib/internal/readline/utils.js b/lib/internal/readline/utils.js index 1758e17be16b84..a546516d76b66c 100644 --- a/lib/internal/readline/utils.js +++ b/lib/internal/readline/utils.js @@ -93,7 +93,7 @@ function* emitKeys(stream) { name: undefined, ctrl: false, meta: false, - shift: false + shift: false, }; if (ch === kEscape) { @@ -388,5 +388,5 @@ module.exports = { commonPrefix, emitKeys, kSubstringSearch, - CSI + CSI, }; diff --git a/lib/internal/test/transfer.js b/lib/internal/test/transfer.js index b814c37fe6dc6d..635f3033e76642 100644 --- a/lib/internal/test/transfer.js +++ b/lib/internal/test/transfer.js @@ -30,7 +30,7 @@ class F extends E { [kClone]() { return { data: { b: this.b }, - deserializeInfo: 'internal/test/transfer:F' + deserializeInfo: 'internal/test/transfer:F', }; } diff --git a/lib/internal/test_runner/harness.js b/lib/internal/test_runner/harness.js index b12678db32886f..db9668ae4d5708 100644 --- a/lib/internal/test_runner/harness.js +++ b/lib/internal/test_runner/harness.js @@ -125,7 +125,7 @@ function setup(root) { }, destroy(asyncId) { testResources.delete(asyncId); - } + }, }); hook.enable(); diff --git a/lib/internal/test_runner/yaml_to_js.js b/lib/internal/test_runner/yaml_to_js.js index 0642501c275989..3aa28f9bc2cbfb 100644 --- a/lib/internal/test_runner/yaml_to_js.js +++ b/lib/internal/test_runner/yaml_to_js.js @@ -2,7 +2,7 @@ const { codes: { ERR_TEST_FAILURE, - } + }, } = require('internal/errors'); const AssertionError = require('internal/assert/assertion_error'); const { @@ -37,7 +37,7 @@ function reConstructError(parsedYaml) { message: parsedYaml.error, actual: parsedYaml.actual, expected: parsedYaml.expected, - operator: parsedYaml.operator + operator: parsedYaml.operator, }); } else { // eslint-disable-next-line no-restricted-syntax diff --git a/lib/timers/promises.js b/lib/timers/promises.js index 4d23d15cc116fb..d224520f10694d 100644 --- a/lib/timers/promises.js +++ b/lib/timers/promises.js @@ -12,7 +12,7 @@ const { const { Timeout, Immediate, - insert + insert, } = require('internal/timers'); const { clearImmediate, @@ -26,7 +26,7 @@ const { ERR_ILLEGAL_CONSTRUCTOR, ERR_INVALID_ARG_TYPE, ERR_INVALID_THIS, - } + }, } = require('internal/errors'); const {