Skip to content

Commit eb17ac8

Browse files
author
Damian Sznajder
committed
chore: disable prettier by default
1 parent 3cd5f97 commit eb17ac8

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

package.json

+1-16
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"properties": {
6666
"reactSnippets.settings.prettierEnabled": {
6767
"type": "boolean",
68-
"markdownDescription": "Integrate prettier settings with code generated from snippets.",
68+
"markdownDescription": "[EXPERIMENTAL: MIGHT NOT WORK]: Integrate prettier settings with code generated from snippets.",
6969
"default": false
7070
},
7171
"reactSnippets.settings.importReactOnTop": {
@@ -78,21 +78,6 @@
7878
"markdownDescription": "Controls if React components have typescript Props typing.",
7979
"default": true
8080
},
81-
"reactSnippets.settings.semiColons": {
82-
"type": "boolean",
83-
"markdownDescription": "Controls if snippets should use semi colons.\nOnly applies when `#reactSnippets.settings.prettierEnabled#` is disabled",
84-
"default": false
85-
},
86-
"reactSnippets.settings.singleQuote": {
87-
"type": "boolean",
88-
"markdownDescription": "Controls if snippets should use single quotes.\nOnly applies when `#reactSnippets.settings.prettierEnabled#` is disabled",
89-
"default": true
90-
},
91-
"reactSnippets.settings.tabWidth": {
92-
"type": "number",
93-
"markdownDescription": "Controls how many spaces snippets will have.\nOnly applies when `#reactSnippets.settings.prettierEnabled#` is disabled",
94-
"default": 2
95-
},
9681
"reactSnippets.settings.languageScopes": {
9782
"type": "string",
9883
"markdownDescription": "defines the language scopes for which the snippets will be available.\nUse comma separated values.\nFor example: `typescript,typescriptreact,javascript,javascriptreact`",

src/helpers/extensionConfig.ts

-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ import { workspace } from 'vscode';
33
export type ExtensionSettings = {
44
languageScopes: string;
55
prettierEnabled: boolean;
6-
semiColons: boolean;
76
importReactOnTop: boolean;
8-
singleQuote: boolean;
97
typescript: boolean;
10-
tabWidth: number;
118
typescriptPropsStatePrefix: 'type' | 'interface';
129
};
1310

src/helpers/getPrettierConfig.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@ prettier
88
.then((config) => (prettierConfig = config));
99

1010
const getPrettierConfig = (): Options => {
11-
const { semiColons, singleQuote, tabWidth, prettierEnabled } =
12-
extensionConfig();
11+
const { prettierEnabled } = extensionConfig();
1312

1413
return {
1514
parser: 'typescript',
16-
semi: semiColons,
17-
singleQuote,
18-
tabWidth,
1915
...(prettierEnabled && prettierConfig),
2016
};
2117
};

0 commit comments

Comments
 (0)