-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
After updating to 3.1.0 with the default ternary formatting, Prettier is sometimes using spaces for indentation even if it's configured to use tabs.
Prettier 3.1.0
Playground link
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"semi": true,
"singleQuote": false,
"jsxSingleQuote": false,
"quoteProps": "as-needed",
"trailingComma": "all",
"singleAttributePerLine": false,
"htmlWhitespaceSensitivity": "css",
"vueIndentScriptAndStyle": false,
"proseWrap": "preserve",
"insertPragma": false,
"printWidth": 80,
"requirePragma": false,
"tabWidth": 2,
"useTabs": true,
"embeddedLanguageFormatting": "auto"
}Input:
const Blah = () => {
return (
<a
c={
loooooooooooooooooong
? alsolooooooong
? gaaaaaaaaa
: ggggggggg
? b
: c
: d
}
/>
);
}Output:
const Blah = () => {
return (
<a
c={
loooooooooooooooooong
? alsolooooooong
? gaaaaaaaaa
: ggggggggg
? b
: c
: d
}
/>
);
};Expected behavior:
It should always use tabs.
const Blah = () => {
return (
<a
c={
loooooooooooooooooong
? alsolooooooong
? gaaaaaaaaa
: ggggggggg
? b
: c
: d
}
/>
);
};so1ve and godzzo
Metadata
Metadata
Assignees
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.