Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Garment eslint-runner is only running on a single file of each project when running with --files option #37

Closed
joaopedrodcf opened this issue Feb 16, 2021 · 0 comments · Fixed by #38

Comments

@joaopedrodcf
Copy link
Contributor

In our project, we use garment to show errors on precommit and we noticed that instead of showing all the errors it was showing only one error per project.

By doing two errors in the same project when we run

$ yarn garment lint project-1
yarn run v1.17.3
$ /Users/XXX/projects/XXX/node_modules/.bin/garment lint project-name-1
🧤 Garment v0.14.3


Projects in progress:
 HAS ERRORS  Project project-name-1 2 subtasks done

eslint error
             /Users/XXX/projects/XXX/project/name-1/src/layout/app.js
               55:19  error  Curly braces are unnecessary here  react/jsx-curly-brace-presence
               1 error and 0 warnings potentially fixable with the `--fix` option.

eslint error
             /Users/XXX/projects//XXX/project/name-1/src/modules/form/Form.js
               117:22  error  Curly braces are unnecessary here  react/jsx-curly-brace-presence
               1 error and 0 warnings potentially fixable with the `--fix` option.

Projects: 1 total
Tasks:    2 total

error Error: One or more errors occured during runners execution
          at handler (/Users/XXX/projects/XXX/node_modules/@garment/cli/lib/defaults.js:177:15)
          at async Object.handler (/Users/XXX/projects/XXX/node_modules/@garment/cli/lib/defaults.js:183:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

and then by running it with --files option containing both files that have eslint problems it only shows one of the errors

$ yarn garment lint --files /Users/XXX/projects/XXX/project/name-1/src/layout/app.js /Users/XXX/projects/XXX/project/name-1/src/modules/form/Form.js
yarn run v1.17.3
$ /Users/XXX/projects/XXX/node_modules/.bin/garment lint --files /Users/XXX/projects/XXX/project/name-1/src/layout/app.js /Users/XXX/projects/XXX/project/name-1/src/modules/form/Form.js
🧤 Garment v0.14.3

 HAS ERRORS  Project project-name-1 1 subtasks done

eslint error
             /Users/XXX/projects/XXX/project-name-1/src/layout/app.js
               55:19  error  Curly braces are unnecessary here  react/jsx-curly-brace-presence
               1 error and 0 warnings potentially fixable with the `--fix` option.

Projects: 1 total
Tasks:    1 total

error Error: One or more errors occured during runners execution
          at handler (/Users/XXX/projects/XXX/node_modules/@garment/cli/lib/defaults.js:177:15)
          at async Object.handler (/Users/XXX/projects/XXX/node_modules/@garment/cli/lib/defaults.js:183:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Can someone help me 🙏 ?

@joaopedrodcf joaopedrodcf changed the title Garment eslint-runner is only showing a single file of each project when running with --files option Garment eslint-runner is only running on a single file of each project when running with --files option Feb 16, 2021
beshanoe pushed a commit that referenced this issue Feb 16, 2021
@beshanoe beshanoe mentioned this issue Feb 16, 2021
1 task
beshanoe pushed a commit that referenced this issue Feb 16, 2021
beshanoe pushed a commit that referenced this issue Feb 17, 2021
beshanoe pushed a commit that referenced this issue Feb 17, 2021
beshanoe pushed a commit that referenced this issue Feb 18, 2021
beshanoe pushed a commit that referenced this issue Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant