Skip to content

Commit f2ed6e0

Browse files
Fix lint warnings
1 parent aa61793 commit f2ed6e0

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

cli/targets/static.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,18 +366,12 @@ function syntaxForType(type) {
366366
namespace = namespace.parent;
367367
}
368368

369-
if (syntax === "proto3")
370-
return "proto3";
371-
else
372-
return "proto2";
369+
return (syntax === "proto3") ? "proto3" : "proto2";
373370
}
374371

375372
function isOptional(field, syntax) {
376373

377-
if (syntax === "proto3")
378-
return field.proto3Optional
379-
else
380-
return field.optional
374+
return (syntax === "proto3") ? field.proto3Optional : field.optional;
381375
}
382376

383377
function buildType(ref, type) {

src/parse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function parse(source, root, options) {
265265

266266
// Syntax is needed to understand the meaning of the optional field rule
267267
// Otherwise the meaning is ambiguous between proto2 and proto3
268-
root.setOption("syntax", syntax)
268+
root.setOption("syntax", syntax);
269269

270270
skip(";");
271271
}

0 commit comments

Comments
 (0)