Skip to content

Commit

Permalink
Merge pull request #127 from SH5H/testtest
Browse files Browse the repository at this point in the history
Adding automatic linter for checking commit
  • Loading branch information
maidul98 authored Dec 18, 2022
2 parents 02e5be2 + de11c50 commit 9b7f036
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 161 deletions.
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

5 changes: 2 additions & 3 deletions backend/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
"plugin:@typescript-eslint/recommended"
],
"rules": {
"no-console": 2
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 . .

Expand Down
115 changes: 3 additions & 112 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
"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",
"lint": "eslint . --ext .ts",
"lint-and-fix": "eslint . --ext .ts --fix",
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write",
"lint-staged": "lint-staged"
},
"repository": {
Expand All @@ -63,13 +63,10 @@
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"install": "^0.13.0",
"jest": "^29.3.1",
"nodemon": "^2.0.19",
"npm": "^8.19.3",
"prettier": "^2.7.1",
"ts-node": "^10.9.1"
}
}
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions frontend/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ 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

# Copy all files
COPY . .

CMD ["npm", "run", "dev"]
CMD ["npm", "run", "dev"]
2 changes: 1 addition & 1 deletion frontend/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"private": true,
"scripts": {
"prepare": "cd .. && npm install",
"dev": "next dev",
"build": "next build",
"start": "next start",
Expand Down
27 changes: 2 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@
"prepare": "husky install"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown",
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
"eslint --fix"
]
},
"devDependencies": {
"eslint": "^8.29.0",
"husky": "^8.0.2",
"prettier": "^2.8.1"
"husky": "^8.0.2"
}
}

0 comments on commit 9b7f036

Please sign in to comment.