Skip to content

Commit 1901771

Browse files
committed
chore: prettier
1 parent 9c3362b commit 1901771

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

cli.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ async function ask(openapiRoot, docsRoot) {
6666
validate: i => (i.length > 0 ? true : `API Name can't be empty`)
6767
});
6868

69-
const { codeSamples } = haveDefinition ? { codeSamples: false } : await prompt({
70-
type: 'confirm',
71-
name: 'codeSamples',
72-
message: `Prepare manual code samples folder?`,
73-
default: true
74-
});
75-
69+
const { codeSamples } = haveDefinition
70+
? { codeSamples: false }
71+
: await prompt({
72+
type: 'confirm',
73+
name: 'codeSamples',
74+
message: `Prepare manual code samples folder?`,
75+
default: true
76+
});
7677

7778
let repo;
7879

lib/migrate-2-3.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = async function migrate() {
6161
if (!filename.endsWith('.yaml')) return;
6262

6363
const groupName = filename.split('/')[2];
64-
const componentGroup = componentsFiles[groupName] = componentsFiles[groupName] || {};
64+
const componentGroup = (componentsFiles[groupName] = componentsFiles[groupName] || {});
6565

6666
const name = basename(filename, '.yaml');
6767
if (componentGroup[name]) {
@@ -126,7 +126,7 @@ module.exports = async function migrate() {
126126
componentData,
127127
basename(filename, extname(filename)),
128128
filename,
129-
componentsFiles.schemas || {},
129+
componentsFiles.schemas || {}
130130
);
131131
}
132132
replace$Refs(componentData, dirname(filename), componentsFiles);

lib/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ exports.implicitlyReferenceDiscriminator = function implicitlyReferenceDiscrimin
179179
obj,
180180
defName,
181181
filename,
182-
schemaFiles,
182+
schemaFiles
183183
) {
184184
if (!obj.discriminator) return;
185185

@@ -197,7 +197,7 @@ exports.implicitlyReferenceDiscriminator = function implicitlyReferenceDiscrimin
197197
const discriminatorPropSchema = obj.properties[obj.discriminator.propertyName];
198198
const discriminatorEnum = discriminatorPropSchema && discriminatorPropSchema.enum;
199199

200-
const mapping = obj.discriminator.mapping = obj.discriminator.mapping || {};
200+
const mapping = (obj.discriminator.mapping = obj.discriminator.mapping || {});
201201
for (const name of Object.keys(implicitMapping)) {
202202
if (discriminatorEnum && !discriminatorEnum.includes(name)) {
203203
continue;

0 commit comments

Comments
 (0)