action-eslint icon indicating copy to clipboard operation
action-eslint copied to clipboard

Use working directory of exec

Open StefanSchoof opened this issue 1 year ago • 5 comments

I have a monorepro, where my frontend is the folder frontend and only this is using eslint. I updated my .eslintrc.yml to support multiple projects:

parserOptions:
  project:
    - tsconfig.json
    - tsconfig.node.json

eslint is searching for this files relative to the working directory and not relative to the eslintrc, see https://github.com/typescript-eslint/typescript-eslint/issues/540. So with a project files and in a sub folder this action does not work.

I get this to work with setting the working dir (cwd) of the exec command. But this would be a breaking change for this action. I see multiple options:

  • Do not support project folder option of eslint
  • Make a breaking change and a new major version (There are more places that needs changing, eg. the path.ts)
  • Add a extra input to control the cwdof the exec

StefanSchoof avatar Sep 21 '23 06:09 StefanSchoof

Hi, Thanks for the PR. Yeah it would be great to get this fixed.

sibiraj-s avatar Sep 25 '23 05:09 sibiraj-s

So your wish is, that this gets fixed with a breaking change?

StefanSchoof avatar Sep 25 '23 06:09 StefanSchoof

I have the same issue, any updates?

stalkerg avatar May 10 '24 10:05 stalkerg

Sorry I missed this one. Yes @StefanSchoof its okay if there is a breaking change, unless no functionalities are removed.

I am happy to get this merged and publish a new major. @StefanSchoof are there any more pending changes?

sibiraj-s avatar May 12 '24 08:05 sibiraj-s

@sibiraj-s base on changes, it's doesn't remove any functionalities but now your .node_modules should be in work_dir folder. It's basically what I expected as well, but maybe some people can have issues.

stalkerg avatar May 13 '24 04:05 stalkerg