chore: better Prettier config for easier reviews

This commit is contained in:
2023-10-23 23:38:50 +02:00
parent 5591449094
commit 2aefe73afa
132 changed files with 4114 additions and 4019 deletions

View File

@ -1,45 +1,45 @@
/** @type {import('node-plop').PlopGeneratorConfig} */
export const serviceGenerator = {
description: 'REST API endpoint',
description: "REST API endpoint",
prompts: [
{
type: 'input',
name: 'url',
message: 'url'
type: "input",
name: "url",
message: "url",
},
{
type: 'list',
name: 'httpMethod',
message: 'httpMethod',
choices: ['GET', 'POST', 'PUT', 'DELETE']
type: "list",
name: "httpMethod",
message: "httpMethod",
choices: ["GET", "POST", "PUT", "DELETE"],
},
{
type: 'input',
name: 'description',
message: 'description'
type: "input",
name: "description",
message: "description",
},
{
type: 'list',
name: 'tag',
message: 'tag',
choices: ['users', 'oauth2', 'guilds', 'channels', 'messages', 'members']
type: "list",
name: "tag",
message: "tag",
choices: ["users", "oauth2", "guilds", "channels", "messages", "members"],
},
{
type: 'confirm',
name: 'shouldBeAuthenticated',
message: 'shouldBeAuthenticated'
}
type: "confirm",
name: "shouldBeAuthenticated",
message: "shouldBeAuthenticated",
},
],
actions: [
{
type: 'add',
path: 'src/services/{{url}}/{{lowerCase httpMethod}}.ts',
templateFile: 'generators/service/service.ts.hbs'
type: "add",
path: "src/services/{{url}}/{{lowerCase httpMethod}}.ts",
templateFile: "generators/service/service.ts.hbs",
},
{
type: 'add',
path: 'src/services/{{url}}/__test__/{{lowerCase httpMethod}}.test.ts',
templateFile: 'generators/service/service.test.ts.hbs'
}
]
type: "add",
path: "src/services/{{url}}/__test__/{{lowerCase httpMethod}}.test.ts",
templateFile: "generators/service/service.test.ts.hbs",
},
],
}