Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : Refine Linting and Formatting Configuration #243

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ env:

plugins:
- "@typescript-eslint"
- "prettier"
- @typescript-eslint/parser

extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- prettier


parserOptions:
ecmaVersion: 2018
Expand All @@ -22,6 +25,7 @@ rules:
# Ignore Rules
strict: 0
no-underscore-dangle: 0
'prettier/prettier': 'error'
no-mixed-requires: 0
no-process-exit: 0
no-warning-comments: 0
Expand Down Expand Up @@ -68,9 +72,7 @@ rules:
# stylistic errors
no-spaced-func: 2
semi-spacing: 2
quotes: [2, 'single']
key-spacing: [2, { beforeColon: false, afterColon: true }]
indent: [2, 2]
no-lonely-if: 2
no-floating-decimal: 2
brace-style: [2, 1tbs, { allowSingleLine: true }]
Expand Down
4 changes: 1 addition & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

npm run format:fix
npm run lint:fix

git add .
npm run lint:fix
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all"
}
}
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@

## Setup Procedure

* Docker
- Docker

OR
OR

- Copy .env.example to .env
- Get a postgres db from https://neon.tech/ (or any other provider)
- Replace the DATABASE_URL in .env
- Run `npx prisma migrate dev` to setup schema

* Copy .env.example to .env
* Get a postgres db from https://neon.tech/ (or any other provider)
* Replace the DATABASE_URL in .env
* Run ```npx prisma migrate dev``` to setup schema
## Steps to run locally

With Docker

* ```docker compose up```
- `docker compose up`

Without Docker
* ```npm install```
* ```npm run db:seed``` to seed the database
* ```npm run dev```
* Login using any userid and password 123456
* You should be able to see some test courses

- `npm install`
- `npm run db:seed` to seed the database
- `npm run dev`
- Login using any userid and password 123456
- You should be able to see some test courses

---

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
volumes:
- ./postgres-data:/var/lib/postgresql/data
healthcheck:
test: [ 'CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}' ]
test: ['CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}']
interval: 10s
timeout: 5s
retries: 5
10 changes: 7 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
const nextConfig = {
experimental: {
serverActions: {
allowedOrigins: ['localhost:3000', 'app.100xdevs.com', 'app2.100xdevs.com']
}
}
allowedOrigins: [
'localhost:3000',
'app.100xdevs.com',
'app2.100xdevs.com',
],
},
},
};

module.exports = nextConfig;
Loading
Loading