Skip to content

Commit 2365105

Browse files
committed
lintfix
1 parent fad5c41 commit 2365105

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

src/test/index.spec.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,16 @@ test.suite('ts-node', (test) => {
318318
{
319319
env: {
320320
...process.env,
321-
NODE_OPTIONS: `${ process.env.NODE_OPTIONS || '' } --require ${ require.resolve('../../tests/spy-swc-transpiler') }`
322-
}
321+
NODE_OPTIONS: `${
322+
process.env.NODE_OPTIONS || ''
323+
} --require ${require.resolve('../../tests/spy-swc-transpiler')}`,
324+
},
323325
}
324326
);
325327
expect(err).toBe(null);
326-
expect(stdout).toMatch('Hello World! swc transpiler invocation count: 1\n');
328+
expect(stdout).toMatch(
329+
'Hello World! swc transpiler invocation count: 1\n'
330+
);
327331
});
328332
}
329333

tests/spy-swc-transpiler.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ const swcTranspiler = require('ts-node/transpilers/swc');
55
global.swcTranspilerCalls = 0;
66

77
const wrappedCreate = swcTranspiler.create;
8-
swcTranspiler.create = function(...args) {
8+
swcTranspiler.create = function (...args) {
99
const transpiler = wrappedCreate(...args);
1010
const wrappedTranspile = transpiler.transpile;
11-
transpiler.transpile = function(...args) {
11+
transpiler.transpile = function (...args) {
1212
global.swcTranspilerCalls++;
1313
return wrappedTranspile.call(this, ...args);
14-
}
14+
};
1515
return transpiler;
16-
}
16+
};

tests/transpile-only-swc-shorthand-via-tsconfig/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class World {}
55

66
// intentional type errors to check transpile-only ESM loader skips type checking
77
parseInt(1101, 2);
8-
const x: number = `Hello ${World.name}! swc transpiler invocation count: ${ global.swcTranspilerCalls }`;
8+
const x: number = `Hello ${World.name}! swc transpiler invocation count: ${global.swcTranspilerCalls}`;
99
console.log(x);
1010

1111
// test module type emit

tests/transpile-only-swc-via-tsconfig/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class World {}
55

66
// intentional type errors to check transpile-only ESM loader skips type checking
77
parseInt(1101, 2);
8-
const x: number = `Hello ${World.name}! swc transpiler invocation count: ${ global.swcTranspilerCalls }`;
8+
const x: number = `Hello ${World.name}! swc transpiler invocation count: ${global.swcTranspilerCalls}`;
99
console.log(x);
1010

1111
// test module type emit

tests/transpile-only-swc/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class World {}
55

66
// intentional type errors to check transpile-only ESM loader skips type checking
77
parseInt(1101, 2);
8-
const x: number = `Hello ${World.name}! swc transpiler invocation count: ${ global.swcTranspilerCalls }`;
8+
const x: number = `Hello ${World.name}! swc transpiler invocation count: ${global.swcTranspilerCalls}`;
99
console.log(x);
1010

1111
// test module type emit

0 commit comments

Comments
 (0)