Skip to content

Commit

Permalink
style: fix eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pheekus committed Nov 30, 2020
1 parent 015f4af commit 8a6f05d
Show file tree
Hide file tree
Showing 109 changed files with 112 additions and 110 deletions.
6 changes: 4 additions & 2 deletions src/customer/API.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import * as Core from '../core';

import type { Credentials, Session } from './types';
import { Headers, fetch } from 'cross-fetch';

import type { Graph } from './Graph';

export class API extends Core.API<Graph> {
Expand All @@ -21,9 +23,9 @@ export class API extends Core.API<Graph> {

try {
response = await fetch(new URL('authenticate', this.base).toString(), {
body: JSON.stringify(credentials),
headers: new Headers({ 'Content-Type': 'application/json' }),
method: 'POST',
body: JSON.stringify(credentials),
});
} catch (err) {
throw new Core.API.AuthError({
Expand Down Expand Up @@ -51,9 +53,9 @@ export class API extends Core.API<Graph> {

try {
response = await fetch(new URL('forgot_password', this.base).toString(), {
body: JSON.stringify({ email }),
headers: new Headers({ 'Content-Type': 'application/json' }),
method: 'POST',
body: JSON.stringify({ email }),
});
} catch (err) {
throw new Core.API.AuthError({
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/applied_coupon_code.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Cart } from './cart';
import type { Coupon } from './coupon';
import type { CouponCode } from './coupon_code';
import type { Store } from './store';
import type { Graph } from '../../core';
import type { Store } from './store';

export interface AppliedCouponCode extends Graph {
curie: 'fx:applied_coupon_code';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/applied_tax.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Graph } from '../../core';
import type { Store } from './store';
import type { Tax } from './tax';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface AppliedTax extends Graph {
curie: 'fx:applied_tax';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/billing_address.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { BillingAddresses } from './billing_addresses';
import type { Customer } from './customer';
import type { CustomerAddress } from './customer_address';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface BillingAddress extends Graph {
curie: 'fx:billing_address';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/cart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import type { CreateSession } from './create_session';
import type { CustomFields } from './custom_fields';
import type { Customer } from './customer';
import type { Discounts } from './discounts';
import type { Graph } from '../../core';
import type { Items } from './items';
import type { Store } from './store';
import type { Subscription } from './subscription';
import type { Graph } from '../../core';

export interface Cart extends Graph {
curie: 'fx:cart';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/cart_include_template.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Cache } from './cache';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { TemplateSets } from './template_sets';
import type { Graph } from '../../core';

export interface CartIncludeTemplate extends Graph {
curie: 'fx:cart_include_template';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/cart_template.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Cache } from './cache';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { TemplateSets } from './template_sets';
import type { Graph } from '../../core';

export interface CartTemplate extends Graph {
curie: 'fx:cart_template';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/checkout_template.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Cache } from './cache';
import type { Encode } from './encode';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { TemplateSets } from './template_sets';
import type { Graph } from '../../core';

export interface CheckoutTemplate extends Graph {
curie: 'fx:checkout_template';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/checkout_types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PropertyHelpers } from './property_helpers';
import type { Graph } from '../../core';
import type { PropertyHelpers } from './property_helpers';

export interface CheckoutTypes extends Graph {
curie: 'fx:checkout_types';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/countries.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PropertyHelpers } from './property_helpers';
import type { Graph } from '../../core';
import type { PropertyHelpers } from './property_helpers';

export interface Countries extends Graph {
curie: 'fx:countries';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/coupon.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { CouponCodes } from './coupon_codes';
import type { CouponItemCategories } from './coupon_item_categories';
import type { GenerateCodes } from './generate_codes';
import type { Store } from './store';
import type { Graph } from '../../core';
import type { Store } from './store';

export interface Coupon extends Graph {
curie: 'fx:coupon';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/coupon_code.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Coupon } from './coupon';
import type { CouponCodeTransactions } from './coupon_code_transactions';
import type { Store } from './store';
import type { Graph } from '../../core';
import type { Store } from './store';

export interface CouponCode extends Graph {
curie: 'fx:coupon_code';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/coupon_code_transaction.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Coupon } from './coupon';
import type { CouponCode } from './coupon_code';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface CouponCodeTransaction extends Graph {
curie: 'fx:coupon_code_transaction';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/coupon_detail.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Coupon } from './coupon';
import type { CouponCode } from './coupon_code';
import type { Graph } from '../../core';
import type { Item } from './item';
import type { Store } from './store';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface CouponDetail extends Graph {
curie: 'fx:coupon_detail';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/coupon_item_category.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Coupon } from './coupon';
import type { Graph } from '../../core';
import type { ItemCategory } from './item_category';
import type { Store } from './store';
import type { Graph } from '../../core';

export interface CouponItemCategory extends Graph {
curie: 'fx:coupon_item_category';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/create_user.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { User } from './user';
import type { Graph } from '../../core';
import type { User } from './user';

export interface CreateUser extends Graph {
curie: 'fx:create_user';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/custom_field.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Graph } from '../../core';
import type { Store } from './store';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface CustomField extends Graph {
curie: 'fx:custom_field';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/customer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import type { CustomerAddresses } from './customer_addresses';
import type { DefaultBillingAddress } from './default_billing_address';
import type { DefaultPaymentMethod } from './default_payment_method';
import type { DefaultShippingAddress } from './default_shipping_address';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { Subscriptions } from './subscriptions';
import type { Transactions } from './transactions';
import type { Graph } from '../../core';

export interface Customer extends Graph {
curie: 'fx:customer';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/customer_address.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Customer } from './customer';
import type { Store } from './store';
import type { Graph } from '../../core';
import type { Store } from './store';

export interface CustomerAddress extends Graph {
curie: 'fx:customer_address';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/customer_email_template.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Cache } from './cache';
import type { EmailTemplate } from './email_template';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { TemplateSets } from './template_sets';
import type { Graph } from '../../core';

export interface CustomerEmailTemplate extends Graph {
curie: 'fx:customer_email_template';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/customer_password_hash_types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PropertyHelpers } from './property_helpers';
import type { Graph } from '../../core';
import type { PropertyHelpers } from './property_helpers';

export interface CustomerPasswordHashTypes extends Graph {
curie: 'fx:customer_password_hash_types';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/customer_portal_settings.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Store } from './store';
import type { Graph } from '../../core';
import type { Store } from './store';

export interface CustomerPortalSettings extends Graph {
curie: 'fx:customer_portal_settings';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/default_payment_method.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Customer } from './customer';
import type { Store } from './store';
import type { Graph } from '../../core';
import type { Store } from './store';

export interface DefaultPaymentMethod extends Graph {
curie: 'fx:default_payment_method';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/default_store.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Store } from './store';
import type { Graph } from '../../core';
import type { Store } from './store';

export interface DefaultStore extends Graph {
curie: 'fx:default_store';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/default_templates.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { CartIncludeTemplates } from './cart_include_templates';
import type { CartTemplates } from './cart_templates';
import type { CheckoutTemplates } from './checkout_templates';
import type { EmailTemplates } from './email_templates';
import type { Graph } from '../../core';
import type { PropertyHelpers } from './property_helpers';
import type { ReceiptTemplates } from './receipt_templates';
import type { Graph } from '../../core';

export interface DefaultTemplates extends Graph {
curie: 'fx:default_templates';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/discount.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Coupon } from './coupon';
import type { CouponCode } from './coupon_code';
import type { Customer } from './customer';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface Discount extends Graph {
curie: 'fx:discount';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/discount_detail.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Graph } from '../../core';
import type { Item } from './item';
import type { Store } from './store';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface DiscountDetail extends Graph {
curie: 'fx:discount_detail';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/downloadable.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { DownloadableItemCategories } from './downloadable_item_categories';
import type { Graph } from '../../core';
import type { ItemCategory } from './item_category';
import type { Store } from './store';
import type { Graph } from '../../core';

export interface Downloadable extends Graph {
curie: 'fx:downloadable';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/downloadable_item_categories.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
import type { ItemCategory } from './item_category';
import type { Graph } from '../../core';
import type { ItemCategory } from './item_category';

export interface DownloadableItemCategories extends Graph {
curie: 'fx:downloadable_item_categories';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/downloadable_purchase.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Customer } from './customer';
import type { Downloadable } from './downloadable';
import type { Graph } from '../../core';
import type { Item } from './item';
import type { Store } from './store';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface DownloadablePurchase extends Graph {
curie: 'fx:downloadable_purchase';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/email_template.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Cache } from './cache';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { TemplateSets } from './template_sets';
import type { Graph } from '../../core';

export interface EmailTemplate extends Graph {
curie: 'fx:email_template';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/error_entry.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Store } from './store';
import type { Graph } from '../../core';
import type { Store } from './store';

export interface ErrorEntry extends Graph {
curie: 'fx:error_entry';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/fraud_protection.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Graph } from '../../core';
import type { PaymentMethodSets } from './payment_method_sets';
import type { Store } from './store';
import type { Graph } from '../../core';

export interface FraudProtection extends Graph {
curie: 'fx:fraud_protection';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/hosted_payment_gateway.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PaymentGateway } from './payment_gateway';
import type { Graph } from '../../core';
import type { PaymentGateway } from './payment_gateway';

export interface HostedPaymentGateway extends Graph {
curie: 'fx:hosted_payment_gateway';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/hosted_payment_gateways.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
import type { HostedPaymentGateway } from './hosted_payment_gateway';
import type { Graph } from '../../core';
import type { HostedPaymentGateway } from './hosted_payment_gateway';

export interface HostedPaymentGateways extends Graph {
curie: 'fx:hosted_payment_gateways';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/integration.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Client } from './client';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { User } from './user';
import type { Graph } from '../../core';

export interface Integration extends Graph {
curie: 'fx:integration';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/item.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Attributes } from './attributes';
import type { CouponDetails } from './coupon_details';
import type { DiscountDetails } from './discount_details';
import type { Graph } from '../../core';
import type { ItemCategory } from './item_category';
import type { ItemOptions } from './item_options';
import type { Shipment } from './shipment';
import type { Store } from './store';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface Item extends Graph {
curie: 'fx:item';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/item_categories.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
import type { ItemCategory } from './item_category';
import type { Graph } from '../../core';
import type { ItemCategory } from './item_category';

export interface ItemCategories extends Graph {
curie: 'fx:item_categories';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/item_category.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { EmailTemplates } from './email_templates';
import type { Graph } from '../../core';
import type { Store } from './store';
import type { TaxItemCategories } from './tax_item_categories';
import type { Graph } from '../../core';

export interface ItemCategory extends Graph {
curie: 'fx:item_category';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/item_option.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Graph } from '../../core';
import type { Item } from './item';
import type { Store } from './store';
import type { Transaction } from './transaction';
import type { Graph } from '../../core';

export interface ItemOption extends Graph {
curie: 'fx:item_option';
Expand Down
2 changes: 1 addition & 1 deletion src/integration/Graph/item_options.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
import type { ItemOption } from './item_option';
import type { Graph } from '../../core';
import type { ItemOption } from './item_option';

export interface ItemOptions extends Graph {
curie: 'fx:item_options';
Expand Down
Loading

0 comments on commit 8a6f05d

Please sign in to comment.