diff --git a/.eslintrc.js b/.eslintrc.js index b676485c5909ab..ccc991de8271d0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -68,7 +68,7 @@ module.exports = { files: ['**/*.md/*.cjs', '**/*.md/*.js'], parserOptions: { sourceType: 'script', - ecmaFeatures: { impliedStrict: true } + ecmaFeatures: { impliedStrict: true }, }, rules: { strict: 'off' }, }, @@ -103,11 +103,11 @@ module.exports = { }, { name: 'Buffer', - message: 'Import Buffer instead of using the global' + message: 'Import Buffer instead of using the global', }, { name: 'process', - message: 'Import process instead of using the global' + message: 'Import process instead of using the global', }, ] }, }, @@ -134,13 +134,7 @@ module.exports = { ignorePattern: '.*', }, }], - 'comma-dangle': ['error', { - arrays: 'always-multiline', - exports: 'only-multiline', - functions: 'only-multiline', - imports: 'only-multiline', - objects: 'only-multiline', - }], + 'comma-dangle': ['error', 'always-multiline'], 'comma-spacing': 'error', 'comma-style': 'error', 'computed-property-spacing': 'error', diff --git a/benchmark/.eslintrc.yaml b/benchmark/.eslintrc.yaml index aa014eec4e3627..821b2381d3e215 100644 --- a/benchmark/.eslintrc.yaml +++ b/benchmark/.eslintrc.yaml @@ -5,4 +5,11 @@ env: es6: true rules: + comma-dangle: [error, { + arrays: always-multiline, + exports: only-multiline, + functions: only-multiline, + imports: only-multiline, + objects: only-multiline, + }] prefer-arrow-callback: error diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml index 5703dc6f8584c5..e8d24adb6e00aa 100644 --- a/doc/.eslintrc.yaml +++ b/doc/.eslintrc.yaml @@ -15,4 +15,3 @@ rules: # Stylistic Issues no-multiple-empty-lines: [error, {max: 1, maxEOF: 0, maxBOF: 0}] - comma-dangle: [error, always-multiline] diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index f1c3b98de4edd7..c5e5a146ec4912 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -2,6 +2,13 @@ env: es6: true rules: + comma-dangle: [error, { + arrays: always-multiline, + exports: only-multiline, + functions: only-multiline, + imports: only-multiline, + objects: only-multiline, + }] prefer-object-spread: error no-buffer-constructor: error no-mixed-operators: diff --git a/tools/build-addons.mjs b/tools/build-addons.mjs index 9f757bd798bcf0..b0ec02d8e90cba 100755 --- a/tools/build-addons.mjs +++ b/tools/build-addons.mjs @@ -31,7 +31,7 @@ async function buildAddon(dir) { await execFile(process.execPath, [nodeGyp, 'rebuild', `--directory=${dir}`], { stdio: 'inherit', - env: { ...process.env, MAKEFLAGS: '-j1' } + env: { ...process.env, MAKEFLAGS: '-j1' }, }); // We buffer the output and print it out once the process is done in order diff --git a/tools/doc/addon-verify.mjs b/tools/doc/addon-verify.mjs index 8829f00884f79d..8760d0c206fea3 100644 --- a/tools/doc/addon-verify.mjs +++ b/tools/doc/addon-verify.mjs @@ -38,7 +38,7 @@ tree.children.forEach((node) => { await Promise.all( Object.keys(addons).flatMap( - (header) => verifyFiles(addons[header].files, header) + (header) => verifyFiles(addons[header].files, header), )); function verifyFiles(files, blockName) { @@ -82,8 +82,8 @@ ${files[name].replace( sources: files.map(({ name }) => name), includes: ['../common.gypi'], }, - ] - }) + ], + }), }); const dirCreation = mkdir(dir); diff --git a/tools/doc/allhtml.mjs b/tools/doc/allhtml.mjs index fb0b719ac8a8a9..cdf7140f728469 100644 --- a/tools/doc/allhtml.mjs +++ b/tools/doc/allhtml.mjs @@ -96,8 +96,8 @@ all = all.slice(0, apiStart.index + apiStart[0].length) '\n', buildCSSForFlavoredJS(new Set(Array.from( apicontent.matchAll(/(?<=
)/g),
-        (x) => Number(x[0])
-      ))) + '\n'
+        (x) => Number(x[0]),
+      ))) + '\n',
     ) +
   apicontent +
   all.slice(apiEnd);
