Skip to content

Commit 0837647

Browse files
committed
feat(type-formatting): change stringQuotes default to double; fixes #1556
BREAKING CHANGE: Set `stringQuotes` option to `single` to restore old behavior
1 parent a361dc9 commit 0837647

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/rules/type-formatting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ is only one property-value object field present. Defaults to `false`.
187187
### <code>stringQuotes</code>
188188

189189
How string literals should be quoted (e.g., `"abc"`). Set to `single`
190-
or `double`. Defaults to 'single'.
190+
or `double`. Defaults to 'double'.
191191

192192
<a name="user-content-type-formatting-options-typebracketspacing"></a>
193193
<a name="type-formatting-options-typebracketspacing"></a>

src/rules.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3061,7 +3061,7 @@ export interface Rules {
30613061
separatorForSingleObjectField?: boolean;
30623062
/**
30633063
* How string literals should be quoted (e.g., `"abc"`). Set to `single`
3064-
* or `double`. Defaults to 'single'.
3064+
* or `double`. Defaults to 'double'.
30653065
*/
30663066
stringQuotes?: "double" | "single";
30673067
/**

src/rules/typeFormatting.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default iterateJsdoc(({
4343
postNewSpacing = ' ',
4444
// propertyQuotes = null,
4545
separatorForSingleObjectField = false,
46-
stringQuotes = 'single',
46+
stringQuotes = 'double',
4747
typeBracketSpacing = '',
4848
unionSpacing = ' ',
4949
} = context.options[0] || {};
@@ -790,7 +790,7 @@ is only one property-value object field present. Defaults to \`false\`.`,
790790
},
791791
stringQuotes: {
792792
description: `How string literals should be quoted (e.g., \`"abc"\`). Set to \`single\`
793-
or \`double\`. Defaults to 'single'.`,
793+
or \`double\`. Defaults to 'double'.`,
794794
enum: [
795795
'double',
796796
'single',

0 commit comments

Comments
 (0)