diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index cb637b8..68ef6bd 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -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() diff --git a/.github/workflows/prettier.yaml b/.github/workflows/prettier.yaml deleted file mode 100644 index a18dfee..0000000 --- a/.github/workflows/prettier.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Prettier Check - -on: - pull_request: - -jobs: - prettier: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: 18 - - - name: Install dependencies - run: npm install # npm install instead of npm ci is used to prevent unsupported platform errors due to the fsevents sub-dependency --no-optional - - - name: Run Prettier check - run: npx prettier --check . diff --git a/.github/workflows/sonar-scan.yaml b/.github/workflows/sonar-scan.yaml index 8f25836..9d68b9f 100644 --- a/.github/workflows/sonar-scan.yaml +++ b/.github/workflows/sonar-scan.yaml @@ -22,7 +22,7 @@ jobs: with: max-timeout: "900" polling-interval: "30" - exclude-workflow-names: "Integration Tests, Package Artifact Tests" + exclude-workflow-names: "Package Artifact Tests" exclude-workflow-ids: "" github-token: ${{ secrets.GITHUB_TOKEN }} env: @@ -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() diff --git a/.gitignore b/.gitignore index d20ba9a..42e5876 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ node_modules /coverage coverage.json .DS_Store -dist \ No newline at end of file +dist + +*report.json \ No newline at end of file diff --git a/package.json b/package.json index ff626fd..9b64915 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/decodeResult.ts b/src/decodeResult.ts index 8f82a0f..a0bb1f3 100644 --- a/src/decodeResult.ts +++ b/src/decodeResult.ts @@ -2,6 +2,8 @@ import { ReturnType } from './types' export type DecodedResult = BigInt | string +var unused = "unused" + export const decodeResult = ( resultHexstring: string, expectedReturnType: ReturnType,