Skip to content

Commit

Permalink
refactor: only use tsc for type checking
Browse files Browse the repository at this point in the history
Now that decorators are no longer used, we can use Parcel's built-in mechanism for compiling TypeScript. Parcel uses SWC (https://swc.rs/) rather than tsc.

Refs #399, e66f0d8
  • Loading branch information
thewilkybarkid committed Nov 29, 2021
1 parent b140f66 commit 2baf875
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 73 deletions.
3 changes: 0 additions & 3 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"]
}
}
60 changes: 0 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"format": "prettier --ignore-unknown --check '**'",
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
"test": "jest",
"typecheck": "tsc --noEmit --project tsconfig.dev.json",
"typecheck": "tsc --project tsconfig.dev.json",
"build": "rimraf dist && npm run build:scripts && npm run build:backend && npm run build:hooks && npm run build:frontend",
"build:dev": "rimraf dist && npm run build:scripts && npm run build:backend:dev && npm run build:hooks && npm run build:frontend:dev",
"build:backend": "parcel build --target=backend src/backend/index.ts src/backend/mikro-orm.config.ts && npm run build:templates",
Expand Down Expand Up @@ -156,7 +156,6 @@
},
"devDependencies": {
"@mikro-orm/cli": "^4.5.4",
"@parcel/transformer-typescript-tsc": "^2.0.1",
"@testing-library/jest-dom": "^5.15.0",
"@testing-library/react": "^12.1.2",
"@types/doi-regex": "^0.1.0",
Expand Down
9 changes: 1 addition & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"isolatedModules": true,
"strict": true,
"removeComments": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noLib": false,
"lib": ["es2017", "dom"],
"target": "es6",
"sourceMap": true,
"allowJs": true,
"outDir": "./dist",
"jsx": "react",
"baseUrl": "./src",
"paths": {
"~*": ["./*"]
}
"noEmit": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules", "**/*.spec.ts"]
Expand Down

0 comments on commit 2baf875

Please sign in to comment.