Skip to content

Get "Cannot read property 'rulesMeta' of undefined" when using eslint-formatter-rdjson #150

@fl-increcio

Description

@fl-increcio

Hello,

I am setting up a github action using reviewdog/action-eslint@v1, but I'm stuck on this error :

Cannot read property 'rulesMeta' of undefined
  TypeError: Cannot read property 'rulesMeta' of undefined
      at /home/runner/work/_actions/reviewdog/action-eslint/v1/eslint-formatter-rdjson/index.js:162:22
      at Array.forEach (<anonymous>)
      at /home/runner/work/_actions/reviewdog/action-eslint/v1/eslint-formatter-rdjson/index.js:150:21
      at Array.forEach (<anonymous>)
      at module.exports (/home/runner/work/_actions/reviewdog/action-eslint/v1/eslint-formatter-rdjson/index.js:146:11)
      at printResults (/home/runner/work/test-th/test-th/node_modules/eslint/lib/cli.js:91:20)
      at Object.execute (/home/runner/work/test-th/test-th/node_modules/eslint/lib/cli.js:201:17)
      at Object.<anonymous> (/home/runner/work/test-th/test-th/node_modules/eslint/bin/eslint.js:74:28)
      at Module._compile (internal/modules/cjs/loader.js:1085:14)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
  reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token 

Maybe we could check if 'data' is not null in this condition.

image

in eslint-formatter-rdjson\index.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions