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 no longer requires the "git add" command #6017

Closed
wants to merge 1 commit into from
Closed

lint-staged no longer requires the "git add" command #6017

wants to merge 1 commit into from

Conversation

JoseGoncalves
Copy link

@JoseGoncalves JoseGoncalves commented Oct 28, 2020

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:
Since v10 lint-staged does not require to add the git add command.
Additional info: lint-staged/lint-staged#775

@sodatea
Copy link
Member

sodatea commented Oct 28, 2020

The current lint-staged used by Vue CLI is still at 9.x. So I'm afraid we'll have to keep the documentation as-is until we've got the time to update the dependencies.

@JoseGoncalves
Copy link
Author

If that is the case, I think the documentation should be updated indicating that the user shoud install v9 of lint-staged, i.e., add some note to execute in his project:

$ npm i -D lint-staged@9

otherwise, a user will install the latest version (v10), and will receive a warning on every commit of .vue or .js files:

 > running pre-commit hook: lint-staged
⚠ Some of your tasks use `git add` command. Please remove it from the config since all modifications made by tasks will be automatically added to the git commit index.

@JoseGoncalves JoseGoncalves changed the title lint-staged no longer requires the "git add" task lint-staged no longer requires the "git add" command Oct 29, 2020
@sodatea
Copy link
Member

sodatea commented Dec 18, 2020

Fixed in #6136

@sodatea sodatea closed this Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants