Add lint CI
All checks were successful
Lint / lint (18.x) (pull_request) Successful in 52s
Tests / cli_tests (18.x) (pull_request) Successful in 7m51s

This commit is contained in:
Prathamesh Musale 2024-01-25 18:30:26 +05:30
parent 71d1532826
commit 4282758c7e
3 changed files with 30 additions and 2 deletions

28
.gitea/workflows/lint.yml Normal file
View File

@ -0,0 +1,28 @@
name: Lint
on:
pull_request:
branches:
- '*'
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Download yarn
run: |
curl -fsSL -o /usr/local/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.21/yarn-1.22.21.js
chmod +x /usr/local/bin/yarn
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- name: Linter check
run: yarn lint

View File

@ -36,7 +36,7 @@
"yargs": "^17.4.1" "yargs": "^17.4.1"
}, },
"scripts": { "scripts": {
"test": "jest --runInBand --verbose test/*.test.ts", "test": "jest --runInBand --verbose test/cli.test.ts",
"lint": "eslint .", "lint": "eslint .",
"clean": "rm -rf ./dist", "clean": "rm -rf ./dist",
"build": "tsc", "build": "tsc",

View File

@ -97,7 +97,7 @@ export function getAuctionObj (params: { owner: string, status?: string }): any
}; };
} }
export function getBidObj(params: { bidder: string, status?: string }): any { export function getBidObj (params: { bidder: string, status?: string }): any {
return { return {
bidderAddress: params.bidder, bidderAddress: params.bidder,
status: params.status || 'commit', status: params.status || 'commit',