diff --git a/tools/doc/alljson.mjs b/tools/doc/alljson.mjs
index 47b0d6a14dab33..a5ff7c7e9badaf 100644
--- a/tools/doc/alljson.mjs
+++ b/tools/doc/alljson.mjs
@@ -18,7 +18,7 @@ const results = {
   modules: [],
   classes: [],
   globals: [],
-  methods: []
+  methods: [],
 };
 
 // Identify files that should be skipped. As files are processed, they
@@ -33,7 +33,7 @@ for (const link of toc.match(//g)) {
   if (!jsonFiles.includes(json) || seen.has(json)) continue;
   const data = JSON.parse(
     fs.readFileSync(new URL(`./${json}`, source), 'utf8')
-      .replace(/ {
     assert.strictEqual(
       headingNode?.children[0]?.value.substring(0, 9),
       `${expectedDeprecationCode}: `,
-      'Ill-formed or out-of-order deprecation code.'
+      'Ill-formed or out-of-order deprecation code.',
     );
   } catch (e) {
     throw addMarkdownPathToErrorStack(e, headingNode);
@@ -39,7 +39,7 @@ const testYAMLComment = (commentNode) => {
     assert.match(
       commentNode?.value?.substring(0, 21),
       /^/sg, '');
   let text = current.textRaw;
diff --git a/tools/doc/markdown.mjs b/tools/doc/markdown.mjs
index 7c9ebfbf7471e4..21104e592b8a24 100644
--- a/tools/doc/markdown.mjs
+++ b/tools/doc/markdown.mjs
@@ -10,7 +10,7 @@ export function replaceLinks({ filename, linksMapper }) {
       if (node.url) {
         node.url = node.url.replace(
           referenceToLocalMdFile,
-          (_, filename, hash) => `${filename}.html${hash || ''}`
+          (_, filename, hash) => `${filename}.html${hash || ''}`,
         );
       }
     });
diff --git a/tools/doc/type-parser.mjs b/tools/doc/type-parser.mjs
index 64d499d182f484..02194e1e29128f 100644
--- a/tools/doc/type-parser.mjs
+++ b/tools/doc/type-parser.mjs
@@ -8,7 +8,7 @@ const jsPrimitives = {
   number: 'Number',
   string: 'String',
   symbol: 'Symbol',
-  undefined: 'Undefined'
+  undefined: 'Undefined',
 };
 
 const jsGlobalObjectsUrl = `${jsDocPrefix}Reference/Global_Objects/`;
@@ -301,7 +301,7 @@ export function toLink(typeInput) {
       } else {
         throw new Error(
           `Unrecognized type: '${typeTextFull}'.\n` +
-          `Please, edit the type or update '${import.meta.url}'.`
+          `Please, edit the type or update '${import.meta.url}'.`,
         );
       }
     } else {
diff --git a/tools/eslint-rules/alphabetize-errors.js b/tools/eslint-rules/alphabetize-errors.js
index b2dcacbb866816..8d25f7973d62a6 100644
--- a/tools/eslint-rules/alphabetize-errors.js
+++ b/tools/eslint-rules/alphabetize-errors.js
@@ -26,7 +26,7 @@ module.exports = {
           const message = [prefix, prev, opStr, curr].join('');
           context.report({ node, message });
         }
-      }
+      },
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/async-iife-no-unused-result.js b/tools/eslint-rules/async-iife-no-unused-result.js
index bb089de8832d88..901ebca9cd2252 100644
--- a/tools/eslint-rules/async-iife-no-unused-result.js
+++ b/tools/eslint-rules/async-iife-no-unused-result.js
@@ -13,7 +13,7 @@ const message =
 
 module.exports = {
   meta: {
-    fixable: 'code'
+    fixable: 'code',
   },
   create: function(context) {
     let hasCommonModule = false;
@@ -31,10 +31,10 @@ module.exports = {
             fix: (fixer) => {
               if (hasCommonModule)
                 return fixer.insertTextAfter(node, '.then(common.mustCall())');
-            }
+            },
           });
         }
-      }
+      },
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/avoid-prototype-pollution.js b/tools/eslint-rules/avoid-prototype-pollution.js
index fdc43c259d9a5b..9d842234abde09 100644
--- a/tools/eslint-rules/avoid-prototype-pollution.js
+++ b/tools/eslint-rules/avoid-prototype-pollution.js
@@ -80,7 +80,7 @@ function createUnsafeStringMethodReport(context, name, lookedUpProperty) {
         node,
         message: `${name} looks up the ${lookedUpProperty} property on the first argument`,
       });
