question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicated errors

See original GitHub issue

@okonet thank you for the package.

I got duplicates in output while trying to use link-staged with husky, here’s my config:

 "scripts": {
    "precommit": "lint-staged"
  },
  "lint-staged": {
    "gitDir": "../../",
    "linters": {
      "app/front-end/src/**/*.{js,jsx}": "eslint --quiet"
    }
  },

Output:


> husky - npm run -s precommit

[?25l[13:18:41] Running tasks for app/front-end/src/**/*.{js,jsx} [started]
[13:18:41] eslint --quiet [started]
[13:18:42] eslint --quiet [failed]
[13:18:42] → 🚫 eslint --quiet found some errors. Please fix them and try committing again.


/path/app/front-end/src/redux/actions/facebook.js
  32:24  error  'createAcffgtion' is not defined  no-undef

✖ 1 problem (1 error, 0 warnings)


[13:18:42] Running tasks for app/front-end/src/**/*.{js,jsx} [failed]
[13:18:42] → 🚫 eslint --quiet found some errors. Please fix them and try committing again.


/path/app/front-end/src/redux/actions/facebook.js
  32:24  error  'createAcffgtion' is not defined  no-undef

✖ 1 problem (1 error, 0 warnings)


[?25h🚫 eslint --quiet found some errors. Please fix them and try committing again.


/path/app/front-end/src/redux/actions/facebook.js
  32:24  error  'createAcffgtion' is not defined  no-undef

✖ 1 problem (1 error, 0 warnings)


[?25h
> husky - pre-commit hook failed (add --no-verify to bypass)
> husky - to debug, use 'npm run precommit'

Looks like lint-staged and husky both output the same error. Here I got 2 errors from lint-staged and one from husky.

Can we add some --silent option for lint-staged? So it would not output the errors, but throw them forward to husky (I also use husky for another lintings).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:11
  • Comments:31 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
JonKronecommented, Oct 6, 2017

Great, I’ll work on a PR with tests and all that this weekend. I want to know more about the TTY distinction and why it thinks my output channel isn’t a TTY.

0reactions
okonetcommented, Oct 5, 2017

@JonKrone If it solves it please go for it. Lint-staged can’t be used on CI, so we won’t have any problem with overriding it I think. The only place where we use verbose renderer is tests but we must set it explicitly I think.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Widespread false gene gains caused by duplication errors in ...
Whole genome alignments revealed that 4 to 16% of the sequences are falsely duplicated in the previous assemblies, impacting hundreds to ...
Read more >
Data Duplication – A serious concern with an easy solution
Data duplication is not only a totally unnecessary waste of time but also has the potential to cause major problems and costly mistakes....
Read more >
Diagnose and remediate duplicated attribute sync errors
This document describes the diagnosis process of duplicated attribute synchronization errors and a potential fix of the orphaned object ...
Read more >
Duplicate medication order errors - Patient Safety Network
Duplicate medication orders, defined as orders for two or more identical medications or same therapeutic class, can result in serious complications if they ......
Read more >
A single error is duplicated in the error list. Only one of the ...
There is an error that appears duplicated in the errors list (same error code, same description, same file, same line). Only one of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found