Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rviau42 committed May 6, 2021
1 parent 9bd796b commit edd4246
Show file tree
Hide file tree
Showing 112 changed files with 2,450 additions and 2,368 deletions.
18 changes: 9 additions & 9 deletions src/AccessDescription.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as asn1js from "asn1js";
import { getParametersValue, clearProps } from "pvutils";
import GeneralName from "./GeneralName.js";
import* as asn1js from"asn1js";
import{ getParametersValue, clearProps } from"pvutils";
import GeneralName from"./GeneralName.js";
//**************************************************************************************
/**
* Class from RFC5280
Expand Down Expand Up @@ -42,9 +42,9 @@ export default class AccessDescription
{
switch(memberName)
{
case "accessMethod":
return "";
case "accessLocation":
case"accessMethod":
return"";
case"accessLocation":
return new GeneralName();
default:
throw new Error(`Invalid member name for AccessDescription class: ${memberName}`);
Expand Down Expand Up @@ -74,7 +74,7 @@ export default class AccessDescription
*/
const names = getParametersValue(parameters, "names", {});

return (new asn1js.Sequence({
return(new asn1js.Sequence({
name: (names.blockName || ""),
value: [
new asn1js.ObjectIdentifier({ name: (names.accessMethod || "") }),
Expand Down Expand Up @@ -128,7 +128,7 @@ export default class AccessDescription
toSchema()
{
//region Construct and return new ASN.1 schema for this object
return (new asn1js.Sequence({
return(new asn1js.Sequence({
value: [
new asn1js.ObjectIdentifier({ value: this.accessMethod }),
this.accessLocation.toSchema()
Expand All @@ -143,7 +143,7 @@ export default class AccessDescription
*/
toJSON()
{
return {
return{
accessMethod: this.accessMethod,
accessLocation: this.accessLocation.toJSON()
};
Expand Down
22 changes: 11 additions & 11 deletions src/Accuracy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as asn1js from "asn1js";
import { getParametersValue, clearProps } from "pvutils";
import* as asn1js from"asn1js";
import{ getParametersValue, clearProps } from"pvutils";
//**************************************************************************************
/**
* Class from RFC3161. Accuracy represents the time deviation around the UTC time contained in GeneralizedTime.
Expand Down Expand Up @@ -51,9 +51,9 @@ export default class Accuracy
{
switch(memberName)
{
case "seconds":
case "millis":
case "micros":
case"seconds":
case"millis":
case"micros":
return 0;
default:
throw new Error(`Invalid member name for Accuracy class: ${memberName}`);
Expand All @@ -69,10 +69,10 @@ export default class Accuracy
{
switch(memberName)
{
case "seconds":
case "millis":
case "micros":
return (memberValue === Accuracy.defaultValues(memberName));
case"seconds":
case"millis":
case"micros":
return(memberValue === Accuracy.defaultValues(memberName));
default:
throw new Error(`Invalid member name for Accuracy class: ${memberName}`);
}
Expand Down Expand Up @@ -103,7 +103,7 @@ export default class Accuracy
*/
const names = getParametersValue(parameters, "names", {});

return (new asn1js.Sequence({
return(new asn1js.Sequence({
name: (names.blockName || ""),
optional: true,
value: [
Expand Down Expand Up @@ -219,7 +219,7 @@ export default class Accuracy
//endregion

//region Construct and return new ASN.1 schema for this object
return (new asn1js.Sequence({
return(new asn1js.Sequence({
value: outputArray
}));
//endregion
Expand Down
22 changes: 11 additions & 11 deletions src/AlgorithmIdentifier.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as asn1js from "asn1js";
import { getParametersValue, clearProps } from "pvutils";
import* as asn1js from"asn1js";
import{ getParametersValue, clearProps } from"pvutils";
//**************************************************************************************
/**
* Class from RFC5280
Expand Down Expand Up @@ -44,9 +44,9 @@ export default class AlgorithmIdentifier
{
switch(memberName)
{
case "algorithmId":
return "";
case "algorithmParams":
case"algorithmId":
return"";
case"algorithmParams":
return new asn1js.Any();
default:
throw new Error(`Invalid member name for AlgorithmIdentifier class: ${memberName}`);
Expand All @@ -62,10 +62,10 @@ export default class AlgorithmIdentifier
{
switch(memberName)
{
case "algorithmId":
return (memberValue === "");
case "algorithmParams":
return (memberValue instanceof asn1js.Any);
case"algorithmId":
return(memberValue === "");
case"algorithmParams":
return(memberValue instanceof asn1js.Any);
default:
throw new Error(`Invalid member name for AlgorithmIdentifier class: ${memberName}`);
}
Expand Down Expand Up @@ -93,7 +93,7 @@ export default class AlgorithmIdentifier
*/
const names = getParametersValue(parameters, "names", {});

return (new asn1js.Sequence({
return(new asn1js.Sequence({
name: (names.blockName || ""),
optional: (names.optional || false),
value: [
Expand Down Expand Up @@ -153,7 +153,7 @@ export default class AlgorithmIdentifier
//endregion

//region Construct and return new ASN.1 schema for this object
return (new asn1js.Sequence({
return(new asn1js.Sequence({
value: outputArray
}));
//endregion
Expand Down
16 changes: 8 additions & 8 deletions src/AltName.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as asn1js from "asn1js";
import { getParametersValue, clearProps } from "pvutils";
import GeneralName from "./GeneralName.js";
import* as asn1js from"asn1js";
import{ getParametersValue, clearProps } from"pvutils";
import GeneralName from"./GeneralName.js";
//**************************************************************************************
/**
* Class from RFC5280
Expand Down Expand Up @@ -37,8 +37,8 @@ export default class AltName
{
switch(memberName)
{
case "altNames":
return [];
case"altNames":
return[];
default:
throw new Error(`Invalid member name for AltName class: ${memberName}`);
}
Expand All @@ -64,7 +64,7 @@ export default class AltName
*/
const names = getParametersValue(parameters, "names", {});

return (new asn1js.Sequence({
return(new asn1js.Sequence({
name: (names.blockName || ""),
value: [
new asn1js.Repeated({
Expand Down Expand Up @@ -114,7 +114,7 @@ export default class AltName
toSchema()
{
//region Construct and return new ASN.1 schema for this object
return (new asn1js.Sequence({
return(new asn1js.Sequence({
value: Array.from(this.altNames, element => element.toSchema())
}));
//endregion
Expand All @@ -126,7 +126,7 @@ export default class AltName
*/
toJSON()
{
return {
return{
altNames: Array.from(this.altNames, element => element.toJSON())
};
}
Expand Down
29 changes: 15 additions & 14 deletions src/Attribute.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as asn1js from "asn1js";
import { getParametersValue, clearProps } from "pvutils";
import* as asn1js from"asn1js";
import{ getParametersValue, clearProps } from"pvutils";
//**************************************************************************************
/**
* Class from RFC2986
*/
export default class Attribute {
export default class Attribute
{
//**********************************************************************************
/**
* Constructor for Attribute class
Expand Down Expand Up @@ -40,10 +41,10 @@ export default class Attribute {
{
switch(memberName)
{
case "type":
return "";
case "values":
return [];
case"type":
return"";
case"values":
return[];
default:
throw new Error(`Invalid member name for Attribute class: ${memberName}`);
}
Expand All @@ -58,10 +59,10 @@ export default class Attribute {
{
switch(memberName)
{
case "type":
return (memberValue === "");
case "values":
return (memberValue.length === 0);
case"type":
return(memberValue === "");
case"values":
return(memberValue.length === 0);
default:
throw new Error(`Invalid member name for Attribute class: ${memberName}`);
}
Expand Down Expand Up @@ -92,7 +93,7 @@ export default class Attribute {
*/
const names = getParametersValue(parameters, "names", {});

return (new asn1js.Sequence({
return(new asn1js.Sequence({
name: (names.blockName || ""),
value: [
new asn1js.ObjectIdentifier({ name: (names.type || "") }),
Expand Down Expand Up @@ -150,7 +151,7 @@ export default class Attribute {
toSchema()
{
//region Construct and return new ASN.1 schema for this object
return (new asn1js.Sequence({
return(new asn1js.Sequence({
value: [
new asn1js.ObjectIdentifier({ value: this.type }),
new asn1js.Set({
Expand All @@ -167,7 +168,7 @@ export default class Attribute {
*/
toJSON()
{
return {
return{
type: this.type,
values: Array.from(this.values, element => element.toJSON())
};
Expand Down
Loading

0 comments on commit edd4246

Please sign in to comment.