-    }
+    },
   };
 }
 
@@ -98,7 +98,7 @@ function createUnsafeStringMethodOnRegexReport(context, name, lookedUpProperty)
         node,
         message: `${name} looks up the ${lookedUpProperty} property of the passed regex, use ${safePrimordialName} directly`,
       });
-    }
+    },
   };
 }
 
@@ -155,7 +155,7 @@ module.exports = {
                 fixer.replaceTextRange(testRange, 'Exec'),
                 fixer.insertTextAfter(node, ' !== null'),
               ];
-            }
+            },
           }],
         });
       },
diff --git a/tools/eslint-rules/crypto-check.js b/tools/eslint-rules/crypto-check.js
index 39d29bba6e0a3d..22271545faef98 100644
--- a/tools/eslint-rules/crypto-check.js
+++ b/tools/eslint-rules/crypto-check.js
@@ -78,7 +78,7 @@ module.exports = {
             if (beforeAllChecks) {
               context.report({
                 node: requireNode,
-                message: msg
+                message: msg,
               });
             }
           });
@@ -106,10 +106,10 @@ module.exports = {
                 commonModuleNode,
                 '\nif (!common.hasCrypto) {' +
                 ' common.skip("missing crypto");' +
-                '}'
+                '}',
               );
             }
-          }
+          },
         });
       });
     }
@@ -118,7 +118,7 @@ module.exports = {
       'CallExpression': (node) => testCryptoUsage(node),
       'IfStatement:exit': (node) => testIfStatement(node),
       'MemberExpression:exit': (node) => testMemberExpression(node),
-      'Program:exit': () => reportIfMissingCheck()
+      'Program:exit': () => reportIfMissingCheck(),
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/documented-errors.js b/tools/eslint-rules/documented-errors.js
index dad60367cd958a..17bd2221097085 100644
--- a/tools/eslint-rules/documented-errors.js
+++ b/tools/eslint-rules/documented-errors.js
@@ -34,7 +34,7 @@ module.exports = {
             `doc/api/errors.md does not have an anchor for "${code}"`;
           context.report({ node, message });
         }
-      }
+      },
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/eslint-check.js b/tools/eslint-rules/eslint-check.js
index df82257ccd1443..cedfa970743409 100644
--- a/tools/eslint-rules/eslint-check.js
+++ b/tools/eslint-rules/eslint-check.js
@@ -47,10 +47,10 @@ module.exports = {
               if (commonModuleNode) {
                 return fixer.insertTextAfter(
                   commonModuleNode,
-                  '\ncommon.skipIfEslintMissing();'
+                  '\ncommon.skipIfEslintMissing();',
                 );
               }
-            }
+            },
           });
         });
       }
@@ -59,7 +59,7 @@ module.exports = {
     return {
       'CallExpression': (node) => testEslintUsage(context, node),
       'MemberExpression': (node) => checkMemberExpression(context, node),
-      'Program:exit': () => reportIfMissing(context)
+      'Program:exit': () => reportIfMissing(context),
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/inspector-check.js b/tools/eslint-rules/inspector-check.js
index 4cc220e68b7ed1..f5c121c5bb95a4 100644
--- a/tools/eslint-rules/inspector-check.js
+++ b/tools/eslint-rules/inspector-check.js
@@ -48,10 +48,10 @@ module.exports = {
               if (commonModuleNode) {
                 return fixer.insertTextAfter(
                   commonModuleNode,
-                  '\ncommon.skipIfInspectorDisabled();'
+                  '\ncommon.skipIfInspectorDisabled();',
                 );
               }
-            }
+            },
           });
         });
       }
