Skip to content

Commit ee12db7

Browse files
author
yashpandit
committed
Solve eslint issues
1 parent 963457a commit ee12db7

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

lib/generators/create-react-app.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
const spawn = require("../spawn");
2-
const path = require("path");
3-
const { prompt } = require("enquirer");
4-
const { NPX, CREATE_REACT_APP } = require("../constants.js");
1+
const spawn = require('../spawn');
2+
const path = require('path');
3+
const { prompt } = require('enquirer');
4+
const { NPX, CREATE_REACT_APP } = require('../constants.js');
55

66
module.exports = app => {
7-
app.task("create-react-app", async () => {
7+
app.task('create-react-app', async () => {
88
let dest = app.options.name;
99
if (!dest) {
1010
const answers = await prompt({
11-
type: "text",
12-
name: "appName",
13-
message: "What would you like the app name to be?"
11+
type: 'text',
12+
name: 'appName',
13+
message: 'What would you like the app name to be?'
1414
});
1515
dest = answers.appName;
1616
}
1717
await spawn(NPX, [CREATE_REACT_APP, dest]);
1818
});
1919

20-
app.task("create-react-app-templates", async () => {
20+
app.task('create-react-app-templates', async () => {
2121
const dest = path.join(app.cwd, app.options.name);
2222
const answers = await prompt([
2323
{
24-
type: "text",
25-
name: "description",
26-
message: "What description would you like to use for your website?"
24+
type: 'text',
25+
name: 'description',
26+
message: 'What description would you like to use for your website?'
2727
},
2828
{
29-
type: "text",
30-
name: "title",
31-
message: "What title would you like to use for your website?"
29+
type: 'text',
30+
name: 'title',
31+
message: 'What title would you like to use for your website?'
3232
}
3333
]);
3434

3535
return app
36-
.src("create-react-app/public/*.*", {
37-
cwd: path.join(__dirname, "../../templates")
36+
.src('create-react-app/public/*.*', {
37+
cwd: path.join(__dirname, '../../templates')
3838
})
39-
.pipe(app.renderFile("*", answers).on("error", console.error))
39+
.pipe(app.renderFile('*', answers).on('error', console.error))
4040
.pipe(app.conflicts(dest))
4141
.pipe(app.dest(dest));
4242
});
4343

44-
app.task("default", ["create-react-app", "create-react-app-templates"]);
44+
app.task('default', ['create-react-app', 'create-react-app-templates']);
4545
};

0 commit comments

Comments
 (0)