All Questions
29
questions
0
votes
1
answer
31
views
Prettier on WebStorm triggers multiple compilations
I'm developing (an Angular application) using WebStorm.
I like using Prettier and I have set it up to automatically trigger on save.
This seems to apply Prettier after the file has been saved, which ...
0
votes
0
answers
126
views
How can I import WebStorm formatter config to VSCode Prettier?
I′m using VSCode & my co-worker use WebStorm. Our formatter behave differently and makes us confuse.
Is there a way to make both formatters behave the same?
How can I import WebStorm formatter ...
0
votes
0
answers
74
views
Prettier in WebStorm: Functions get unfolded
When I run Prettier all functions got unfolded. I have a large component which I would like to stay folded.
Is there any way to prevent this?
const calcPrintBalance = function (account) {
account....
2
votes
2
answers
5k
views
TypeError: prettierApi.resolveConfig.sync is not a function
I want to reformat with prettier, the error triggered after I press these keys:
This is the first several lines of the error
at PrettierPlugin.resolveConfig (/Applications/WebStorm.app/Contents/...
2
votes
1
answer
2k
views
Prettier-plugin-tailwindcss doesn't work in PhpStorm
I've followed the docs and prettier is installed and working but prettier-plugin-tailwindcss doesn't seem to work, at least when I reformat with Prettier, no Tailwind classes are sorted.
.prettierrc....
2
votes
0
answers
2k
views
Prettier bracketSpacing not working at all
WebStorm.
prettier.config.js:
module.exports = {
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
printWidth: 80,
embeddedLanguageFormatting: 'auto',
jsxBracketSameLine: true,...
1
vote
1
answer
1k
views
ESLint and Prettier conflict in WebStorm
In my project we use both ESLint and Prettier for code and seems they conflict with each other.
Here is the Prettier configuration in .prettierrc file :
{
"endOfLine": "auto",
&...
3
votes
2
answers
3k
views
Is there any way to remove extra white space in JSX classname strings?
I'm using React and Tailwind in WebStorm. How can I configure ESLint or Prettier to automatically remove the extra whitespace between 'text-3xl' and 'font-bold' in the JSX classname string below?
<...
0
votes
0
answers
174
views
WebStorm + Prettier setting that keeps putting my HTML into one line
I'm trying to set up Prettier to run every time I save but I can't seem to find a certain setting.
export default function RaisedContainer({ children }: IProps) {
return (
<div>
{...
0
votes
2
answers
4k
views
WebStorm: use .prettierrc configurations for formatting
In WebStorm I want to use my custom configuration from .prettierrc file for code formatting.
It can change by the time I want to sync.
For example pressing Ctrl + Alt + P and Ctrl + Alt + L let my ...
1
vote
0
answers
195
views
How to prevent wrapping of parentheses around elements in JSX
How to prevent wrapping components by parentheses in JSX?
My desired form of component:
return <Component />
But it becomes like below:
return (
<Component />
)
I using WebStorm IDE, ...
11
votes
5
answers
6k
views
Format with Prettier on save doesn't work in WebStorm 2022.2.2
I installed everything like in official tutorial https://www.jetbrains.com/help/webstorm/prettier.html#ws_prettier_reformat_code and it doesn't work on save, although the checkbox is set.
What can I ...
1
vote
0
answers
856
views
WebStorm Reformat Code (Prettier) does format the same as `prettier --write .`
I am working on a code base (TS) where prettier --write . should be run before each commit.
However I am using Reformat Code action in WebStorm to run Prettier which is more convenient. Using this ...
1
vote
1
answer
195
views
Correctly format unpacked object properties of function parameters in the IDE JetBrains WebStorm
I use the the IDE PhpStorm from JetBrains, which also includes WebStorm.
When coding a React/Next.js app it's offen necessary to unpack object properties of function parameters.
But currently the IDE ...
0
votes
1
answer
981
views
WebStorm equivalent folder configurations as VSCode ".vscode" folder?
I have a repository with prettier package installed. I have configured the repository in VSCode to be formatted by Prettier with each save action on any file.
I want to do the same thing in WebStorm ...