@@ -60,7 +60,7 @@ module.exports = {
     return {
       'CallExpression': (node) => testInspectorUsage(context, node),
       'MemberExpression': (node) => checkMemberExpression(context, node),
-      'Program:exit': () => reportIfMissing(context)
+      'Program:exit': () => reportIfMissing(context),
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/lowercase-name-for-primitive.js b/tools/eslint-rules/lowercase-name-for-primitive.js
index 274dcd1c9dce6e..6b096afa3ebb06 100644
--- a/tools/eslint-rules/lowercase-name-for-primitive.js
+++ b/tools/eslint-rules/lowercase-name-for-primitive.js
@@ -41,19 +41,19 @@ module.exports = function(context) {
         fix: (fixer) => {
           return fixer.replaceText(
             node,
-            `'${lowercaseName}'`
+            `'${lowercaseName}'`,
           );
-        }
+        },
       });
     }
 
   }
 
   return {
-    [astSelector]: (node) => checkNamesArgument(node)
+    [astSelector]: (node) => checkNamesArgument(node),
   };
 };
 
 module.exports.meta = {
-  fixable: 'code'
+  fixable: 'code',
 };
diff --git a/tools/eslint-rules/no-array-destructuring.js b/tools/eslint-rules/no-array-destructuring.js
index 81667e698fbaad..b65849aa95f925 100644
--- a/tools/eslint-rules/no-array-destructuring.js
+++ b/tools/eslint-rules/no-array-destructuring.js
@@ -30,7 +30,7 @@ const findComma = (sourceCode, elements, i, start) => {
     element = elements[--i];
   }
   let token = sourceCode.getTokenAfter(
-    element ?? sourceCode.getTokenByRangeStart(start)
+    element ?? sourceCode.getTokenByRangeStart(start),
   );
   for (; i < originalIndex; i++) {
     token = sourceCode.getTokenAfter(token);
@@ -43,7 +43,7 @@ const createFix = (fixer, sourceCode, { range: [start, end], elements }) => [
   ...elements.map((node, i) =>
     (node === null ?
       fixer.remove(findComma(sourceCode, elements, i, start)) :
-      fixer.insertTextBefore(node, i + ':'))
+      fixer.insertTextBefore(node, i + ':')),
   ),
 ];
 const arrayPatternContainsRestOperator = ({ elements }) =>
diff --git a/tools/eslint-rules/no-duplicate-requires.js b/tools/eslint-rules/no-duplicate-requires.js
index 6e149edceb8d6e..222e61898e5a82 100644
--- a/tools/eslint-rules/no-duplicate-requires.js
+++ b/tools/eslint-rules/no-duplicate-requires.js
@@ -52,7 +52,7 @@ module.exports = (context) => {
           context.report(
             node,
             '\'{{moduleName}}\' require is duplicated.',
-            { moduleName }
+            { moduleName },
           );
         } else {
           required.add(moduleName);
diff --git a/tools/eslint-rules/no-unescaped-regexp-dot.js b/tools/eslint-rules/no-unescaped-regexp-dot.js
index 554eb9bdfb6b3d..07100c20782605 100644
--- a/tools/eslint-rules/no-unescaped-regexp-dot.js
+++ b/tools/eslint-rules/no-unescaped-regexp-dot.js
@@ -20,7 +20,7 @@ module.exports = {
       context.report({
         node,
         loc: sourceCode.getLocFromIndex(indexOfDot),
-        message: 'Unescaped dot character in regular expression'
+        message: 'Unescaped dot character in regular expression',
       });
     }
     const allowedModifiers = ['+', '*', '?', '{'];
@@ -127,7 +127,7 @@ module.exports = {
       'CallExpression': checkRegExpStart,
       'NewExpression': checkRegExpStart,
       'CallExpression:exit': checkRegExpEnd,
-      'NewExpression:exit': checkRegExpEnd
+      'NewExpression:exit': checkRegExpEnd,
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/non-ascii-character.js b/tools/eslint-rules/non-ascii-character.js
index f9ee24273fdcb6..1d401671d6cb84 100644
--- a/tools/eslint-rules/non-ascii-character.js
+++ b/tools/eslint-rules/non-ascii-character.js
@@ -21,7 +21,7 @@ const suggestions = {
   '”': '"',
   '«': '"',
   '»': '"',
-  '—': '-'
+  '—': '-',
 };
 
 module.exports = (context) => {
@@ -50,6 +50,6 @@ module.exports = (context) => {
   };
 
   return {
-    Program: (node) => reportIfError(node, context.getSourceCode())
+    Program: (node) => reportIfError(node, context.getSourceCode()),
   };
 };
diff --git a/tools/eslint-rules/prefer-assert-iferror.js b/tools/eslint-rules/prefer-assert-iferror.js
index 63430d70af93e4..25f881fc0c0cdf 100644
--- a/tools/eslint-rules/prefer-assert-iferror.js
+++ b/tools/eslint-rules/prefer-assert-iferror.js
@@ -9,7 +9,7 @@ const utils = require('./rules-utils.js');
 
 module.exports = {
   meta: {
-    fixable: 'code'
+    fixable: 'code',
   },
   create(context) {
     const sourceCode = context.getSourceCode();
@@ -52,13 +52,13 @@ module.exports = {
               if (assertImported) {
                 return fixer.replaceText(
                   node,
-                  `assert.ifError(${argument});`
+                  `assert.ifError(${argument});`,
                 );
               }
-            }
+            },
           });
         }
