1

I have a react js application where i added husky with lint-staged. This is my lint staged config inside package.json file:

  "lint-staged": {
    "**/*.{js, ts, tsx}": [
      "yarn format"
    ]
  },

NOTE: if i run yarn lint-staged i get No staged files match any configured task., but if i run yarn format then it works.
If somebody faced this problem, why i get this error and how to fix this?

Asking
  • 3,487
  • 11
  • 51
  • 106

1 Answers1

2

The issue was related to lint staged configuration, i just removed the spaces after file extension:

  "lint-staged": {
    "**/*.{js,ts,tsx}": [
      "yarn format"
    ]
  },

This works fine.

Asking
  • 3,487
  • 11
  • 51
  • 106