-
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.
changes env variable removes .eslintignore and updates .eslintrc.cjs removes eslint-config-standard-with-typescript, eslint-plugin-import, eslint-plugin-n and eslint-plugin-promise removes nodemon and changes ts-node to ts-node-dev updates lintstaged scripts adds nvmrc updates jest config adds jest setup file updates versions of dependencies, updates scripts and adds new meta tags to package.json updates tsconfig.json updates ci.yml (adds cache, updates versions and adds new steps) updates husky pre-commit adds new vscode settings fixes base path in alias-config moves sum.test.ts to tests folder
- Loading branch information
1 parent
38f974d
commit 1603eae
Showing
17 changed files
with
2,074 additions
and
4,687 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 |
---|---|---|
@@ -1 +1 @@ | ||
PORT= | ||
MY_SECRET_KEY= |
This file was deleted.
Oops, something went wrong.
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
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,27 +1,39 @@ | ||
name: ci | ||
on: [pull_request] | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
node-version: 'lts/iron' | ||
cache: 'npm' | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ runner.tool_cache }}/npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
run: npm i | ||
run: npm ci | ||
|
||
- name: Linting | ||
run: npm run lint | ||
|
||
- name: Testing | ||
run: npm run test:ci | ||
run: npm run test | ||
|
||
- name: Clean build folder | ||
run: rm -rf dist | ||
|
||
- name: Build | ||
run: npm run 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,4 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install lint-staged |
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,7 +1,14 @@ | ||
module.exports = { | ||
'*.{js,ts}': filenames => [ | ||
`npx prettier --write ${filenames.join(' ')} --writeclear`, | ||
`npx eslint --fix --ext .ts .`, | ||
`npm run test -- --findRelatedTests ${filenames.join(' ')} --passWithNoTests` | ||
const path = require('path') | ||
|
||
const buildCommand = (filenames) => { | ||
const files = filenames.map((f) => path.relative(process.cwd(), f)) | ||
return [ | ||
`npx prettier --write ${files.join(' --file ')}`, | ||
`npx eslint --fix ${files.join(' ')} --report-unused-disable-directives --max-warnings 0`, | ||
`npx jest --runInBand --findRelatedTests ${filenames.join(' ')} --passWithNoTests` | ||
] | ||
} | ||
|
||
module.exports = { | ||
'*.{js,ts}': [buildCommand] | ||
} |
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 @@ | ||
lts/iron |
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,3 +1,7 @@ | ||
{ | ||
"editor.formatOnSave": true | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"files.autoSave": "off", | ||
"git.autofetch": true, | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
Oops, something went wrong.