Javascript lint staged可以,但是git commit get错误 描述

Javascript lint staged可以,但是git commit get错误 描述,javascript,git,eslint,Javascript,Git,Eslint,当我直接使用lint staged命令时,一切正常,没有收到错误消息。但当我使用git commit时,它会提示我eslint报告错误而不生成任何信息 这是使用“git提交” husky > pre-commit (node v10.16.0) lint-staged:bin Running `lint-staged@9.4.2` +0ms lint-staged Loading config using `cosmiconfig` +0ms lint-staged Succe

当我直接使用lint staged命令时,一切正常,没有收到错误消息。但当我使用git commit时,它会提示我eslint报告错误而不生成任何信息

这是使用“git提交”

husky > pre-commit (node v10.16.0)
  lint-staged:bin Running `lint-staged@9.4.2` +0ms
  lint-staged Loading config using `cosmiconfig` +0ms
  lint-staged Successfully loaded config from `/Users/yckj2321/Documents/云从科技/frontends-js/package.json`:
  lint-staged { '*.{ts,js,md,css,html}':
  lint-staged    [ 'prettier  --write',
  lint-staged      './node_modules/.bin/eslint --fix',
  lint-staged      'git add' ] } +29ms
  lint-staged:cfg Validating config +0ms
Running lint-staged with the following config:
{
  '*.{ts,js,md,css,html}': [
    'prettier  --write',
    './node_modules/.bin/eslint --fix',
    'git add'
  ]
}
  lint-staged:run Running all linter scripts +0ms
  lint-staged:git Running git command [ 'rev-parse', '--show-toplevel' ] +0ms
  lint-staged:run Resolved git directory to be `/Users/yckj2321/Documents/云从科技/frontends-js` +75ms
  lint-staged:git Running git command [ 'diff', '--staged', '--diff-filter=ACMR', '--name-only' ] +74ms
  lint-staged:run Loaded list of staged files in git:
  lint-staged:run [ 'packages/cloudwalk-project-manage/postinstall.js' ] +31ms
  lint-staged:gen-tasks Generating linter tasks +0ms
  lint-staged:gen-tasks Generated task: 
  lint-staged:gen-tasks { pattern: '*.{ts,js,md,css,html}',
  lint-staged:gen-tasks   commands:
  lint-staged:gen-tasks    [ 'prettier  --write',
  lint-staged:gen-tasks      './node_modules/.bin/eslint --fix',
  lint-staged:gen-tasks      'git add' ],
  lint-staged:gen-tasks   fileList:
  lint-staged:gen-tasks    [ '/Users/yckj2321/Documents/云从科技/frontends-js/packages/cloudwalk-project-manage/postinstall.js' ] } +12ms
Stashing changes... [started]
  lint-staged:git Running git command [ 'status', '--porcelain' ] +54ms
Stashing changes... [skipped]
→ No partially staged files found...
Running tasks... [started]
Running tasks for *.{ts,js,md,css,html} [started]
  lint-staged:make-cmd-tasks Creating listr tasks for commands [ 'prettier  --write', './node_modules/.bin/eslint --fix', 'git add' ] +0ms
prettier  --write [started]
  lint-staged:task cmd: prettier +0ms
  lint-staged:task args: [ '--write',
  '/Users/yckj2321/Documents/云从科技/frontends-js/packages/cloudwalk-project-manage/postinstall.js' ] +0ms
  lint-staged:task execaOptions: { preferLocal: true, reject: false, shell: false } +0ms
prettier  --write [completed]
./node_modules/.bin/eslint --fix [started]
  lint-staged:task cmd: ./node_modules/.bin/eslint +461ms
  lint-staged:task args: [ '--fix',
  '/Users/yckj2321/Documents/云从科技/frontends-js/packages/cloudwalk-project-manage/postinstall.js' ] +0ms
  lint-staged:task execaOptions: { preferLocal: true, reject: false, shell: false } +0ms
./node_modules/.bin/eslint --fix [failed]
→ 
Running tasks for *.{ts,js,md,css,html} [failed]
→ 
Running tasks... [failed]



✖ ./node_modules/.bin/eslint --fix found some errors. Please fix them and try committing again.
husky > pre-commit hook failed (add --no-verify to bypass)
这只是“lint staged--debug”

猜测 我改变了“预提交”钩子,让它正常工作

"husky": {
    "hooks": {
      "pre-commit": "eslint --fix --debug /Users/yckj2321/Documents/云从科技/frontends-js/packages/cloudwalk-project-manage/postinstall.js",
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS -x @commitlint/config-conventional"
    }
  },
"husky": {
    "hooks": {
      "pre-commit": "eslint --fix --debug /Users/yckj2321/Documents/云从科技/frontends-js/packages/cloudwalk-project-manage/postinstall.js",
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS -x @commitlint/config-conventional"
    }
  },