Skip to content

Commit 6b273c3

Browse files
authored
refactor: Use Vitest globals (#622)
1 parent 2bba0c1 commit 6b273c3

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"extends": "@tstv/eslint-config"
2+
"extends": "@tstv/eslint-config",
3+
"ignorePatterns": ["vitest.config.ts"]
34
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"bin": {
3-
"ts-node-starter": "dist/src/cli.js"
3+
"ts-node-starter": "dist/cli.js"
44
},
55
"bugs": {
66
"url": "https://github.com/bennycode/ts-node-starter/issues"
@@ -22,13 +22,13 @@
2222
"vitest": "^0.34.6"
2323
},
2424
"files": [
25-
"dist/src",
25+
"dist",
2626
"!dist/**/*.test.*"
2727
],
2828
"homepage": "https://www.npmjs.com/package/ts-node-starter",
2929
"keywords": [],
3030
"license": "UNLICENSED",
31-
"main": "dist/src/index.js",
31+
"main": "dist/index.js",
3232
"name": "@bennycode/ts-node-starter",
3333
"private": false,
3434
"repository": {

src/MyClass.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import {describe, it, expect} from 'vitest';
21
import {MyClass} from './MyClass.js';
32

43
describe('MyClass', () => {

src/sayHello.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import {describe, expect, it} from 'vitest';
21
import {sayHello} from './sayHello.js';
32

43
describe('sayHello', () => {

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"$schema": "https://json.schemastore.org/tsconfig",
33
"compilerOptions": {
44
"outDir": "dist",
5-
"skipLibCheck": true
5+
"types": ["vitest/globals"]
66
},
7+
"exclude": ["vitest.config.ts"],
78
"extends": "@tstv/tsconfig-common/tsconfig.json"
89
}

vitest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ export default defineConfig({
1212
statements: 0,
1313
},
1414
environment: 'node',
15+
globals: true,
1516
},
1617
});

0 commit comments

Comments
 (0)