Skip to content

Fix Build, Test and Deploy #3

@RelativeSure

Description

@RelativeSure
run npm run lint
  npm run lint
  shell: /usr/bin/bash -e {0}
  env:
    REGISTRY: ghcr.io
    GO_VERSION: 1.23.0
    NODE_VERSION: 20

> secure-notes-frontend@1.0.0 lint
> eslint src --ext .js,.jsx,.ts,.tsx


Oops! Something went wrong! :(

ESLint: 9.34.0

TypeError: Key "rules": Key "@typescript-eslint/prefer-const": Could not find "prefer-const" in plugin "@typescript-eslint". Did you mean "@/prefer-const"?
    at throwRuleNotFoundError (/home/runner/work/notes/notes/frontend/node_modules/eslint/lib/config/config.js:100:16)
    at Config.validateRulesConfig (/home/runner/work/notes/notes/frontend/node_modules/eslint/lib/config/config.js:603:5)
    at new Config (/home/runner/work/notes/notes/frontend/node_modules/eslint/lib/config/config.js:484:9)
    at [finalizeConfig] (/home/runner/work/notes/notes/frontend/node_modules/eslint/lib/config/flat-config-array.js:212:10)
    at FlatConfigArray.getConfigWithStatus (/home/runner/work/notes/notes/frontend/node_modules/@eslint/config-array/dist/cjs/index.cjs:1404:55)
    at FlatConfigArray.getConfig (/home/runner/work/notes/notes/frontend/node_modules/@eslint/config-array/dist/cjs/index.cjs:1422:15)
    at entryFilter (/home/runner/work/notes/notes/frontend/node_modules/eslint/lib/eslint/eslint-helpers.js:322:27)
    at async NodeHfs.<anonymous> (file:///home/runner/work/notes/notes/frontend/node_modules/@humanfs/core/src/hfs.js:574:24)
    at async NodeHfs.walk (file:///home/runner/work/notes/notes/frontend/node_modules/@humanfs/core/src/hfs.js:614:3)
    at async globSearch (/home/runner/work/notes/notes/frontend/node_modules/eslint/lib/eslint/eslint-helpers.js:363:20)
Error: Process completed with exit code 2.
Run golangci/golangci-lint-action@v4
  with:
    version: latest
    working-directory: backend
    args: --timeout=5m
    github-token: ***
    only-new-issues: false
    skip-cache: false
    skip-pkg-cache: false
    skip-build-cache: false
    install-mode: binary
  env:
    REGISTRY: ghcr.io
    GO_VERSION: 1.23.0
    NODE_VERSION: 20
prepare environment
  Checking for go.mod: backend/go.mod
  Warning: Failed to restore: Cache service responded with 400
  Cache not found for input keys: golangci-lint.cache-2905-3767602bf877288ed3c260527050a152037c258a, golangci-lint.cache-2905-
  Finding needed golangci-lint version...
  Requested golangci-lint 'latest', using 'v1.64.8', calculation took 121ms
  Installation mode: binary
  Installing golangci-lint binary v1.64.8...
  Downloading binary https://github.com/golangci/golangci-lint/releases/download/v1.64.8/golangci-lint-1.64.8-linux-amd64.tar.gz ...
  /usr/bin/tar xz --overwrite --warning=no-unknown-keyword --overwrite -C /home/runner -f /home/runner/work/_temp/faa4b284-8556-48a9-baf4-10bdab00f0cd
  Installed golangci-lint into /home/runner/golangci-lint-1.64.8-linux-amd64/golangci-lint in 764ms
  Prepared env in 1008ms
run golangci-lint
  Running [/home/runner/golangci-lint-1.64.8-linux-amd64/golangci-lint run --out-format=github-actions --path-prefix=backend --timeout=5m] in [/home/runner/work/notes/notes/backend] ...
  backend/main.go:1: : # secure-notes [secure-notes.test]
  Error: ./notes_test.go:7:2: "encoding/base64" imported and not used
  Error: ./notes_test.go:362:11: undefined: pgxpool
  Error: ./notes_test.go:732:9: undefined: fmt
  Error: ./main_test.go:10:2: "net/http" imported and not used
  Error: ./main_test.go:13:2: "strings" imported and not used
  Error: ./security_test.go:5:2: "context" imported and not used (typecheck)
  // main.go - Complete secure backend with automatic PostgreSQL setup
  
  level=warning msg="[config_reader] The configuration option `run.skip-files` is deprecated, please use `issues.exclude-files`."
  level=warning msg="[config_reader] The configuration option `run.skip-dirs` is deprecated, please use `issues.exclude-dirs`."
  level=warning msg="[config_reader] The configuration option `output.uniq-by-line` is deprecated, please use `issues.uniq-by-line`"
  level=warning msg="[config_reader] The configuration option `output.format` is deprecated, please use `output.formats`"
  level=warning msg="[lintersdb] The linter \"exhaustivestruct\" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle"
  level=warning msg="[lintersdb] The linter \"golint\" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle"
  level=warning msg="[lintersdb] The linter \"interfacer\" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle"
  level=warning msg="[lintersdb] The linter \"maligned\" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle"
  level=warning msg="[lintersdb] The linter \"nosnakecase\" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle"
  level=warning msg="[lintersdb] The linter \"scopelint\" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle"
  level=warning msg="[lintersdb] The name \"goerr113\" is deprecated. The linter has been renamed to: err113."
  level=warning msg="The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar."
  level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner. "
  level=warning msg="The linter 'gomnd' is deprecated (since v1.58.0) due to: The linter has been renamed. Replaced by mnd."
  level=warning msg="The linter 'tenv' is deprecated (since v1.64.0) due to: Duplicate feature in another linter. Replaced by usetesting."
  level=error msg="[linters_context] execinquery: This linter is fully inactivated: it will not produce any reports."
  level=error msg="[linters_context] exportloopref: This linter is fully inactivated: it will not produce any reports."
  level=error msg="[linters_context] gomnd: This linter is fully inactivated: it will not produce any reports."
  
  Error: issues found
  Ran golangci-lint in 75112ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions