Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Prod Release into Master #98

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
.serverless
.vscode
*.config.js
.webpack
**/*.js
.build,
jest.config.ts
13 changes: 13 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "@dvsa/eslint-config-ts",
"rules": {
"no-console": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-return": 0,
"@typescript-eslint/ban-ts-comment": 0,
"jest/no-identical-title": 0,
"@typescript-eslint/no-explicit-any": 0
}
}
4 changes: 2 additions & 2 deletions .github/workflows/build_hash.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build hash and deploy to S3
run-name: "${{ github.actor }} - ${{ github.ref_name }} - ${{ github.run_id }} 🚀"
run-name: '${{ github.actor }} - ${{ github.ref_name }} - ${{ github.run_id }} 🚀'

on:
workflow_dispatch:
Expand All @@ -12,4 +12,4 @@ jobs:
uses: dvsa/cvs-github-actions/.github/workflows/build-node-hash.yaml@develop
secrets:
CVS_MGMT_AWS_ROLE: ${{ secrets.CVS_MGMT_AWS_ROLE }}
DVSA_AWS_REGION: ${{ secrets.DVSA_AWS_REGION }}
DVSA_AWS_REGION: ${{ secrets.DVSA_AWS_REGION }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
with:
args: '--all-projects'
secrets:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
14 changes: 7 additions & 7 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: PR-checks

on:
push:
branches: ["develop", "feature/VTMDEV-1"]
branches: ['develop']
pull_request:
branches: ["develop", "feature/VTMDEV-1"]
branches: ['develop']

jobs:
build-test:
Expand All @@ -19,12 +18,12 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Setup local dynamo
Expand All @@ -36,10 +35,11 @@ jobs:
AWS_SECRET_ACCESS_KEY: bar
- name: Run linter
run: npm run lint

scanner:
permissions:
id-token: write
contents: write
pull-requests: write
runs-on: X64
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.defaultFormatter": "biomejs.biome",
"eslint.enable": false
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Please familiarise yourself with [commitlint](https://commitlint.js.org/#/) and

### Hooks and code standards

The projects has multiple hooks configured using [husky](https://github.com/typicode/husky#readme) which will execute the following scripts: `security-checks`, `audit`, `tslint`, `prepush`.
The projects has multiple hooks configured using [husky](https://github.com/typicode/husky#readme) which will execute the following scripts: `security-checks`, `audit`, `eslint`, `prepush`.
The codebase uses [typescript clean code standards](https://github.com/labs42io/clean-code-typescript) as well as sonarqube for static analysis.

SonarQube is available locally, please follow the instructions below if you wish to run the service locally (brew is the preferred approach).
Expand Down
28 changes: 28 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"extends": [
"@dvsa/biome-config/biome"
],
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "off",
"noConsole": "off"
},
"complexity": {
"noForEach": "off",
"noUselessCatch": "off",
"noThisInStatic": "off"
},
"correctness": {
"noSwitchDeclarations": "off"
},
"style": {
"noUnusedTemplateLiteral": "off",
"noNonNullAssertion": "off",
"noUselessElse": "off",
"useTemplate": "off",
"useNodejsImportProtocol": "off"
}
}
}
}
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
module.exports = { extends: ['@commitlint/config-conventional'] };
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "2"
version: '2'
services:
aws-cli:
container_name: aws-cli
Expand All @@ -16,5 +16,5 @@ services:
- ./s3-conf.json:/usr/src/app/config.json
- ./s3-location-conf.json:/usr/src/app/locationConfig.json
ports:
- "7000:7000" # s3 server
- "9991:9991" # data store
- '7000:7000' # s3 server
- '9991:9991' # data store
15 changes: 8 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
roots: ["<rootDir>/src", "<rootDir>/tests"],
setupFiles: ["jest-plugin-context/setup"],
moduleFileExtensions: ["js", "ts", "d.ts"],
testResultsProcessor: "jest-sonar-reporter",
testMatch: ["**/*.*Test.ts"],
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src', '<rootDir>/tests'],
setupFiles: ['jest-plugin-context/setup'],
moduleFileExtensions: ['js', 'ts', 'd.ts'],
testResultsProcessor: 'jest-sonar-reporter',
testMatch: ['**/*.*Test.ts'],
collectCoverageFrom: ['!tests/**'],
};
Loading
Loading