Skip to content

Commit

Permalink
[FUN-843] Add ESlinter and its reporting to Sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
chudilka1 committed Oct 11, 2023
1 parent ec57244 commit 017fbae
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: yarn install --frozen-lockfile

- name: Run ESLint
run: yarn lint:check
run: yarn lint:check -f json -o eslint-report.json

- name: Upload ESLint report
if: always()
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/prettier.yaml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/sonar-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ jobs:
echo "sonarqube_coverage_report_paths=$(find -type f -name 'lcov.info' -printf "%p,")" >> $GITHUB_OUTPUT
echo "sonarqube_eslint_report_paths=$(find -type f -name 'eslint-report.json' -printf "%p")" >> $GITHUB_OUTPUT
# TODO: uncomment when ESLint report is available
# - name: Update ESLint report symlinks
# continue-on-error: true
# run: sed -i 's+/home/runner/work/universal-adapter-sandbox/universal-adapter-sandbox/+/github/workspace/+g' ${{ steps.sonarqube_report_paths.outputs.sonarqube_eslint_report_paths }}
- name: Update ESLint report symlinks
continue-on-error: true
run: sed -i 's+/home/runner/work/functions-toolkit/functions-toolkit/+/github/workspace/+g' ${{ steps.sonarqube_report_paths.outputs.sonarqube_eslint_report_paths }}

- name: SonarQube Scan
if: always()
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"test:package": "jest --config jest.config.package.js",
"prettier:check": "prettier --check . && tsc --noEmit",
"prettier:fix": "npx prettier -w .",
"lint:fix": "eslint --fix",
"lint:check": "eslint \"/src/**/*.ts\" --max-warnings=0 -f json -o eslint-report.json"
"lint:fix": "eslint . --fix",
"lint:check": "eslint --ext js,jsx,ts,tsx ."
},
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions src/decodeResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { ReturnType } from './types'

export type DecodedResult = BigInt | string

var unused = "unused"

export const decodeResult = (
resultHexstring: string,
expectedReturnType: ReturnType,
Expand Down

0 comments on commit 017fbae

Please sign in to comment.