Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] npm run lint fails in Windows #3197

Closed
zengin opened this issue Jun 4, 2024 · 1 comment · Fixed by #3205
Closed

[BUG] npm run lint fails in Windows #3197

zengin opened this issue Jun 4, 2024 · 1 comment · Fixed by #3205
Assignees
Labels
bug Something isn't working

Comments

@zengin
Copy link

zengin commented Jun 4, 2024

Describe the bug
npm run lint fails with the following error in Windows:

PS > npm run lint

> [email protected] lint
> npm run lint:eslint && npm run lint:styles


> [email protected] lint:eslint
> eslint -c .eslintrc.js --quiet 'packages/*/src/**/*.ts'


Oops! Something went wrong! :(

ESLint: 8.57.0

No files matching the pattern "'packages/*/src/**/*.ts'" were found.
Please check for typing mistakes in the pattern.

To Reproduce

  1. Check out the repo on a Windows machine
  2. Run npm run lint and observe the error

Expected behavior
Linting works on a Windows machine.

Environment (please complete the following information):

  • OS: Windows 11

Additional context
cross-env npm package resolves this issue.

@musale
Copy link
Contributor

musale commented Jun 10, 2024

Hello @zengin, thank you for raising this issue. By default, we encourage development on mgt to use yarn. From this #2718, we leverage features of yarn like zero-install which improve collaboration by ensuring we have consistent dependencies, and you can easily switch between branches in development. Additional development level dependencies are discouraged. More information on development can be found here https://github.com/microsoftgraph/microsoft-graph-toolkit/wiki#setup-the-development-environment.

Lastly, I ran the project on Windows and ran yarn run lint. There was an error which I believe is because we are not escaping the \"path\to\files\" around file paths but using the single 'path\to\file' that works on Linux. I have put up a PR to fix this here #3205

@musale musale self-assigned this Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
2 participants