-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(prettier) upgrade to prettier v3 (#10179)
Second attempt of #9077 now that Jest tests are holding us back thanks to @Josh-Walker-GM! 🚀 I've also included the changes in #9078. I'm pretty sure this isn't breaking but will be more thorough after CI passes.
- Loading branch information
Showing
49 changed files
with
463 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
- feat(prettier) upgrade to prettier v3 (#10179) by @jtoar | ||
|
||
This PR upgrades Redwood internally to Prettier v3. We believe this won't have any downstream effect for users. | ||
|
||
If you have Tailwind CSS configured, can upgrade `prettier-plugin-tailwindcss` to a version later than `0.4.1` if you make a few changes: | ||
|
||
- Change `prettier.config.js` to `prettier.config.mjs` (js -> mjs) | ||
- `export default` instead of `module.exports` | ||
- `await import('...')` any plugins instead of `require('...')` | ||
|
||
Here's an example of an updated `prettier.config.mjs` to work with `prettier-plugin-tailwindcss@^0.5.12`: | ||
|
||
```js | ||
// prettier.config.mjs | ||
|
||
export default { | ||
trailingComma: 'es5', | ||
bracketSpacing: true, | ||
tabWidth: 2, | ||
semi: false, | ||
singleQuote: true, | ||
arrowParens: 'always', | ||
overrides: [ | ||
{ | ||
files: 'Routes.*', | ||
options: { | ||
printWidth: 999, | ||
}, | ||
}, | ||
], | ||
tailwindConfig: './web/config/tailwind.config.js', | ||
plugins: [await import('prettier-plugin-tailwindcss')], | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.