We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ef4e48 commit bebba95Copy full SHA for bebba95
index.ts
@@ -120,6 +120,7 @@ async function init() {
120
argv.nightwatch ??
121
argv.playwright ??
122
argv.eslint ??
123
+ argv['eslint-with-prettier'] ??
124
(argv.devtools || argv['vue-devtools'])
125
) === 'boolean'
126
@@ -463,6 +464,7 @@ async function init() {
463
464
needsPrettier,
465
needsPlaywright
466
})
467
+ render('config/eslint')
468
}
469
470
if (needsPrettier) {
scripts/snapshot.mjs
@@ -54,7 +54,7 @@ function fullCombination(arr) {
54
55
56
let flagCombinations = fullCombination(featureFlags)
57
-flagCombinations.push(['default'], ['devtools'])
+flagCombinations.push(['default'], ['devtools'],['eslint'],['eslint-with-prettier'])
58
59
// `--with-tests` are equivalent of `--vitest --cypress`
60
// Previously it means `--cypress` without `--vitest`.
template/config/eslint/.vscode/extensions.json
@@ -0,0 +1,3 @@
1
+{
2
+ "recommendations": ["dbaeumer.vscode-eslint"]
3
+}
template/config/eslint/.vscode/settings.json
@@ -0,0 +1,5 @@
+ "editor.codeActionsOnSave": {
+ "source.fixAll": "explicit"
4
+ }
5
utils/renderEslint.ts
@@ -85,10 +85,4 @@ export default function renderEslint(
85
const fullPath = path.resolve(rootDir, fileName)
86
fs.writeFileSync(fullPath, content as string, 'utf-8')
87
88
-
89
- // update .vscode/extensions.json
90
- const extensionsJsonPath = path.resolve(rootDir, '.vscode/extensions.json')
91
- const existingExtensions = JSON.parse(fs.readFileSync(extensionsJsonPath, 'utf8'))
92
- existingExtensions.recommendations.push('dbaeumer.vscode-eslint')
93
- fs.writeFileSync(extensionsJsonPath, JSON.stringify(existingExtensions, null, 2) + '\n', 'utf-8')
94
utils/renderTemplate.ts
@@ -51,6 +51,15 @@ function renderTemplate(src, dest, callbacks) {
51
return
52
53
+ if (filename === 'settings.json' && fs.existsSync(dest)) {
+ // merge instead of overwriting
+ const settings = JSON.parse(fs.readFileSync(dest, 'utf8'))
+ const newSettings = JSON.parse(fs.readFileSync(src, 'utf8'))
+ const extensions = deepMerge(settings, newSettings)
+ fs.writeFileSync(dest, JSON.stringify(settings, null, 2) + '\n')
+ return
61
62
+
63
if (filename.startsWith('_')) {
64
// rename `_file` to `.file`
65
dest = path.resolve(path.dirname(dest), filename.replace(/^_/, '.'))
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments