From 30ed7b4b0c5d1aa0780c90ab188a0e4b8759ef25 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Tue, 29 Aug 2023 20:09:21 +0100 Subject: [PATCH] Reformat TODO code comments [nocode] --- lib/init/eval.js | 2 +- lib/init/globals.js | 2 +- lib/init/weak.js | 4 ++-- lib/instrument/modify.js | 6 +++--- lib/instrument/visitors/class.js | 14 +++++++------- lib/instrument/visitors/eval.js | 2 +- lib/instrument/visitors/function.js | 2 +- lib/instrument/visitors/loop.js | 10 +++++----- lib/instrument/visitors/statement.js | 2 +- lib/instrument/visitors/super.js | 2 +- lib/serialize/arguments.js | 2 +- lib/serialize/blocks.js | 6 +++--- lib/serialize/functions.js | 12 ++++++------ lib/serialize/output.js | 4 ++-- lib/serialize/parseFunction.js | 2 +- lib/serialize/utils.js | 2 +- lib/shared/constants.js | 2 +- test/eval.test.js | 4 ++-- test/functions.test.js | 14 +++++++------- test/options.test.js | 2 +- test/strict.test.js | 2 +- 21 files changed, 49 insertions(+), 49 deletions(-) diff --git a/lib/init/eval.js b/lib/init/eval.js index 43a79380..01ec170c 100644 --- a/lib/init/eval.js +++ b/lib/init/eval.js @@ -115,7 +115,7 @@ function evalDirect(args, tracker, filename, evalDirectLocal) { } else if (varName === 'new.target') { createNewTargetBinding(block); } else { - // TODO Also need to set `superIsProto` and create a new temp var for `super` target + // TODO: Also need to set `superIsProto` and create a new temp var for `super` target // (the external var could be shadowed inside `eval()` if prefix num is changing) if (varName === 'super') state.currentSuperBlock = block; diff --git a/lib/init/globals.js b/lib/init/globals.js index 8cca2fa0..daa12afe 100644 --- a/lib/init/globals.js +++ b/lib/init/globals.js @@ -276,7 +276,7 @@ function addToQueue(val, type, parent, key, noPreload, queue) { /* // For debugging -// TODO Remove this +// TODO: Remove this function trace(val, globals) { const record = globals.get(val); if (!record) return ''; diff --git a/lib/init/weak.js b/lib/init/weak.js index e9413108..8677f85a 100644 --- a/lib/init/weak.js +++ b/lib/init/weak.js @@ -28,7 +28,7 @@ function getWeakSets() { // Could make `refs`, `mapping` and `finalizationRegistry` private class fields, and that would likely // be more performant. However, don't want to do that now as intent is that Livepack can build itself, // and currently Livepack can't serialize private fields. - // TODO Switch to private fields once Livepack can serialize them. + // TODO: Switch to private fields once Livepack can serialize them. WeakSet = class WeakSet { // eslint-disable-line no-global-assign constructor(...iterables) { const refs = new Set(); @@ -100,7 +100,7 @@ function getWeakMaps() { // Could make `refs`, `mapping` and `finalizationRegistry` private class fields, and that would likely // be more performant. However, don't want to do that now as intent is that Livepack can build itself, // and currently Livepack can't serialize private fields. - // TODO Switch to private fields once Livepack can serialize them. + // TODO: Switch to private fields once Livepack can serialize them. const WeakMapOriginal = WeakMap; WeakMap = class WeakMap { // eslint-disable-line no-global-assign constructor(...iterables) { diff --git a/lib/instrument/modify.js b/lib/instrument/modify.js index ce8823fb..99bec405 100644 --- a/lib/instrument/modify.js +++ b/lib/instrument/modify.js @@ -104,7 +104,7 @@ function modifyAst(ast, filename, isCommonJs, isStrict, sources, evalState) { // Create program block const programBlock = createAndEnterBlock(blockName, true, state); state.programBlock = programBlock; - // TODO If code is a script or in indirect `(0, eval)(...)`, + // TODO: If code is a script or in indirect `(0, eval)(...)`, // `var` declarations and function declarations (including async functions + generator functions) // create globals, not local bindings. // In direct `eval()` they create bindings in hoist block external to the `eval()`. @@ -129,7 +129,7 @@ function modifyAst(ast, filename, isCommonJs, isStrict, sources, evalState) { // NB Only remaining possibility is direct `eval()` code, where `this` is already defined // in parent blocks from the outer context. // Create binding for `this` (which will be `undefined` in ESM, or `globalThis` in script context). - // TODO Uncomment next line. + // TODO: Uncomment next line. // It is correct, but producing excessively verbose output where indirect eval is used. // Need to remove references to `globalThis` where in output the code is run inside `(0, eval)()` // anyway, so `this` is already `globalThis` and unnecessary to inject it. @@ -139,7 +139,7 @@ function modifyAst(ast, filename, isCommonJs, isStrict, sources, evalState) { state.currentThisBlock = fileBlock; } else if (!state.currentThisBlock) { // Code from direct `eval()` which doesn't provide a `this` binding. - // TODO This can be removed once `createThisBinding(fileBlock)` above is uncommented, + // TODO: This can be removed once `createThisBinding(fileBlock)` above is uncommented, // as then `state.currentThisBlock` will always be defined already in parent scope. state.currentThisBlock = fileBlock; } diff --git a/lib/instrument/visitors/class.js b/lib/instrument/visitors/class.js index 46c85e62..283ac05e 100644 --- a/lib/instrument/visitors/class.js +++ b/lib/instrument/visitors/class.js @@ -142,7 +142,7 @@ function visitClass(classNode, parent, key, className, state) { methodIndexes.push(index); } } else if (type === 'ClassPrivateMethod') { - // TODO Will be missed out when serializing. + // TODO: Will be missed out when serializing. // Flag the class that it has private methods so serialization can throw error? methodIndexes.push(index); } else if (type === 'ClassProperty') { @@ -153,7 +153,7 @@ function visitClass(classNode, parent, key, className, state) { protoPropertyIndexes.push(index); } } else if (type === 'ClassPrivateProperty') { - // TODO Will be missed out when serializing. + // TODO: Will be missed out when serializing. // Flag the class that it has private properties so serialization can throw error? if (memberNode.static) { staticPropertyOrBlockIndexes.push(index); @@ -196,7 +196,7 @@ function visitClass(classNode, parent, key, className, state) { // Visit prototype properties if (protoPropertyIndexes.length !== 0) { // Create and enter block for `this` in the context of prototype properties - // TODO This should be a vars block and all prototype methods should be wrapped + // TODO: This should be a vars block and all prototype methods should be wrapped // in closures. See https://github.com/overlookmotel/livepack/issues/305 state.currentBlock = superBlock; protoThisBlock = createAndEnterBlock(className, false, state); @@ -248,7 +248,7 @@ function visitClass(classNode, parent, key, className, state) { state.currentSuperIsProto = parentSuperIsProto; // Visit computed keys - // TODO Pass values of computed prototype property keys to serializer so it can recreate them + // TODO: Pass values of computed prototype property keys to serializer so it can recreate them if (computedKeys.length !== 0) { state.currentBlock = nameBlock || parentBlock; for (const {memberNode, index} of computedKeys) { @@ -454,7 +454,7 @@ function instrumentClass( const commentHolderNode = classNode.id || classNode.superClass || classNode.body; insertTrackerComment(fn.id, FN_TYPE_CLASS, commentHolderNode, 'leading', state); - // TODO Handle prototype properties + // TODO: Handle prototype properties } /** @@ -591,7 +591,7 @@ function wrapAnonymousClassExpression(classNode, parent, key, superBlock, state) // `+ ''` is added in case `.toString()` method has side effects, // so need to prevent it being called multiple times too. // `{ [f()]: class {} }` -> `{ [temp_2 = fn() + '']: temp_1 = { [temp_2]: class {} }[temp_2] }` - // TODO Conversion to string won't work for Symbols. + // TODO: Conversion to string won't work for Symbols. // Needs to be `{ [temp_2 = livepack_getKey(fn())]: temp_1 = { [temp_2]: class {} }[temp_2] }` // where `livepack_getKey` is defined as: // `k => (typeof k === 'symbol' || require('util').types.isSymbolObject(k)) ? k : k + '';` @@ -617,7 +617,7 @@ function wrapAnonymousClassExpression(classNode, parent, key, superBlock, state) // NB Unlike object properties, computed key in class property does not name class. // `(class { static ['x'] = class {} } ).x.name === ''` // and `new (class { ['x'] = class {} })().x.name === ''` - // TODO Add tests for this. + // TODO: Add tests for this. const keyNode = parent.key; return wrapInNamingObject(classNode, keyNode, false, keyNode.type !== 'Identifier'); } diff --git a/lib/instrument/visitors/eval.js b/lib/instrument/visitors/eval.js index c9b6cf4f..76613198 100644 --- a/lib/instrument/visitors/eval.js +++ b/lib/instrument/visitors/eval.js @@ -253,7 +253,7 @@ function activateSuperIfIsUsable(fn, state) { setSuperIsProtoOnFunctions(superBlock, fn, state); } - // TODO Also need to pass `superIsProto` and `superVarNode` to `evalDirect()` + // TODO: Also need to pass `superIsProto` and `superVarNode` to `evalDirect()` // for it to set inside `eval()` activateSuperBinding(superBlock, state); return true; diff --git a/lib/instrument/visitors/function.js b/lib/instrument/visitors/function.js index 48003b50..67fcb644 100644 --- a/lib/instrument/visitors/function.js +++ b/lib/instrument/visitors/function.js @@ -75,7 +75,7 @@ function FunctionDeclaration(node, state, parent, key) { const fn = visitFunction(node, parent, key, fnName, true, true, state); // Create binding for function name - // TODO Whether the value of the function is hoisted depends on whether is a top level statement + // TODO: Whether the value of the function is hoisted depends on whether is a top level statement // (including in a labeled statement) // `() => { console.log(typeof x); function x() {} }` -> Logs 'function' // `() => { console.log(typeof x); q: function x() {} }` -> Logs 'function' diff --git a/lib/instrument/visitors/loop.js b/lib/instrument/visitors/loop.js index 6e92956a..90a1b028 100644 --- a/lib/instrument/visitors/loop.js +++ b/lib/instrument/visitors/loop.js @@ -38,8 +38,8 @@ function ForStatement(node, state) { // Create blocks for init clause and body. // NB Init block is required even if no `const` / `let` declaration, // if initializer contains a class/object expression with method using `super`. - // TODO Add scope ID var and temp vars to init `const` / `let` initializer, rather than in block - // TODO Actually it's more complicated than this: + // TODO: Add scope ID var and temp vars to init `const` / `let` initializer, rather than in block + // TODO: Actually it's more complicated than this: // e.g. `for (let i = 0, getI = () => i; i < 3; i++) {}` // Initial vars declaration is only evaluated once, and `getI()` returns `0` in every turn of the loop, // whereas `i` evaluates to a different value of `i` in each turn of loop. @@ -80,7 +80,7 @@ function ForInitializer(node, state, parent) { * @returns {undefined} */ function ForXStatement(node, state) { - // TODO Move init clause into body if contains functions which reference init vars + // TODO: Move init clause into body if contains functions which reference init vars // e.g. `for ( const [ x, getX = () => x ] of [ [1], [2] ] ) { ... }` // Create blocks. @@ -140,7 +140,7 @@ function ForXInitializer(node, state, parent) { function WhileStatement(node, state) { // Init block is required to hold scope ID and temp vars if test clause contains // a class/object expression with method using `super` - // TODO Convert to a `for (...; ...; ...)` loop if init block is used for `super` temp vars + // TODO: Convert to a `for (...; ...; ...)` loop if init block is used for `super` temp vars const initBlock = createAndEnterBlock('while', false, state); const bodyBlock = createBlock('while', true, state); initBlock.varsBlock = bodyBlock; @@ -161,7 +161,7 @@ function WhileStatement(node, state) { function DoWhileStatement(node, state) { // Init block is required to hold scope ID and temp vars if test clause contains // a class/object expression with method using `super` - // TODO Convert to a `for (...; ...; ...)` loop if init block is used for `super` temp vars + // TODO: Convert to a `for (...; ...; ...)` loop if init block is used for `super` temp vars const initBlock = createAndEnterBlock('doWhile', false, state); const bodyBlock = createAndEnterBlock('doWhile', true, state); initBlock.varsBlock = bodyBlock; diff --git a/lib/instrument/visitors/statement.js b/lib/instrument/visitors/statement.js index e7f0e3b0..1122f4d4 100644 --- a/lib/instrument/visitors/statement.js +++ b/lib/instrument/visitors/statement.js @@ -72,7 +72,7 @@ function ReturnStatement(node, state) { } function WithStatement(node, state) { - // TODO Maintain a state property `currentWithBlock` which can be used in `resolveBinding()` + // TODO: Maintain a state property `currentWithBlock` which can be used in `resolveBinding()` // to flag functions which access a var which would be affected by `with` visitKey(node, 'object', Expression, state); visitKey(node, 'body', Statement, state); diff --git a/lib/instrument/visitors/super.js b/lib/instrument/visitors/super.js index e4340f41..260ee71d 100644 --- a/lib/instrument/visitors/super.js +++ b/lib/instrument/visitors/super.js @@ -49,7 +49,7 @@ function Super(node, state, parent, key) { // `super()` call. // We must be inside class constructor as `super()` is illegal anywhere else, // however could be inside an arrow function nested within the constructor. - // TODO Handle `super()` in class constructor params + // TODO: Handle `super()` in class constructor params const {trail} = state, // `trail[3] === 'body'` ensures `super()` is not in constructor's params isTopLevelStatement = !isInArrowFunction && trail.length === 8 && trail[3] === 'body'; diff --git a/lib/serialize/arguments.js b/lib/serialize/arguments.js index e31de226..e9454a5b 100644 --- a/lib/serialize/arguments.js +++ b/lib/serialize/arguments.js @@ -67,6 +67,6 @@ module.exports = function serializeArguments(args, record) { }; function argumentsShouldSkipKey(key) { - // TODO Would be better to include `Symbol.iterator` in default props + // TODO: Would be better to include `Symbol.iterator` in default props return key === 'callee' || key === Symbol.iterator; } diff --git a/lib/serialize/blocks.js b/lib/serialize/blocks.js index f765eb5c..98c5be1a 100644 --- a/lib/serialize/blocks.js +++ b/lib/serialize/blocks.js @@ -713,14 +713,14 @@ module.exports = { // If uses frozen `this` or `arguments`, wrap return value in an IIFE // to inject these values as actual `this` / `arguments`. // `() => eval(x)` -> `(function() { return () => eval(x); }).apply(this$0, arguments$0)` - // TODO In sloppy mode, it's possible for `arguments` to be re-defined as a non-iterable object + // TODO: In sloppy mode, it's possible for `arguments` to be re-defined as a non-iterable object // which would cause an error when this function is called. // A better solution when outputting sloppy mode code would be to just use a var called `arguments`, // rather than injecting. Of course this isn't possible in ESM. - // TODO Ensure scope function using `this` is strict mode if value of `this` is not an object. + // TODO: Ensure scope function using `this` is strict mode if value of `this` is not an object. // In sloppy mode literals passed as `this` gets boxed. // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#securing_javascript - // TODO Also doesn't work where `this` or `arguments` is circular and is injected late. + // TODO: Also doesn't work where `this` or `arguments` is circular and is injected late. if (frozenThisVarName || frozenArgumentsVarName) { const callArgsNodes = []; let functionNode; diff --git a/lib/serialize/functions.js b/lib/serialize/functions.js index 8c1fa783..36b92e57 100644 --- a/lib/serialize/functions.js +++ b/lib/serialize/functions.js @@ -141,7 +141,7 @@ module.exports = { // In sloppy mode, `arguments` and the argument vars themselves are linked. // e.g. `function f(x) { arguments[0] = 1; return () => x; }` sets `x` to `1`. // Therefore any use of `arguments` makes all the vars in that function's arguments mutable. - // TODO Skip this if `arguments` is strict mode. + // TODO: Skip this if `arguments` is strict mode. // NB Whether `arguments` is sloppy mode depends on whether function which *originates* // `arguments` is strict mode, not on whether function in which `arguments[0] =` // appears is strict mode. @@ -202,7 +202,7 @@ module.exports = { // `undefined` is ignored as it's a special case - may be omitted from `createScope()` call. if (val !== undefined) createDependency(scopeRecord, valRecord, undefined, undefined); } else if (!scopeValue.isCircular && recordIsCircular(valRecord)) { - // TODO I think this should be executed even if first check for existence of + // TODO: I think this should be executed even if first check for existence of // `scopeValues[varName]` fails scopeValue.isCircular = true; } @@ -472,7 +472,7 @@ module.exports = { const fnVarName = record.varNode.name; const fnRecord = this.serializeValue(fn, `${fnVarName}Unpromisified`, ''); - // TODO Handle circular references + // TODO: Handle circular references assert(!recordIsCircular(fnRecord), 'Cannot handle circular-referenced promisified functions'); const promisifyRecord = this.serializeValue(util.promisify); @@ -480,7 +480,7 @@ module.exports = { createDependency(record, promisifyRecord, node, 'callee'); createDependency(record, fnRecord, node.arguments, 0); - // TODO Add additional properties + // TODO: Add additional properties return node; }, @@ -496,7 +496,7 @@ module.exports = { * @returns {Object} - Node for debuglog function */ serializeDebuglogFunction(info, record) { - // TODO Handle circular references + // TODO: Handle circular references const setRecord = this.serializeValue(info.set, 'debuglogSet', ''); const argumentsNodes = [setRecord.varNode]; createDependency(record, setRecord, argumentsNodes, 0); @@ -512,7 +512,7 @@ module.exports = { const node = t.callExpression(debuglogRecord.varNode, argumentsNodes); createDependency(record, debuglogRecord, node, 'callee'); - // TODO Add additional properties + // TODO: Add additional properties return node; }, diff --git a/lib/serialize/output.js b/lib/serialize/output.js index d6c59131..08c53c9d 100644 --- a/lib/serialize/output.js +++ b/lib/serialize/output.js @@ -308,7 +308,7 @@ module.exports = { if (minify) { // Patch generator to remove final semi-colon if not required - // TODO Remove this if https://github.com/babel/babel/issues/14160 is resolved + // TODO: Remove this if https://github.com/babel/babel/issues/14160 is resolved const {Program} = generator; generator.Program = function(programNode) { Program.call(this, programNode); @@ -451,7 +451,7 @@ module.exports = { // - Async or generator function // - Function is named (as it may refer to itself internally) // - Function has parameters (as may use these params internally) - // TODO Could optimize last 2 cases by checking if function name/params + // TODO: Could optimize last 2 cases by checking if function name/params // are referred to in function body, and unwrapping if not. const node = exportNode.expression.callee; if ( diff --git a/lib/serialize/parseFunction.js b/lib/serialize/parseFunction.js index 6d40217f..3615ae1e 100644 --- a/lib/serialize/parseFunction.js +++ b/lib/serialize/parseFunction.js @@ -268,7 +268,7 @@ module.exports = function parseFunction( // }` const argsVarNode = t.identifier('args'); internalVars.args = [argsVarNode]; - // TODO Can using `.unshift()` interfere with replacing const violations further on? + // TODO: Can using `.unshift()` interfere with replacing const violations further on? // Indexes of any class properties will be altered. memberNodes.unshift(t.classMethod( 'constructor', diff --git a/lib/serialize/utils.js b/lib/serialize/utils.js index f8d93d7f..7066e128 100644 --- a/lib/serialize/utils.js +++ b/lib/serialize/utils.js @@ -41,7 +41,7 @@ const JS_ID_REGEX = /^[A-Za-z$_][A-Za-z0-9$_]*$/u; /** * Determine if string is valid number object key. * e.g. `{0: 'a'}`, `{22: 'a'}` - * TODO Return true for other valid number keys e.g. `{1.2: 'a'}` + * TODO: Return true for other valid number keys e.g. `{1.2: 'a'}` * @param {string} name - Input string * @returns {boolean} - `true` if is valid number object key */ diff --git a/lib/shared/constants.js b/lib/shared/constants.js index a3d2d61f..5ef48dec 100644 --- a/lib/shared/constants.js +++ b/lib/shared/constants.js @@ -7,7 +7,7 @@ // Exports -// TODO `COMMON_JS_LOCAL_VAR_NAMES` and `COMMON_JS_VAR_NAMES` don't need to be in shared consts +// TODO: `COMMON_JS_LOCAL_VAR_NAMES` and `COMMON_JS_VAR_NAMES` don't need to be in shared consts const COMMON_JS_LOCAL_VAR_NAMES = ['module', 'exports', 'require'], COMMON_JS_VAR_NAMES = [...COMMON_JS_LOCAL_VAR_NAMES, '__filename', '__dirname']; diff --git a/test/eval.test.js b/test/eval.test.js index 3afea59f..54bf695a 100644 --- a/test/eval.test.js +++ b/test/eval.test.js @@ -444,7 +444,7 @@ describe('eval', () => { }); // These tests don't work due to https://github.com/overlookmotel/livepack/issues/102 - // TODO Uncomment these tests once that issue resolved. + // TODO: Uncomment these tests once that issue resolved. // eslint-disable-next-line jest/no-commented-out-tests /* describe('defined in method key', () => { @@ -768,7 +768,7 @@ describe('eval', () => { // is *not* the arguments object of the outer function. // It doesn't test what it is, because it's not performing exactly right. // It's picking up the `arguments` object of the CJS loader function wrapping this module. - // TODO Fix this. + // TODO: Fix this. in() { function outer() { return (0, eval)("() => typeof arguments === 'undefined' ? undefined : arguments"); diff --git a/test/functions.test.js b/test/functions.test.js index 1b79a710..63fb070b 100644 --- a/test/functions.test.js +++ b/test/functions.test.js @@ -2690,7 +2690,7 @@ describe('Functions', () => { }); /* - // TODO Uncomment once https://github.com/overlookmotel/livepack/issues/353 resolved + // TODO: Uncomment once https://github.com/overlookmotel/livepack/issues/353 resolved itSerializes('in script context', { in: () => (0, eval)('() => [this, globalThis]'), // eslint-disable-line no-eval out: '(a=>()=>[a,globalThis])(globalThis)', @@ -6749,7 +6749,7 @@ describe('Functions', () => { Object.defineProperty(fn, 'name', {value: 'console'}); return fn; }, - // TODO This output should be one-liner - `const a` is not required + // TODO: This output should be one-liner - `const a` is not required out: `(()=>{ const a=(a=>a=(0,function(){return[a,console]}))(); Object.defineProperties(a,{name:{value:"console"}}); @@ -6796,7 +6796,7 @@ describe('Functions', () => { Object.defineProperty(fn, 'name', {value: 'new-name'}); return fn; }, - // TODO This output should be one-liner - `const a` is not required + // TODO: This output should be one-liner - `const a` is not required out: `(()=>{ const a=(a=>a=(0,function(){return a}))(); Object.defineProperties(a,{name:{value:"new-name"}}); @@ -6816,7 +6816,7 @@ describe('Functions', () => { Object.defineProperty(fn, 'name', {value: {x: 1}}); return fn; }, - // TODO This output should be one-liner - `const a` is not required + // TODO: This output should be one-liner - `const a` is not required out: `(()=>{ const a=(a=>a=(0,function(){return a}))(); Object.defineProperties(a,{name:{value:{x:1}}}); @@ -6853,7 +6853,7 @@ describe('Functions', () => { Object.defineProperty(fn, 'name', {value: 'fn', configurable: true}); return fn; }, - // TODO Output could be a little more compact. No need for `fn` name in `function fn(){}`. + // TODO: Output could be a little more compact. No need for `fn` name in `function fn(){}`. out: `(()=>{ const a=(a=>a=function fn(){return a})(); delete a.name; @@ -6953,7 +6953,7 @@ describe('Functions', () => { } x; `), - // TODO This should be output as a one-liner. No need for `a` to be a separate var. + // TODO: This should be output as a one-liner. No need for `a` to be a separate var. out: `(()=>{ const a=(0,eval)("x=>x=(0,function(){eval(\\"0\\");return x})")(); Object.defineProperties(a,{name:{value:"x"}}); @@ -6975,7 +6975,7 @@ describe('Functions', () => { } ({x, getX: (0, () => x)}) `), - // TODO This output should be shorter. No need for the var `b`. + // TODO: This output should be shorter. No need for the var `b`. out: `(()=>{ const a=(0,eval)("x=>[x=(0,function(){eval(\\"0\\");x=1;return x}),()=>x]")(), b=a[0]; diff --git a/test/options.test.js b/test/options.test.js index ce3fefb0..e57089e4 100644 --- a/test/options.test.js +++ b/test/options.test.js @@ -233,7 +233,7 @@ describe('Options', () => { describe('does not unwrap', () => { it('named function', () => { - // TODO No reason why this couldn't be unwrapped + // TODO: No reason why this couldn't be unwrapped const fn = function fn() { console.log(1); // eslint-disable-line no-console }; diff --git a/test/strict.test.js b/test/strict.test.js index 20720cc2..12a03f75 100644 --- a/test/strict.test.js +++ b/test/strict.test.js @@ -825,7 +825,7 @@ describe('Strict mode', () => { // These tests don't work at present, due to bug with how Livepack handles `eval`. // https://github.com/overlookmotel/livepack/issues/137 - // TODO Enable these tests when issue is resolved. + // TODO: Enable these tests when issue is resolved. // eslint-disable-next-line jest/no-commented-out-tests /* describe('eval', () => {