reviewdog / action-eslint

Run eslint with reviewdog
https://github.com/marketplace?type=actions&query=reviewdog
MIT License
236 stars 63 forks source link

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

Open fl-increcio opened 2 years ago

fl-increcio commented 2 years ago

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

qschmick commented 1 year ago

I was having this issue also. I reran the install: yarn add babel-eslint -D