AriPerkkio / eslint-remote-tester

CLI tool for testing given ESlint rules against multiple repositories at once.
https://www.npmjs.com/package/eslint-remote-tester
129 stars 10 forks source link

doesn't work as expected #543

Closed andriyor closed 3 months ago

andriyor commented 3 months ago

testing on this repo https://github.com/staeco/iris-ql

rules works by installing them directly on project

image

but i don't have any errors with eslint-remote-tester

image

repo: https://github.com/andriyor/eslint-remote-tester-example/blob/main/eslint-remote-tester.config.js

AriPerkkio commented 3 months ago

Does adding rulesUnderTesting: (ruleId: string) => true help?

https://github.com/AriPerkkio/eslint-remote-tester/blob/dd0d3056fba0f2efb15362a810433a7c29511a97/README.md?plain=1#L94

By default only ESLint rule crashes are reported. Using rulesUnderTesting you can filter which rule errors should be reported as well.

andriyor commented 3 months ago

thanks, it helped now i see how many errors have each repo, but how can i see error logs to understand which rule failed and file path?

AriPerkkio commented 3 months ago

There should be ./eslint-remote-tester-results written after run.

https://github.com/AriPerkkio/eslint-remote-tester/blob/dd0d3056fba0f2efb15362a810433a7c29511a97/README.md?plain=1#L111-L113

andriyor commented 3 months ago

Ohh, thank you, sorry for bothering Do you have some kind of API to use this tool programmatically?

AriPerkkio commented 3 months ago

There's onComplete that can be used to get access to the results after run is finished. Does this work for you?

https://github.com/AriPerkkio/eslint-remote-tester/blob/dd0d3056fba0f2efb15362a810433a7c29511a97/README.md?plain=1#L104

Example arguments that are passed there:

https://github.com/AriPerkkio/eslint-remote-tester/blob/dd0d3056fba0f2efb15362a810433a7c29511a97/docs/onComplete-arguments.json#L2-L23