Skip to content

Commit

Permalink
reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anniel-stripe committed Mar 6, 2023
1 parent d7ab255 commit 29539cd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
19 changes: 12 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ module.exports = {
allowSingleLine: true,
},
],
camelcase: [
'error',
{
properties: 'never',
},
],
'capitalized-comments': 'off',
'class-methods-use-this': 'off',
'comma-dangle': 'off',
Expand Down Expand Up @@ -267,7 +261,18 @@ module.exports = {
'@typescript-eslint/triple-slash-reference': 0,
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allow',
},
{
selector: 'property',
format: null,
},
],
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-var-requires': 0,
Expand Down
2 changes: 1 addition & 1 deletion src/ResourceNamespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function ResourceNamespace(

export function resourceNamespace(
namespace: string,
resources: Record<string, any>
resources: Record<string, (...args: any[]) => void>
): (stripe: StripeObject) => StripeResourceNamespaceObject {
return function(stripe: StripeObject): StripeResourceNamespaceObject {
return new (ResourceNamespace as any)(stripe, resources);
Expand Down
11 changes: 0 additions & 11 deletions src/Types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,3 @@ type UserProvidedConfig = {
telemetry?: boolean;
appInfo?: AppInfo;
};
type OAuthAuthorizeUrlParams = {
response_type?: 'code';
client_id?: string;
scope?: string;
};
type OAuthAuthorizeUrlOptions = {
express?: boolean;
};
type OAuthDeauthorizeParams = {
client_id?: string;
};
2 changes: 1 addition & 1 deletion src/resources/Accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Accounts = StripeResource.extend({
fullPath: '/v1/accounts',
}),

retrieve(id: string | null | undefined, ...args: any[]) {
retrieve(id: string, ...args: any[]) {
// No longer allow an api key to be passed as the first string to this function due to ambiguity between
// old account ids and api keys. To request the account for an api key, send null as the id
if (typeof id === 'string') {
Expand Down
12 changes: 12 additions & 0 deletions src/resources/OAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
import {StripeResource} from '../StripeResource';
import {stringifyRequestData} from '../utils';

type OAuthAuthorizeUrlParams = {
response_type?: 'code';
client_id?: string;
scope?: string;
};
type OAuthAuthorizeUrlOptions = {
express?: boolean;
};
type OAuthDeauthorizeParams = {
client_id?: string;
};

const stripeMethod = StripeResource.method;

const oAuthHost = 'connect.stripe.com';
Expand Down

0 comments on commit 29539cd

Please sign in to comment.