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

Refractor, ESLint, Fix CI/CD, make it readdy for PROD #25

Merged
merged 12 commits into from
Nov 25, 2024

Conversation

manzil-infinity180
Copy link
Owner

@manzil-infinity180 manzil-infinity180 commented Nov 17, 2024

Everythings looks fine to me

Added EsLint
Added Prettiers
Added husky and lint staged (which runs the eslint and prettier before git commit (I mean pre-commit))
Modified some of DockerFile and ci.yaml
Refractor the codebase
Removed all console.log , unused variable and other

Copy link

vercel bot commented Nov 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dump-store-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2024 8:04pm

@manzil-infinity180
Copy link
Owner Author

I am still getting issues with the npm install(buildx error) while doing a push to the docker

@manzil-infinity180
Copy link
Owner Author

Everythings looks fine to me

Added EsLint
Added Prettiers
Added husky and lint staged (which runs the eslint and prettier before git commit (I mean pre-commit))
Modified some of DockerFile and ci.yaml
Refractor the codebase
Removed all console.log , unused variable and other

@@ -28,8 +28,13 @@ jobs:
${{ runner.os }}-node-
- name: Install Dependencies
run: npm install
- name: ESLint
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah works fine
Not big update here

Copy link
Owner Author

@manzil-infinity180 manzil-infinity180 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good 😄

@@ -47,6 +52,8 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Set up QEMU
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just copy from OpenElis project , like they are using qemu before docker buildx

Worry about why it is failing 🥲

Comment on lines +3 to +9
build
vercel.json
tsconfig.json
package.json
package-lock.json
Dockerfile
compose.yaml
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not big deals

Comment on lines +9 to +14
RUN rm -rf node_modules package-lock.json

# Install dependencies using npm ci for faster, consistent installs
RUN npm install

# Add node_modules/.bin to PATH for easier access to executables
# Add node_modules/.bin to PATH for easier access to executables
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it from internet (railway forum)

Didn't work for me on CI

Comment on lines +16 to +17
"pre-commit": "lint-staged",
"prepare": "husky install"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you run -> npx husky-init then they created this file with .husky(inside we have pre-commit file which uses npm run pre-commi)

Comment on lines +75 to +87
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": [
"eslint --fix"
],
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier --write"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From tutorial(vishwas- webpack)

Comment on lines +136 to +148
passport.use(
new TwitterStrategy(
{
consumerKey: process.env.TWITTER_OAUTH_API_KEY,
consumerSecret: process.env.TWITTER_OAUTH_SECRET,
callbackURL: `/auth/twitter/callback`,
// callbackURL: "/auth/twitter/callback"
},
function (token, tokenSecret, profile, done) {
return done(null, profile);
}
)
);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not using this , anywhere at in future I will change it

@@ -0,0 +1,382 @@
"use strict";
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it from internet, it will help us in future

Good Note

@manzil-infinity180 manzil-infinity180 merged commit ce517e1 into main Nov 25, 2024
5 of 7 checks passed
@manzil-infinity180 manzil-infinity180 deleted the refractor-http-file branch November 25, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant