Skip to content

Commit

Permalink
Fix tsconfig package.json babel.config files
Browse files Browse the repository at this point in the history
  • Loading branch information
n1klaus committed May 16, 2023
1 parent 9a7f9cd commit 486b93c
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ node_modules
*-lock.json
tsconfig.tsbuildinfo
STATE.md
SECRETS
SECRET.json
4 changes: 2 additions & 2 deletions frontend/babel.config.mjs → backend/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
presets: [
[
"@babel/preset-typescript",
'@babel/preset-typescript',
{
targets: {
node: "current",
node: 'current',
},
},
],
Expand Down
3 changes: 0 additions & 3 deletions backend/babel.config.mjs

This file was deleted.

18 changes: 9 additions & 9 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
"name": "video-platform-backend",
"private": true,
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "ts-node-dev --respawn --transpile-only src/server.ts",
"dev-server": "ts-node-dev --respawn --transpile-only src/server.ts",
"dev-worker": "ts-node-dev --respawn --transpile-only src/worker.ts",
"dev": "concurrently \"npm run dev-*\"",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
"check-lint": "eslint . --ext .js,.jsx,.ts,.tsx ",
"fmt": "prettier --write .",
"check-fmt": "prettier --check .",
"semifix": "semistandard --fix .",
"check-semi": "semistandard .",
"start-server": "nodemon --exec babel-node --presets @babel/preset-env src/server.ts",
"start-worker": "nodemon --exec babel-node --presets @babel/preset-env src/worker.ts",
"test-types": "tsc --incremental --noEmit",
"test": "./node_modules/.bin/mocha --require @babel/register --exit",
"full-test": "./node_modules/.bin/eslint *.js *.ts && jest"
"start-server": "nodemon --exec babel-node --presets @babel/preset-typescript ./dist/server.js",
"start-worker": "nodemon --exec babel-node --presets @babel/preset-typescript ./dist/worker.js",
"start": "concurrently \"npm run start-*\"",
"build": "tsc --incremental",
"test": "mocha --require @babel/register --exit"
},
"devDependencies": {
"@babel/cli": "^7.21.0",
Expand All @@ -32,7 +33,6 @@
"@types/fluent-ffmpeg": "^2.1.21",
"@types/jsonwebtoken": "^9.0.1",
"@types/mime-types": "^2.1.1",
"@types/morgan": "^1.9.4",
"@types/multer": "^1.4.7",
"@types/node": "^18.11.18",
"@types/qs": "^6.9.7",
Expand Down Expand Up @@ -60,6 +60,7 @@
"typescript": "^4.9.5"
},
"dependencies": {
"@types/morgan": "^1.9.4",
"@aws-sdk/client-s3": "^3.327.0",
"@aws-sdk/lib-storage": "^3.312.0",
"aws-sdk": "^2.1359.0",
Expand All @@ -76,7 +77,6 @@
"image-thumbnail": "^1.0.15",
"jsonwebtoken": "^9.0.0",
"mime-type": "^4.0.0",
"mongodb": "^5.2.0",
"mongoose": "^7.0.3",
"multer": "^1.4.5-lts.1",
"qs": "^6.11.0",
Expand Down
10 changes: 9 additions & 1 deletion backend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"strictPropertyInitialization": false,
"skipLibCheck": true
"skipLibCheck": true,
"sourceMap": false,
"allowSyntheticDefaultImports": true,
"outDir": "./dist",
"baseUrl": "./"
},
"exclude": ["node_modules"],
"ts-node": {
"files": true
}
}
12 changes: 12 additions & 0 deletions frontend/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: [
[
'@babel/preset-typescript',
{
targets: {
node: 'current',
},
},
],
],
};
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"fmt": "prettier --write .",
"check-fmt": "prettier --check .",
"semifix": "semistandard --fix .",
"check-semi": "semistandard ."
"check-semi": "semistandard .",
"test": "mocha --require @babel/register --exit"
},
"dependencies": {
"@emotion/react": "^11.10.6",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/VideoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function VideoCard({ video }: { video: IVideo }) {
const store = useStore();
const [channel, setChannel] = useState<IChannel>({
_id: '',
userId: '',
name: '',
description: '',
imgUrl: '',
Expand Down

0 comments on commit 486b93c

Please sign in to comment.