Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thick-apes-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-wmr': patch
---

Install eslint and eslint-config-preact as dev dependencies
7 changes: 5 additions & 2 deletions packages/create-wmr/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ sade('create-wmr [dir]', true)

if (opts.eslint) {
spinner.start('installing eslint configuration...');
await install(['eslint', 'eslint-config-preact'], { prefer: packageManager, cwd });
await install(['eslint', 'eslint-config-preact'], { prefer: packageManager, cwd, dev: true });
spinner.succeed('installed eslint.');
}

spinner.stop();
if (dir) {
// eslint-disable-next-line no-console
console.log(
`\n${bold('To get started:')}\n${dim('$')} ${cyan('cd ' + relative(origCwd, cwd).replace(/^\.[\\/]/, ''))}`
);
Expand All @@ -83,11 +84,13 @@ sade('create-wmr [dir]', true)
Serve the app in production mode:
${dim('$ PORT=8080')} ${cyan(`${packageManager === 'npm' ? 'npm run' : 'yarn'} serve`)}
`;
// eslint-disable-next-line no-console
console.log('\n' + result.trim().replace(/^\t\t\t/gm, '') + '\n');
if (!opts.eslint) {
// eslint-disable-next-line no-console
console.log(
`\n${bold('To enable ESLint:')} (optional)\n${dim('$')} ${cyan(
`${packageManager === 'npm' ? 'npm i' : 'yarn add'} eslint eslint-config-preact`
`${packageManager === 'npm' ? 'npm i' : 'yarn add'} -D eslint eslint-config-preact`
)}\n`
);
}
Expand Down