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

Lint-staged assumes you have 10up-toolkit installed globally #220

Open
1 task done
johnwatkins0 opened this issue Mar 15, 2024 · 2 comments
Open
1 task done

Lint-staged assumes you have 10up-toolkit installed globally #220

johnwatkins0 opened this issue Mar 15, 2024 · 2 comments
Labels

Comments

@johnwatkins0
Copy link
Member

Describe the bug

In a fresh clone of the scaffold, on a newish laptop where I have never installed 10up-toolkit globally, my initial commit fails because the commands in .lintstagedrc.json assume 10up-toolkit is available globally. I'm not sure this repository should assume 10up-toolkit is available globally, and I think it's a better practice to use the local copy of the script anyway so that the lintstaged results are aligned with the results in your code editor and CI processes.

Steps to Reproduce

  1. Clone the repo in an environment where 10up-toolkit is not installed globally
  2. npm install to set up husky and lint-staged
  3. Run a commit and see the errors
  4. Install 10up-toolkit globally, commit again, and see that 10up-toolkit runs as expected (with linting errors as of today, but that's a separate issue)

Screenshots, screen recording, code snippet

No response

Environment information

Node 20 / NPM 10

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nicholasio
Copy link
Member

Has anyone else being able to reproduce this?

@darylldoyle
Copy link
Collaborator

darylldoyle commented Apr 3, 2024

@nicholasio I haven't been able to replicate this either. My version always uses the local version as I don't have it installed globally 🤔

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants