Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c00d619

Browse files
refactor: remove style-guide related code as we don't support this feature anymore
1 parent 92b1e61 commit c00d619

File tree

4 files changed

+6
-79
lines changed

4 files changed

+6
-79
lines changed

‎bin/create-eslint-config.js‎

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -138,52 +138,6 @@ const { hasTypeScript } = await prompt({
138138
})
139139

140140
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-
187141
// 5. Do you need Prettier to format your codebase?
188142
const { needsPrettier } = await prompt({
189143
type: 'toggle',

‎index.js‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const versionMap = thisPackage.devDependencies
66

77
// This is also used in `create-vue`
88
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
1010

1111
hasTypeScript = false,
1212
needsPrettier = false,
@@ -125,13 +125,11 @@ export default function createConfig({
125125
)
126126
}
127127

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', {})
135133

136134
return {
137135
pkg,

‎templates/_editorconfig.ejs‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,5 @@ indent_size = 2
44
indent_style = space
55
insert_final_newline = true
66
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-
%>
157
end_of_line = lf
168
max_line_length = 100
17-
<%_ } _%>

‎templates/_prettierrc.json.ejs‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
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 { _%>
161
<%#
172
The default style follows the one used in the vuejs/create-vue repository
183
<https://github.com/vuejs/create-vue/blob/main/.prettierrc>
@@ -23,4 +8,3 @@
238
"singleQuote": true,
249
"printWidth": 100
2510
}
26-
<%_ } _%>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /