Skip to content

Commit

Permalink
Comment lintstagedrc properly so we know how and why it is there and …
Browse files Browse the repository at this point in the history
…the process for removing it in the future
  • Loading branch information
thesunny committed Jul 9, 2021
1 parent f4168e2 commit e79f238
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
const escape = require('shell-quote').quote

/**
* Need this to fix a bug where we can't commit `pages/examples/[example].tsx`.
* Need this to fix a bug where we can't commit this:
*
* `pages/examples/[example].tsx`.
*
* because of the square brackets `[` and `]`.
*
* <https://github.com/okonet/lint-staged/issues/676#issuecomment-574764713>
*
* NOTE:
*
* We can remove this entire file if/when we upgrade to Prettier 2+ where this
* is no longer necessary according to the `lint-staged` issue.
* is no longer necessary according to the `lint-staged` issue shown above.
*
* Currently, the same configuration without the escaping of the filename
* still exists in `package.json` but this takes precedence over that.
*
* Once this file is removed, `package.json` configuration will be used.
*/

module.exports = {
Expand Down

0 comments on commit e79f238

Please sign in to comment.