-      }
+      },
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/prefer-assert-methods.js b/tools/eslint-rules/prefer-assert-methods.js
index 0b82e9984a0693..d279cf47c56d8e 100644
--- a/tools/eslint-rules/prefer-assert-methods.js
+++ b/tools/eslint-rules/prefer-assert-methods.js
@@ -16,7 +16,7 @@ const preferredAssertMethod = {
   '===': 'strictEqual',
   '!==': 'notStrictEqual',
   '==': 'equal',
-  '!=': 'notEqual'
+  '!=': 'notEqual',
 };
 
 module.exports = function(context) {
@@ -34,15 +34,15 @@ module.exports = function(context) {
             const right = sourceCode.getText(arg.right);
             return fixer.replaceText(
               node,
-              `assert.${assertMethod}(${left}, ${right});`
+              `assert.${assertMethod}(${left}, ${right});`,
             );
-          }
+          },
         });
       }
-    }
+    },
   };
 };
 
 module.exports.meta = {
-  fixable: 'code'
+  fixable: 'code',
 };
diff --git a/tools/eslint-rules/prefer-common-mustnotcall.js b/tools/eslint-rules/prefer-common-mustnotcall.js
index ef3c5fb729f31f..2b04806d6a01e9 100644
--- a/tools/eslint-rules/prefer-common-mustnotcall.js
+++ b/tools/eslint-rules/prefer-common-mustnotcall.js
@@ -25,6 +25,6 @@ module.exports = function(context) {
     [arg0Selector]: report,
 
     // Catch common.mustCall(fn, 0)
-    [arg1Selector]: report
+    [arg1Selector]: report,
   };
 };
diff --git a/tools/eslint-rules/prefer-common-mustsucceed.js b/tools/eslint-rules/prefer-common-mustsucceed.js
index 433e8c7610f253..49795f2559fb19 100644
--- a/tools/eslint-rules/prefer-common-mustsucceed.js
+++ b/tools/eslint-rules/prefer-common-mustsucceed.js
@@ -61,6 +61,6 @@ module.exports = (context) => {
           }
         }
       }
-    }
+    },
   };
 };
