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.

Cannot run lint or test suite; always fails on lint:prettier

See original GitHub issue
  • Operating System: Windows 10
  • Node Version: 10.x
  • NPM Version: 9.6
  • webpack Version: -
  • mini-css-extract-plugin Version: -

Expected Behavior

When developing a pull request and using npm run lint or npm run test the linter or full test suite is run and reports correct results without false positives.

Actual Behavior

When the lint:prettier task is hit, it results in all scanned files being marked as modified - even though they are not.

How Do We Reproduce?

Check out the plugin’s repository on a Windows system. Do not make any code changes. Only execute npm run lint or npm run test. Watch the lint:prettier task still generate a long list of differences and then exit with error code 1, blocking the remainder of the linting or test suite from running.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:32 (21 by maintainers)

github_iconTop GitHub Comments

3reactions
alexander-akaitcommented, Jul 22, 2019

There are a lot of guide for for beginners about organization repos, please read them before you start arguing, it makes no constructive thoughts. Also you can send a PR in free style and when fix problem based on CI report or you can leave as is and ask the contributors to fix it, because you can’t do it yourself, there is nothing shameful

1reaction
ThiefMastercommented, Jul 22, 2019

I have no idea what the issue is but I think eol=lf makes lots of sense for text/code files. If you really need crlf for some files, then override those specifically. But auto uses whatever line ending the OS uses, so that doesn’t seem like a good choice unless someone uses an editor that doesn’t work well with different line endings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Don't just lint your code - fix it with Prettier - freeCodeCamp
When using these in practice, your best bet is to always run format first to let it try to automatically fix anything it...
Read more >
How to configure lint-staged to run eslint and prettier scripts
Just use prettier --write -u and eslint --fix when you're running lint-staged, don't run your custom scripts otherwise the globs with ...
Read more >
Using Prettier and ESLint to automate formatting and fixing ...
Methods for linting and pretty-printing your code; Remove conflicting rules and run serially; Run Prettier followed by ESLint programmatically ...
Read more >
How to Prevent Accidental Code Errors with ESLint, Prettier ...
The easiest one is to add the appropriate script to the package.json file, then run it with the nam run lint command.
Read more >
Pre-commit Hook - Prettier
Use Case: Useful for when you want to use other code quality tools along with Prettier (e.g. ESLint, Stylelint, etc.) or if you...
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