-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update prettier/eslint rules, add ci/cd
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
- Loading branch information
Showing
63 changed files
with
3,001 additions
and
1,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'import/no-cycle': 'error', | ||
'import/newline-after-import': ['error', { count: 1 }], | ||
'import/order': [ | ||
'error', | ||
{ | ||
groups: ['type', ['builtin', 'external'], 'parent', 'sibling', 'index'], | ||
alphabetize: { | ||
order: 'asc', | ||
}, | ||
'newlines-between': 'always', | ||
}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Continuous Deployment | ||
|
||
on: | ||
push: | ||
branches: [main, dev, dev-test] | ||
|
||
workflow_dispatch: | ||
|
||
env: | ||
DH_USERNAME: ${{secrets.DOCKER_HUB_LOGIN}} | ||
DH_TOKEN: ${{secrets.DOCKER_HUB_PWD}} | ||
IMAGE_NAME: '2060-service-agent' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout service-agent | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node v20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn install | ||
- uses: codfish/semantic-release-action@v3 | ||
id: semantic | ||
with: | ||
branches: | | ||
[ | ||
'main', | ||
{ | ||
name: 'dev', | ||
prerelease: true | ||
}, | ||
{ | ||
name: 'dev-test', | ||
prerelease: true | ||
} | ||
] | ||
plugins: | | ||
[ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "angular", | ||
"releaseRules": [ | ||
{ | ||
"type": "refactor", | ||
"release": "patch" | ||
} | ||
] | ||
} | ||
], | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": false | ||
} | ||
], | ||
"@semantic-release/release-notes-generator", | ||
] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- run: echo ${{ steps.semantic.outputs.release-version }} | ||
|
||
- name: Log in to Docker Hub | ||
run: | | ||
echo "$DH_TOKEN" | docker login -u "$DH_USERNAME" --password-stdin | ||
- name: Build Docker image | ||
run: | | ||
docker build -f Dockerfile -t $DH_USERNAME/$IMAGE_NAME:$RELEASE_VERSION-${GITHUB_REF##*/} . | ||
- name: Push Docker image to Docker Hub | ||
run: | | ||
docker push $DH_USERNAME/$IMAGE_NAME:$RELEASE_VERSION-${GITHUB_REF##*/} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: | ||
branches: [main, dev, dev-test] | ||
types: [opened, synchronize, reopened, labeled] | ||
push: | ||
branches: [main, dev, dev-test] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout service-agent | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node v20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn install --frozen-lockfile | ||
- name: Check Format | ||
run: | | ||
yarn check-format | ||
- name: Check Types | ||
run: | | ||
yarn check-types | ||
- name: Build | ||
run: | | ||
yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"printWidth": 120, | ||
"printWidth": 110, | ||
"singleQuote": true, | ||
"bracketSpacing": true, | ||
"semi": false, | ||
"singleQuote": true | ||
} | ||
"trailingComma": "all", | ||
"arrowParens": "avoid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.