Skip to content

Commit d0ce7a1

Browse files
committed
chore: update js config files
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent bbdea96 commit d0ce7a1

File tree

6 files changed

+565
-506
lines changed

6 files changed

+565
-506
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.#*
2+
.*.swp
3+
.vs

.prettierrc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
semi: false
2+
singleQuote: true
3+
experimentalTernaries: true

package.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,26 @@
2020
},
2121
"type": "module",
2222
"scripts": {
23-
"build": "tsc --project tsconfig.json --noEmit false --outDir ./dist/",
24-
"check": "npm run typecheck",
23+
"check": "npm run typecheck && npm run lint",
2524
"typecheck": "tsc --project tsconfig.json --noEmit true",
2625
"deps": "depcheck --ignore-patterns=.eslintrc.cjs,package.json --ignores depcheck,@aptre/common,prettier,rimraf,typescript",
26+
"clean": "rimraf ./dist/",
27+
"build": "tsc --project tsconfig.json --noEmit false --outDir ./dist/",
2728
"codegen": "npm run gen",
28-
"ci": "npm run build && npm run lint:js && npm run lint:go",
29+
"gen": "make genproto",
2930
"format": "npm run format:js && npm run format:go",
30-
"format:js": "prettier --write './!(vendor|dist)/**/(*.ts|*.tsx|*.js|*.html|*.css)'",
3131
"format:go": "make format",
32-
"gen": "make genproto",
33-
"test": "make test && npm run check && npm run test:js",
34-
"test:js": "echo No JS tests.",
32+
"format:js": "prettier --write './!(vendor|dist)/**/(*.ts|*.tsx|*.js|*.html|*.css)'",
33+
"format:js:all": "prettier --write './!(vendor|dist)/**/(*.ts|*.tsx|*.js|*.html|*.css)'",
34+
"test": "npm run test:js && npm run test:go",
35+
"test:js": "vitest run && npm run typecheck",
36+
"test:go": "make test",
3537
"lint": "npm run lint:go && npm run lint:js",
3638
"lint:go": "make lint",
3739
"lint:js": "ESLINT_USE_FLAT_CONFIG=false eslint -c .eslintrc.cjs ./",
38-
"prepare": "go mod vendor && rimraf ./.tools && cd ./example/plugin-demo && go mod tidy && rimraf ./vendor",
40+
"ci": "npm run build && npm run lint:js && npm run lint:go",
41+
"prepare": "npm run clean && rimraf ./.tools && npm run vendor && npm run setup",
42+
"vendor": "go mod vendor",
3943
"precommit": "npm run format"
4044
},
4145
"prettier": {
@@ -45,9 +49,11 @@
4549
"devDependencies": {
4650
"@aptre/common": "^0.21.1",
4751
"depcheck": "^1.4.7",
52+
"happy-dom": "^17.4.4",
4853
"prettier": "^3.5.3",
4954
"rimraf": "^6.0.1",
50-
"typescript": "^5.8.2"
55+
"typescript": "^5.8.2",
56+
"vitest": "^3.0.7"
5157
},
5258
"dependencies": {
5359
"@aptre/protobuf-es-lite": "^0.4.4",

tsconfig.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
"compilerOptions": {
3-
"target": "esnext",
4-
"module": "Node16",
5-
"moduleResolution": "Node16",
3+
"target": "ES2022",
4+
"module": "ESNext",
5+
"moduleResolution": "bundler",
66
"jsx": "react",
77
"baseUrl": "./",
88
"paths": {
99
"@go/*": ["vendor/*"]
1010
},
1111
"allowSyntheticDefaultImports": true,
1212
"declaration": true,
13-
"esModuleInterop": true,
1413
"forceConsistentCasingInFileNames": true,
1514
"importsNotUsedAsValues": "remove",
1615
"noEmit": true,
@@ -19,9 +18,5 @@
1918
"strict": true,
2019
"lib": ["webworker", "dom"]
2120
},
22-
"exclude": ["node_modules", "vendor", "dist"],
23-
"ts-node": {
24-
"esm": true,
25-
"experimentalSpecifierResolution": true
26-
}
21+
"exclude": ["node_modules", "vendor"]
2722
}

vitest.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { configDefaults, defineConfig } from 'vitest/config'
2+
3+
export default defineConfig({
4+
test: {
5+
environment: 'happy-dom',
6+
exclude: [...configDefaults.exclude, 'vendor'],
7+
},
8+
})

0 commit comments

Comments
 (0)