diff --git a/tools/eslint-rules/prefer-primordials.js b/tools/eslint-rules/prefer-primordials.js
index d2531556de225d..9afdfa41c00ac9 100644
--- a/tools/eslint-rules/prefer-primordials.js
+++ b/tools/eslint-rules/prefer-primordials.js
@@ -73,8 +73,8 @@ const identifierSelector = parentSelectors.map((selector) => `[type!=${selector}
 module.exports = {
   meta: {
     messages: {
-      error: 'Use `const { {{name}} } = primordials;` instead of the global.'
-    }
+      error: 'Use `const { {{name}} } = primordials;` instead of the global.',
+    },
   },
   create(context) {
     const globalScope = context.getSourceCode().scopeManager.globalScope;
@@ -86,7 +86,7 @@ module.exports = {
       const names = option.ignore || [];
       nameMap.set(
         option.name,
-        new Map(names.map((name) => [name, { ignored: true }]))
+        new Map(names.map((name) => [name, { ignored: true }])),
       );
       if (option.into) {
         renameMap.set(option.name, option.into);
@@ -111,7 +111,7 @@ module.exports = {
         const name = node.name;
         const parent = getDestructuringAssignmentParent(
           context.getScope(),
-          node
+          node,
         );
         const parentName = parent?.name;
         if (!isTarget(nameMap, name) && !isTarget(nameMap, parentName)) {
@@ -129,8 +129,8 @@ module.exports = {
               node,
               messageId: 'error',
               data: {
-                name: getReportName({ into, parentName, name })
-              }
+                name: getReportName({ into, parentName, name }),
+              },
             });
           }
           return;
@@ -142,8 +142,8 @@ module.exports = {
             node,
             messageId: 'error',
             data: {
-              name: getReportName({ into, parentName, name })
-            }
+              name: getReportName({ into, parentName, name }),
+            },
           });
         }
       },
@@ -162,7 +162,7 @@ module.exports = {
             messageId: 'error',
             data: {
               name: toPrimordialsName(obj, prop),
-            }
+            },
           });
         }
       },
@@ -180,5 +180,5 @@ module.exports = {
         }
       },
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/prefer-util-format-errors.js b/tools/eslint-rules/prefer-util-format-errors.js
index 407b6e20dd23ea..91021dc4c7272d 100644
--- a/tools/eslint-rules/prefer-util-format-errors.js
+++ b/tools/eslint-rules/prefer-util-format-errors.js
@@ -33,7 +33,7 @@ module.exports = {
         });
         if (hasSequentialParams)
           context.report(msg, errMsg);
-      }
+      },
     };
-  }
+  },
 };
diff --git a/tools/eslint-rules/require-common-first.js b/tools/eslint-rules/require-common-first.js
index 15a696586cbac7..d09313a5074e9c 100644
--- a/tools/eslint-rules/require-common-first.js
+++ b/tools/eslint-rules/require-common-first.js
@@ -52,10 +52,10 @@ module.exports = function(context) {
           node,
           'Mandatory module "{{moduleName}}" must be loaded ' +
           'before any other modules.',
-          { moduleName: requiredModule }
+          { moduleName: requiredModule },
         );
       }
-    }
+    },
   };
 
   if (isESM) {
diff --git a/tools/eslint-rules/required-modules.js b/tools/eslint-rules/required-modules.js
index 93a5cb340edab2..879a39630dc9e3 100644
--- a/tools/eslint-rules/required-modules.js
+++ b/tools/eslint-rules/required-modules.js
@@ -56,17 +56,17 @@ module.exports = function(context) {
     'Program:exit'(node) {
       if (foundModules.length < requiredModules.length) {
         const missingModules = requiredModules.filter(
-          ([module]) => foundModules.indexOf(module) === -1
+          ([module]) => foundModules.indexOf(module) === -1,
         );
         missingModules.forEach(([moduleName]) => {
           context.report(
             node,
             'Mandatory module "{{moduleName}}" must be loaded.',
-            { moduleName: moduleName }
+            { moduleName: moduleName },
           );
         });
       }
-    }
+    },
   };
 
   if (isESM) {
@@ -95,7 +95,7 @@ module.exports.meta = {
   schema: [{
     'type': 'object',
     'additionalProperties': {
-      'type': 'string'
+      'type': 'string',
     },
   }],
 };
diff --git a/tools/find-inactive-collaborators.mjs b/tools/find-inactive-collaborators.mjs
index f6062b046391fa..1b9637f5ef2cd5 100755
--- a/tools/find-inactive-collaborators.mjs
+++ b/tools/find-inactive-collaborators.mjs
@@ -11,7 +11,7 @@ import { parseArgs } from 'node:util';
 
 const args = parseArgs({
   allowPositionals: true,
-  options: { verbose: { type: 'boolean', short: 'v' } }
+  options: { verbose: { type: 'boolean', short: 'v' } },
 });
 
 const verbose = args.values.verbose;
@@ -27,7 +27,7 @@ async function runGitCommand(cmd, mapFn) {
     input: childProcess.stdout,
   });
   const errorHandler = new Promise(
-    (_, reject) => childProcess.on('error', reject)
+    (_, reject) => childProcess.on('error', reject),
   );
   let returnValue = mapFn ? new Set() : '';
   await Promise.race([errorHandler, Promise.resolve()]);
@@ -50,13 +50,13 @@ async function runGitCommand(cmd, mapFn) {
 // Get all commit authors during the time period.
 const authors = await runGitCommand(
   `git shortlog -n -s --email --since="${SINCE}" HEAD`,
-  (line) => line.trim().split('\t', 2)[1]
+  (line) => line.trim().split('\t', 2)[1],
 );
 
 // Get all approving reviewers of landed commits during the time period.
 const approvingReviewers = await runGitCommand(
   `git log --since="${SINCE}" | egrep "^    Reviewed-By: "`,
-  (line) => /^ {4}Reviewed-By: ([^<]+)/.exec(line)[1].trim()
+  (line) => /^ {4}Reviewed-By: ([^<]+)/.exec(line)[1].trim(),
 );
 
 async function getCollaboratorsFromReadme() {
@@ -81,7 +81,7 @@ async function getCollaboratorsFromReadme() {
     if (line.startsWith('  **') && isCollaborator) {
       const [, name, email] = /^ {2}\*\*([^*]+)\*\* <<(.+)>>/.exec(line);
       const mailmap = await runGitCommand(
-        `git check-mailmap '${name} <${email}>'`
+        `git check-mailmap '${name} <${email}>'`,
       );
       if (mailmap !== `${name} <${email}>`) {
         console.log(`README entry for Collaborator does not match mailmap:\n  ${name} <${email}> => ${mailmap}`);
@@ -191,7 +191,7 @@ if (verbose) {
 }
 const inactive = collaborators.filter((collaborator) =>
   !authors.has(collaborator.mailmap) &&
-  !approvingReviewers.has(collaborator.name)
+  !approvingReviewers.has(collaborator.name),
 );
 
 if (inactive.length) {
diff --git a/tools/find-inactive-tsc.mjs b/tools/find-inactive-tsc.mjs
index 5fc31bc745dc80..2d4b71ad5b7430 100755
--- a/tools/find-inactive-tsc.mjs
+++ b/tools/find-inactive-tsc.mjs
@@ -16,7 +16,7 @@ import { parseArgs } from 'node:util';
 
 const args = parseArgs({
   allowPositionals: true,
-  options: { verbose: { type: 'boolean', short: 'v' } }
+  options: { verbose: { type: 'boolean', short: 'v' } },
 });
 
 const verbose = args.values.verbose;
@@ -32,7 +32,7 @@ async function runGitCommand(cmd, options = {}) {
     input: childProcess.stdout,
   });
   const errorHandler = new Promise(
-    (_, reject) => childProcess.on('error', reject)
+    (_, reject) => childProcess.on('error', reject),
   );
   let returnValue = options.mapFn ? new Set() : '';
   await Promise.race([errorHandler, Promise.resolve()]);
@@ -122,7 +122,7 @@ async function getVotingRecords(tscMembers, votes) {
   for (const vote of votes) {
     // Get the vote data.
     const voteData = JSON.parse(
-      await fs.promises.readFile(path.join('.tmp', vote), 'utf8')
+      await fs.promises.readFile(path.join('.tmp', vote), 'utf8'),
     );
     for (const member in voteData.votes) {
       if (tscMembers.includes(member)) {
@@ -227,33 +227,33 @@ await runGitCommand('git reset HEAD README.md');
 await runGitCommand('git checkout -- README.md');
 
 const tscMembers = tscMembersAtEnd.filter(
-  (memberAtEnd) => tscMembersAtStart.includes(memberAtEnd)
+  (memberAtEnd) => tscMembersAtStart.includes(memberAtEnd),
 );
 
 // Get all meetings since SINCE.
 // Assumes that the TSC repo is cloned in the .tmp dir.
 const meetings = await runGitCommand(
   `git whatchanged --since '${SINCE}' --name-only --pretty=format: meetings`,
-  { cwd: '.tmp', mapFn: (line) => line }
+  { cwd: '.tmp', mapFn: (line) => line },
 );
 
 // Get TSC meeting attendance.
 const attendance = await getAttendance(tscMembers, meetings);
 const lightAttendance = tscMembers.filter(
-  (member) => attendance[member] < meetings.size * 0.25
+  (member) => attendance[member] < meetings.size * 0.25,
 );
 
 // Get all votes since SINCE.
 // Assumes that the TSC repo is cloned in the .tmp dir.
 const votes = await runGitCommand(
   `git whatchanged --since '${SINCE}' --name-only --pretty=format: votes/*.json`,
-  { cwd: '.tmp', mapFn: (line) => line }
+  { cwd: '.tmp', mapFn: (line) => line },
 );
 
 // Check voting record.
 const votingRecords = await getVotingRecords(tscMembers, votes);
 const noVotes = tscMembers.filter(
-  (member) => votingRecords[member] === 0
+  (member) => votingRecords[member] === 0,
 );
 
 const inactive = lightAttendance.filter((member) => noVotes.includes(member));
diff --git a/tools/license2rtf.mjs b/tools/license2rtf.mjs
index d982e679c3e653..47a55d0d3dd9bd 100644
--- a/tools/license2rtf.mjs
+++ b/tools/license2rtf.mjs
@@ -63,7 +63,7 @@ class ParagraphParser extends Stream {
     this.paragraph = {
       li: '',
       inLicenseBlock: this.blockIsLicenseBlock,
-      lines: []
+      lines: [],
     };
   }
 
diff --git a/tools/lint-md/list-released-versions-from-changelogs.mjs b/tools/lint-md/list-released-versions-from-changelogs.mjs
index 81b7d17197e7f9..39835136c31219 100755
--- a/tools/lint-md/list-released-versions-from-changelogs.mjs
+++ b/tools/lint-md/list-released-versions-from-changelogs.mjs
@@ -32,7 +32,7 @@ const dir = await fs.promises.opendir(dataFolder);
 for await (const dirent of dir) {
   if (dirent.isFile()) {
     filesToCheck.push(
-      getVersionsFromFile(new URL(dirent.name, dataFolder))
+      getVersionsFromFile(new URL(dirent.name, dataFolder)),
     );
   }
 }
diff --git a/tools/lint-pr-url.mjs b/tools/lint-pr-url.mjs
index c32473ccb89d84..1b0ada0508a7cf 100755
--- a/tools/lint-pr-url.mjs
+++ b/tools/lint-pr-url.mjs
@@ -28,7 +28,7 @@ for await (const line of diff) {
   } else if (!validatePrUrl(line.match(prUrlDefinition)?.[1])) {
     console.warn(
       `::warning file=${currentFile},line=${currentLine++},col=${line.length}` +
-      '::pr-url doesn\'t match the URL of the current PR.'
+      '::pr-url doesn\'t match the URL of the current PR.',
     );
   } else if (line[0] !== '-') {
     // Increment line counter if line is not being deleted.
diff --git a/tools/lint-sh.mjs b/tools/lint-sh.mjs
index 681c7cd5665dce..3c6815815ebcf1 100755
--- a/tools/lint-sh.mjs
+++ b/tools/lint-sh.mjs
@@ -77,12 +77,12 @@ async function checkFiles(...files) {
             (process.env.GITHUB_ACTIONS ?
               `::error file=${file},line=1,col=1::` :
               'Fixable with --fix: ') +
-              `Invalid hashbang for ${file} (expected /bin/sh).`
+              `Invalid hashbang for ${file} (expected /bin/sh).`,
           );
         }
       }
       await fd.close();
-    })
+    }),
   );
 
   const stdout = await new Promise((resolve, reject) => {
@@ -102,7 +102,7 @@ async function checkFiles(...files) {
           files.map((filePath) => relative(SPAWN_OPTIONS.cwd, filePath)) :
           files),
       ],
-      SPAWN_OPTIONS
+      SPAWN_OPTIONS,
     );
     shellcheck.once('error', reject);
 
@@ -138,7 +138,7 @@ async function checkFiles(...files) {
     const data = JSON.parse(stdout);
     for (const { file, line, column, message } of data) {
       console.error(
-        `::error file=${file},line=${line},col=${column}::${file}:${line}:${column}: ${message}`
+        `::error file=${file},line=${line},col=${column}::${file}:${line}:${column}: ${message}`,
       );
     }
   }
diff --git a/tools/update-authors.mjs b/tools/update-authors.mjs
index 7dfae178e33eff..b0b001d2fbdbe4 100755
--- a/tools/update-authors.mjs
+++ b/tools/update-authors.mjs
@@ -17,7 +17,7 @@ const log = spawn(
   'git',
   // Inspect author name/email and body.
   ['log', '--reverse', '--format=Author: %aN <%aE>\n%b'], {
-    stdio: ['inherit', 'pipe', 'inherit']
+    stdio: ['inherit', 'pipe', 'inherit'],
   });
 const rl = readline.createInterface({ input: log.stdout });