Skip to content

Commit

Permalink
fix failing workflow issue
Browse files Browse the repository at this point in the history
  • Loading branch information
amitamrutiya committed Feb 13, 2024
1 parent de74f59 commit 546495a
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 43 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/workflow_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
path: "backend"
ref: main

- name: Use Node.js
Expand All @@ -31,4 +30,4 @@ jobs:
run: npm run format

- name: Run Tests
run: npm run test
run: npm run test
1 change: 0 additions & 1 deletion .github/workflows/workflow_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
path: 'frontend'
ref: main

- name: Use Node.js
Expand Down
3 changes: 3 additions & 0 deletions backend/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
38 changes: 38 additions & 0 deletions backend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"eslint:recommended",
],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,ejs}"],
parserOptions: {
sourceType: "script",
},
},
],
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
ecmaFeatures: {
jsx: true, // This is the key line - it tells ESLint to expect JSX syntax
},
requireConfigFile: false,
},
rules: {
"comma-dangle": ["error", "always-multiline"],
quotes: ["error", "double"],
"no-undef" : "off",
},
settings: {
react: {
version: "detect", // Automatically picks the version you have installed.
},
},
}
7 changes: 0 additions & 7 deletions backend/.prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions backend/.prettierrc

This file was deleted.

20 changes: 18 additions & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"version": "1.0.0",
"description": "Studynotion app by Amit",
"main": "index.js",
"type": "module",
"type": "commonjs",
"scripts": {
"start": "node -r dotenv/config --experimental-json-modules index.js",
"dev": "nodemon -r dotenv/config --experimental-json-modules index.js",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"build": "npm i",
"format": "cd .. && npm run format"
"format": "npx eslint . --ext .js,.jsx"
},
"keywords": [],
"author": "",
Expand All @@ -30,7 +30,23 @@
"otp-generator": "^4.0.1",
"razorpay": "^2.9.2"
},
"jest": {
"transform": {
"^.+\\.jsx?$": "babel-jest"
}
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/eslint-parser": "^7.23.10",
"@babel/preset-env": "^7.23.9",
"babel-jest": "^29.7.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"jest": "^29.7.0",
"nodemon": "^3.0.1"
}
Expand Down
3 changes: 3 additions & 0 deletions frontend/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
3 changes: 0 additions & 3 deletions .eslintrc.js → frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ module.exports = {
es2021: true,
},
extends: [
"standard",
"plugin:react/recommended",
"eslint:recommended",
"plugin:react/recommended",
],
overrides: [
{
Expand All @@ -20,7 +18,6 @@ module.exports = {
},
},
],
// parser: "@babel/eslint-parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
Expand Down
22 changes: 19 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"name": "frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"type": "commonjs",
"scripts": {
"dev": "vite --port 3000",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"format": "cd .. && npm run format"
"format": "npx eslint . --ext .js,.jsx"
},
"dependencies": {
"@ramonak/react-progress-bar": "^5.0.3",
Expand All @@ -34,18 +34,34 @@
"swiper": "^11.0.3",
"video-react": "^0.16.0"
},
"jest": {
"transform": {
"^.+\\.jsx?$": "babel-jest"
}
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/eslint-parser": "^7.23.10",
"@babel/preset-env": "^7.23.9",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react": "^4.0.3",
"autoprefixer": "^10.4.16",
"babel-jest": "^29.7.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5",
"vite": "^4.4.5",
"vitest": "^0.34.6"
}
}
}
6 changes: 4 additions & 2 deletions frontend/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export default {
/* eslint-disable no-undef */

module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function PublishCourse () {
setLoading(false)
}

const onSubmit = (data) => {
const onSubmit = () => {
handleCoursePublish()
}

Expand Down
17 changes: 2 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"concurrently": "^8.2.2",
"react": "^18.2.0"
"concurrently": "^8.2.2"
},
"scripts": {
"start:server": "cd backend && npm run dev",
"start:client": "cd frontend && npm run dev",
"dev": "concurrently -n \"server,client\" -c \"red,blue\" \"npm run start:server\" \"npm run start:client\"",
"format": "npx eslint . --ext .js,.jsx"
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/eslint-parser": "^7.23.10",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5"
"dev": "concurrently -n \"server,client\" -c \"red,blue\" \"npm run start:server\" \"npm run start:client\""
}
}

0 comments on commit 546495a

Please sign in to comment.