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:
- Created 4 years ago
- Comments:32 (21 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
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. Butauto
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.