renovate #32

Merged
root merged 1 commits from renovate into master 2025-03-13 07:08:17 +00:00
Contributor

npm

lint-staged

  • ^15.4.3 => ^15.5.0 (dvf)

Minor Changes

  • #1526 630af5f Thanks @iiroj! - Lint-staged no longer resets to the original state when preventing an empty git commit. This happens when your configured tasks reset all the staged changes, typically when trying to commit formatting changes which conflict with your linter setup like ESLint or Prettier.

    Example with Prettier

    By default Prettier prefers double quotes.

    Previously

    1. Stage file.js with only double quotes " changed to '
    2. Run git commit -am "I don't like double quotes"
    3. Lint-staged runs prettier --write file.js, converting all the ' back to "
    4. Because there are now no changes, lint-staged fails, cancels the commit, and resets back to the original state
    5. Commit was not done, original state is restored and single quotes ' are staged

    Now

    1. Stage file.js with only double-quotes " changed to '
    2. Run git commit -am "I don't like double quotes"
    3. Lint-staged runs prettier --write file.js, converting all the ' back to "
    4. Because there are now no changes, lint-staged fails and cancels the commit
    5. Commit was not done, and there are no staged changes
<h1>npm</h1> <h2>lint-staged</h2> <ul> <li> ^15.4.3 => ^15.5.0 (dvf)</li> </ul> > <h3>Minor Changes</h3> > <ul> > <li><p><a href="https://github.com/lint-staged/lint-staged/pull/1526">#1526</a> <a href="https://github.com/lint-staged/lint-staged/commit/630af5fb48ed43eb6ccaefa7a9d9612309023b6f"><code>630af5f</code></a> Thanks <a href="https://github.com/iiroj">@iiroj</a>! - Lint-staged no longer resets to the original state when preventing an empty git commit. This happens when your configured tasks reset all the staged changes, typically when trying to commit formatting changes which conflict with your linter setup like ESLint or Prettier.</p> > <h3>Example with Prettier</h3> > <p>By default Prettier <a href="https://prettier.io/docs/rationale#strings">prefers double quotes</a>.</p> > <h4>Previously</h4> > <ol> > <li>Stage <code>file.js</code> with only double quotes <code>&quot;</code> changed to <code>&#39;</code></li> > <li>Run <code>git commit -am &quot;I don&#39;t like double quotes&quot;</code></li> > <li><em>Lint-staged</em> runs <code>prettier --write file.js</code>, converting all the <code>&#39;</code> back to <code>&quot;</code></li> > <li>Because there are now no changes, <em>lint-staged</em> fails, cancels the commit, and resets back to the original state</li> > <li>Commit was not done, original state is restored and single quotes <code>&#39;</code> are staged</li> > </ol> > <h4>Now</h4> > <ol> > <li>Stage <code>file.js</code> with only double-quotes <code>&quot;</code> changed to <code>&#39;</code></li> > <li>Run <code>git commit -am &quot;I don&#39;t like double quotes&quot;</code></li> > <li><em>Lint-staged</em> runs <code>prettier --write file.js</code>, converting all the <code>&#39;</code> back to <code>&quot;</code></li> > <li>Because there are now no changes, <em>lint-staged</em> fails and cancels the commit</li> > <li>Commit was not done, and there are no staged changes</li> > </ol> > </li> > </ul>
m.schnitzler added 1 commit 2025-03-13 05:46:43 +00:00
root merged commit 803bc2e35c into master 2025-03-13 07:08:17 +00:00
root referenced this issue from a commit 2025-03-13 07:08:18 +00:00
root deleted branch renovate 2025-03-13 07:08:21 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: root/dvf#32
No description provided.