Prettier on the Jest repo
See original GitHub issueNot sure if this issue is valid by itself, but I tried out prettier on the Jest repo and there are a number of issues that I found. Feel free to close this issue if it isn’t detailed enough or you aren’t planning on fixing any of these.
I ran:
node_modules/.bin/prettier --write "packages/*/src/**.js" --single-quote --trailing-comma --bracket-spacing=false --parser=flow
on the jest repo and got a bunch of lines that are longer than 80 characters. Examples:
return chalk.bold('No tests found') +
'\n' +
(data.total
? ` ${pluralize('file', data.total || 0, 's')} checked.\n` +
statsMessage
: `No files found in ${config.rootDir}.\n` +
`Make sure Jest's configuration does not exclude this directory.\n` +
`To set up Jest, make sure a package.json file exists.\n` +
`Jest Documentation: facebook.github.io/jest/docs/configuration.html`);
or:
const JASMINE_IGNORE = /^\s+at(?:(?:.*?vendor\/|jasmine\-)|\s+jasmine\.buildExpectationResult)/;
const STACK_TRACE_IGNORE = /^\s+at.*?jest(-.*?)?(\/|\\)(vendor|build|node_modules|packages)(\/|\\)/;
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (6 by maintainers)
Top Results From Across the Web
jest-runner-prettier - npm
A prettier runner for Jest. Latest version: 1.0.0, last published: 10 months ago. Start using jest-runner-prettier in your project by ...
Read more >keplersj/jest-runner-prettier - GitHub
Add it to your Jest config. Using Built-in Preset. This package includes a Jest preset which configures Jest to run Prettier on all...
Read more >Configuring Jest
Sets the path to the prettier node module used to update inline ... directory to be the root of your repo, the value...
Read more >Prettier · Opinionated Code Formatter
What is Prettier? An opinionated code formatter; Supports many languages; Integrates with most editors; Has few options ...
Read more >jest-runner-prettier - npm Package Health Analysis - Snyk
Further analysis of the maintenance status of jest-runner-prettier based on released npm versions cadence, the repository activity, and other data points ...
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
For years I’ve been using this style (cc @thymikee):
but prettier prefers:
which seems less readable in the common case.
Happy to start using it on parts of the codebase, though: https://github.com/facebook/jest/pull/2975