File tree Expand file tree Collapse file tree 4 files changed +6
-79
lines changed Expand file tree Collapse file tree 4 files changed +6
-79
lines changed Original file line number Diff line number Diff line change @@ -138,52 +138,6 @@ const { hasTypeScript } = await prompt({
138
138
} )
139
139
140
140
const supportedScriptLangs = { }
141
- // FIXME: Use a multi-select prompt
142
- // if (hasTypeScript) {
143
- // const { allowJsInVue } = await prompt({
144
- // type: 'toggle',
145
- // disabled: 'No',
146
- // enabled: 'Yes',
147
- // name: 'allowJsInVue',
148
- // message: `Do you use plain ${yellow('<script>')}s (without ${blue('lang="ts"')}) in ${green('.vue')} files?`,
149
- // initial: false
150
- // })
151
-
152
- // if (allowJsInVue) {
153
- // const { allowJsxInVue } = await prompt({
154
- // type: 'toggle',
155
- // disabled: 'No',
156
- // enabled: 'Yes',
157
- // name: 'allowJsxInVue',
158
- // message: `Do you use ${yellow('<script lang="jsx">')}s in ${green('.vue')} files (not recommended)?`,
159
- // initial: false
160
- // })
161
-
162
- // additionalConfig.extends = [
163
- // `@vue/eslint-config-${styleGuide}-with-typescript/${
164
- // allowJsxInVue
165
- // ? 'allow-jsx-in-vue'
166
- // : 'allow-js-in-vue'
167
- // }`
168
- // ]
169
- // } else {
170
- // const { allowTsxInVue } = await prompt({
171
- // type: 'toggle',
172
- // disabled: 'No',
173
- // enabled: 'Yes',
174
- // name: 'allowTsxInVue',
175
- // message: `Do you use ${yellow('<script lang="tsx">')}s in ${green('.vue')} files (not recommended)?`,
176
- // initial: false
177
- // })
178
-
179
- // if (allowTsxInVue) {
180
- // additionalConfig.extends = [
181
- // `@vue/eslint-config-${styleGuide}-with-typescript/allow-tsx-in-vue`
182
- // ]
183
- // }
184
- // }
185
- // }
186
-
187
141
// 5. Do you need Prettier to format your codebase?
188
142
const { needsPrettier } = await prompt ( {
189
143
type : 'toggle' ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const versionMap = thisPackage.devDependencies
6
6
7
7
// This is also used in `create-vue`
8
8
export default function createConfig ( {
9
- styleGuide = 'default' , // default ~~| airbnb | standard~~ only the default is supported for now
9
+ styleGuide = 'default' , // only the default is supported for now
10
10
11
11
hasTypeScript = false ,
12
12
needsPrettier = false ,
@@ -125,13 +125,11 @@ export default function createConfig({
125
125
)
126
126
}
127
127
128
- if ( styleGuide !== 'standard' || needsPrettier ) {
129
- // TODO:
130
- // I used renderEjsFile instead of readFileSync for simplicity and easier integration
131
- // with create-vue. But it's ugly.
132
- // Should refactor later, or move this project into create-vue.
133
- files [ '.gitattributes' ] = renderEjsFile ( './templates/_gitattributes' , { } )
134
- }
128
+ // TODO:
129
+ // I used renderEjsFile instead of readFileSync for simplicity and easier integration
130
+ // with create-vue. But it's ugly.
131
+ // Should refactor later, or move this project into create-vue.
132
+ files [ '.gitattributes' ] = renderEjsFile ( './templates/_gitattributes' , { } )
135
133
136
134
return {
137
135
pkg,
Original file line number Diff line number Diff line change @@ -4,14 +4,5 @@ indent_size = 2
4
4
indent_style = space
5
5
insert_final_newline = true
6
6
trim_trailing_whitespace = true
7
- <% _ if (styleGuide !== ' standard' || needsPrettier) { _% >
8
- < % #
9
- // standard doesn't have an opinion on line endings
10
- // https://github.com/standard/standard/issues/140
11
- // or maximum line length
12
- // https://github.com/standard/standard/issues/1559
13
- // Prettier enforces these things, though.
14
- % >
15
7
end_of_line = lf
16
8
max_line_length = 100
17
- < % _ } _%>
Original file line number Diff line number Diff line change 1
- <% _ if (styleGuide === ' airbnb' ) { _% >
2
- {
3
- " $schema" : " https://json.schemastore.org/prettierrc" ,
4
- " printWidth" : 100 ,
5
- " singleQuote" : true
6
- }
7
- < % _ } else if (styleGuide === ' standard' ) { _% >
8
- {
9
- " $schema" : " https://json.schemastore.org/prettierrc" ,
10
- " semi" : false ,
11
- " singleQuote" : true ,
12
- " jsxSingleQuote" : true ,
13
- " trailingComma" : " none"
14
- }
15
- < % _ } else { _% >
16
1
<% #
17
2
The default style follows the one used in the vuejs/ create- vue repository
18
3
< https: // github.com/vuejs/create-vue/blob/main/.prettierrc>
23
8
"singleQuote": true,
24
9
"printWidth": 100
25
10
}
26
- < % _ } _%>
You can’t perform that action at this time.
0 commit comments