adding auto config formatting the different folders

Viewed 135

I have a sample web project which has client and server, so before commit any files I have added husky to make the formatting changes, when I add it as script it works but when I do git add . and git commit its showing as

No staged files match any configured task.

What am I doing wrong here.

client package.json

 "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
      "prettier --write"
    ]
  },
  "devDependencies": {
    "husky": "^4.3.8",
    "lint-staged": "^12.3.1",
    "prettier": "^2.5.1",
  }

server package.json

   "husky": {
        "hooks": {
          "pre-commit": "lint-staged"
        }
      },
      "lint-staged": {
        "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
          "prettier --write"
        ]
      },
      "devDependencies": {
        "husky": "^4.3.8",
        "lint-staged": "^12.3.1",
        "prettier": "^2.5.1",
      }

What am I doing here wrong, any help is appreciated

1 Answers
Related