Skip to content

Commit 0ecafa4

Browse files
committed
Fix Prettier formatting and ESLint line-length violations
1 parent 2f3e3ae commit 0ecafa4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

functions/aep-126-enum-null-first.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ module.exports = (field, _opts, context) => {
1616
// Check if field is nullable
1717
// OpenAPI 3.0: nullable: true
1818
// OpenAPI 3.1: type: ['string', 'null'] or type: 'null'
19-
const isNullable = field.nullable === true ||
20-
(Array.isArray(field.type) && field.type.includes('null'));
19+
const isNullable = field.nullable === true || (Array.isArray(field.type) && field.type.includes('null'));
2120

2221
if (!isNullable) {
2322
return [];

functions/aep-126-enum-nullable-declaration.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ module.exports = (field, _opts, context) => {
2828
// Check if nullable is declared
2929
// OpenAPI 3.0: nullable: true
3030
// OpenAPI 3.1: type: ['string', 'null'] or type: 'null'
31-
const isNullable = field.nullable === true ||
32-
(Array.isArray(field.type) && field.type.includes('null'));
31+
const isNullable = field.nullable === true || (Array.isArray(field.type) && field.type.includes('null'));
3332

3433
if (!isNullable) {
3534
const fieldName = context.path[context.path.length - 1];
3635
return [
3736
{
38-
message: `Enum field "${fieldName}" contains "null" value but does not declare nullable (use "nullable: true" in OAS 3.0 or "type: ['string', 'null']" in OAS 3.1).`,
37+
message:
38+
`Enum field "${fieldName}" contains "null" value but does not declare nullable ` +
39+
`(use "nullable: true" in OAS 3.0 or "type: ['string', 'null']" in OAS 3.1).`,
3940
},
4041
];
4142
}

0 commit comments

Comments
 (0)