Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
!src/
!nest-cli.json
!api/
!proxy/
!proxy/
!test/
44 changes: 0 additions & 44 deletions .eslintrc.js

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Code Checks

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- "feature/**"
- "main"
- "production"

jobs:
eslint-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Packages
run: npm ci
- name: Run Eslint
run: npm run lint

format-check:
runs-on: ubuntu-latest
needs: eslint-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Packages
run: npm ci
- name: Run Prettier
run: npm run format

jest-testing:
runs-on: ubuntu-latest
needs: eslint-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Docker Compose
run: |
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Build images
run: docker-compose build
- name: Run Test
run: docker-compose run --rm server sh -c "npm run test"

# auto_format:
# permissions:
# contents: write
# needs: [format-check, jest-testing]
# if: ${{needs.format-check.result == 'failure'}}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Install Packages
# run: npm ci
# - name: Format Code
# run: npm run format:fix
# - name: Add Code
# run: |
# git config user.name "github-actions[bot]"
# git config user.email "github-actions[bot]@users.noreply.github.com"
# git add .
# - name: Auto Commit
# uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_message: "style: auto format [skip ci]"
21 changes: 0 additions & 21 deletions .github/workflows/code-linting.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/push-docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Push Docker Images

on:
push:
branches:
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/test-api.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
npm run format:fix
npm run lint:fix
git add .
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ USER root

RUN npm install -g npm && \
npm install -g typescript && \
npm install
npm install

COPY ./tsconfig*.json ./
COPY ./nest-cli.json ./
COPY ./src ./src
COPY ./packages ./packages
COPY ./test ./test

RUN npm run build

Expand Down
59 changes: 0 additions & 59 deletions eslint.config.js

This file was deleted.

59 changes: 59 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import globals from 'globals'
import tseslint from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import pluginPrettier from 'eslint-plugin-prettier'
import preferArrowFunctions from 'eslint-plugin-prefer-arrow-functions'

export default [
// replaces .eslintignore
{ ignores: ['eslint.config.mjs', 'node_modules/', 'dist/', 'build/', 'coverage/'] },

{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: process.cwd(),
sourceType: 'module',
},
globals: {
...globals.node,
...globals.jest,
},
},
plugins: {
'@typescript-eslint': tseslint,
'prefer-arrow-functions': preferArrowFunctions,
prettier: pluginPrettier,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',

'@typescript-eslint/consistent-type-imports': 'warn',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-redeclare': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': 'off',

'prefer-const': 'warn',

// keep your Prettier rule customization
'prettier/prettier': ['warn', { endOfLine: 'auto' }],

'prefer-arrow-functions/prefer-arrow-functions': [
'warn',
{
allowNamedFunctions: false,
classPropertiesAllowed: false,
disallowPrototype: false,
returnStyle: 'unchanged',
singleReturnOnly: false,
},
],
},
},
]
Loading