I'm following the first example (copy/paste) of custom config file (lint-staged.config.js) for lint-staged packaged from its github README without success. I get error Command failed with exit code 1.
always.
I tried this...
I have tried three things, for each case I had my lint-staged.config.js
in the root directory.
- package.json: result is
error Command failed with exit code 1.
"lint-staged": {
"packages/**/*.{ts,tsx}": [
"yarn lint-staged --config ./lint-staged.config.js"
]
},
- husky/pre-commit: result is
error Command failed with exit code 1.
npx lint-staged --config ../lint-staged.config.js
- cmd line: result is
error Command failed with exit code 1.
yarn lint-staged --config lint-staged.config.js
The problem
Im just looking for run a custom config file.
The problem is that the execution fails, the error message its related to the command but the command itself its correct as lint-staged [options]
(yarn/npx lint-staged -h) then to provide a custom config file it would as lint-staged [--config [path]]
but it fails (I even provide all kind of quotes for path).