argv.nightwatch ??
argv.playwright ??
argv.eslint ??
+ argv['eslint-with-prettier'] ??
(argv.devtools || argv['vue-devtools'])
) === 'boolean'
needsPrettier,
needsPlaywright
})
+ render('config/eslint')
}
if (needsPrettier) {
}
let flagCombinations = fullCombination(featureFlags)
-flagCombinations.push(['default'], ['devtools'])
+flagCombinations.push(['default'], ['devtools'], ['eslint'], ['eslint-with-prettier'])
// `--with-tests` are equivalent of `--vitest --cypress`
// Previously it means `--cypress` without `--vitest`.
--- /dev/null
+{
+ "recommendations": ["dbaeumer.vscode-eslint"]
+}
--- /dev/null
+{
+ "editor.codeActionsOnSave": {
+ "source.fixAll": "explicit"
+ }
+}
const fullPath = path.resolve(rootDir, fileName)
fs.writeFileSync(fullPath, content as string, 'utf-8')
}
-
- // update .vscode/extensions.json
- const extensionsJsonPath = path.resolve(rootDir, '.vscode/extensions.json')
- const existingExtensions = JSON.parse(fs.readFileSync(extensionsJsonPath, 'utf8'))
- existingExtensions.recommendations.push('dbaeumer.vscode-eslint')
- fs.writeFileSync(extensionsJsonPath, JSON.stringify(existingExtensions, null, 2) + '\n', 'utf-8')
}
return
}
+ 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
+ }
+
if (filename.startsWith('_')) {
// rename `_file` to `.file`
dest = path.resolve(path.dirname(dest), filename.replace(/^_/, '.'))