-
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.
Merge pull request #1 from 2060-io/dev-test
feat: update prettier/eslint rules, add ci/cd
- Loading branch information
Showing
63 changed files
with
3,004 additions
and
1,884 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,85 @@ | ||
name: Continuous Deployment | ||
|
||
on: | ||
push: | ||
branches: [main, dev, dev-test] | ||
|
||
workflow_dispatch: | ||
|
||
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", | ||
[ | ||
"@codedependant/semantic-release-docker", | ||
{ | ||
"dockerTags": | ||
[ | ||
"${RELEASE_MAJOR}-${GITHUB_REF##*/}", | ||
"${RELEASE_MAJOR}.${RELEASE_MINOR}-${GITHUB_REF##*/}", | ||
"${RELEASE_MAJOR}.${RELEASE_MINOR}.${RELEASE_PATCH}-${GITHUB_REF##*/}", | ||
"$RELEASE_VERSION", | ||
"${GITHUB_REF##*/}" | ||
], | ||
"dockerImage": "${IMAGE_NAME}" | ||
} | ||
] | ||
] | ||
additional-packages: | | ||
['@codedependant/semantic-release-docker'] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_HUB_LOGIN }} | ||
DOCKER_REGISTRY_PASSWORD : ${{ secrets.DOCKER_HUB_PWD }} | ||
IMAGE_NAME: '2060-service-agent' | ||
|
||
- run: echo ${{ steps.semantic.outputs.release-version }} |
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.