Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Adding automatic linter for checking commit

seunghyunOh4c29c88fde47
diff --git a/backend/Dockerfile b/backend/Dockerfile
index ccc76e66e5..fc93f2c332 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -4,7 +4,7 @@ WORKDIR /app
COPY package.json package-lock.json ./
-RUN npm ci --only-production
+RUN npm ci --only-production --ignore-scripts
COPY . .
diff --git a/backend/package.json b/backend/package.json
index 32ca68b192..771bbc7e64 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -31,6 +31,7 @@
"version": "1.0.0",
"main": "src/index.js",
"scripts": {
+ "prepare": "cd .. && npm install",
"start": "npm run build && node build/index.js",
"dev": "nodemon",
"build": "rimraf ./build && tsc && cp -R ./src/templates ./src/json ./build",
diff --git a/frontend/Dockerfile b/frontend/Dockerfile
index 5deb468f74..520f0fb7fc 100644
--- a/frontend/Dockerfile
+++ b/frontend/Dockerfile
@@ -10,7 +10,7 @@ WORKDIR /app
COPY package.json package-lock.json next.config.js ./
# Install dependencies
-RUN npm ci --only-production
+RUN npm ci --only-production --ignore-scripts
# Rebuild the source code only when needed
diff --git a/frontend/Dockerfile.dev b/frontend/Dockerfile.dev
index 2bae23823f..cb462bbc4d 100644
--- a/frontend/Dockerfile.dev
+++ b/frontend/Dockerfile.dev
@@ -9,7 +9,7 @@ COPY package.json ./
COPY package-lock.json ./
# Install
-RUN npm install
+RUN npm install --ignore-scripts
# Copy over next.js config
COPY next.config.js ./next.config.js
@@ -17,4 +17,4 @@ COPY next.config.js ./next.config.js
# Copy all files
COPY . .
-CMD ["npm", "run", "dev"]
\ No newline at end of file
+CMD ["npm", "run", "dev"]
diff --git a/frontend/Dockerfile.prod b/frontend/Dockerfile.prod
index d95c00883f..71943e0f8c 100644
--- a/frontend/Dockerfile.prod
+++ b/frontend/Dockerfile.prod
@@ -9,7 +9,7 @@ COPY package.json ./
COPY package-lock.json ./
# Install
-RUN npm install
+RUN npm install --ignore-scripts
# Copy over next.js config
COPY next.config.js ./next.config.js
diff --git a/frontend/package.json b/frontend/package.json
index 7f7926c880..00952149d6 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,6 +1,7 @@
{
"private": true,
"scripts": {
+ "prepare": "cd .. && npm install",
"dev": "next dev",
"build": "next build",
"start": "next start",
diff --git a/package.json b/package.json
index b0d02f3a04..d5371d0e29 100644
--- a/package.json
+++ b/package.json
@@ -16,8 +16,7 @@
"lint-staged": {
"**/*": "prettier --write --ignore-unknown",
"*.{js,jsx,ts,tsx}": [
- "eslint --fix",
- "prettier --write"
+ "eslint --fix"
]
},
"devDependencies": {