Skip to content

Commit 52dc78e

Browse files
committed
fixed linting
1 parent a05f974 commit 52dc78e

File tree

12 files changed

+62
-62
lines changed

12 files changed

+62
-62
lines changed

apps/remix-ide/src/app/components/overlay-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class OverlayPanel extends AbstractPanel {
117117
{/* Header with close button */}
118118
<div
119119
className="d-flex align-items-center justify-content-between px-3 py-2 border-bottom"
120-
style={{
120+
style={{
121121
backgroundColor: 'var(--bs-secondary-bg)',
122122
minHeight: '48px'
123123
}}

apps/remix-ide/src/app/plugins/auth-plugin.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ export class AuthPlugin extends Plugin {
124124
try {
125125
// Ensure we have a token set
126126
await this.getToken()
127-
127+
128128
const response = await this.billingApi.getConfig()
129129
if (response.ok && response.data?.paddle) {
130130
return {
131131
clientToken: response.data.paddle.token,
132132
environment: response.data.paddle.environment
133133
}
134134
}
135-
135+
136136
console.warn('[AuthPlugin] Failed to fetch Paddle config:', response.error)
137137
return { clientToken: null, environment: 'sandbox' }
138138
} catch (error) {

libs/remix-ui/account-overlay/src/lib/account-overlay.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ export const AccountOverlay: React.FC<AccountOverlayProps> = ({ plugin }) => {
5252
<FormattedMessage id="account.notLoggedIn" defaultMessage="Not Logged In" />
5353
</h4>
5454
<p className="text-muted text-center mb-4">
55-
<FormattedMessage
56-
id="account.loginPrompt"
55+
<FormattedMessage
56+
id="account.loginPrompt"
5757
defaultMessage="Please log in to access your account settings, credits, and billing information."
5858
/>
5959
</p>
60-
<button
60+
<button
6161
className="btn btn-primary"
6262
onClick={() => plugin.call('overlay', 'hideOverlay')}
6363
>
@@ -81,14 +81,14 @@ export const AccountOverlay: React.FC<AccountOverlayProps> = ({ plugin }) => {
8181
<div className="p-3 border-bottom">
8282
<div className="d-flex align-items-center">
8383
{user?.picture ? (
84-
<img
85-
src={user.picture}
86-
alt={user.name || user.email}
84+
<img
85+
src={user.picture}
86+
alt={user.name || user.email}
8787
className="rounded-circle mr-2"
8888
style={{ width: '40px', height: '40px' }}
8989
/>
9090
) : (
91-
<div
91+
<div
9292
className="rounded-circle bg-secondary d-flex align-items-center justify-content-center mr-2"
9393
style={{ width: '40px', height: '40px' }}
9494
>
@@ -174,7 +174,7 @@ export const AccountOverlay: React.FC<AccountOverlayProps> = ({ plugin }) => {
174174
<i className="fas fa-credit-card mr-2"></i>
175175
Billing & Subscriptions
176176
</h3>
177-
<BillingManager
177+
<BillingManager
178178
plugin={plugin}
179179
paddleClientToken={paddleConfig?.clientToken || undefined}
180180
paddleEnvironment={paddleConfig?.environment || 'sandbox'}
@@ -190,7 +190,7 @@ export const AccountOverlay: React.FC<AccountOverlayProps> = ({ plugin }) => {
190190
Connected Accounts
191191
</h3>
192192
<p className="text-muted mb-4">
193-
Link multiple authentication providers to access your account from anywhere.
193+
Link multiple authentication providers to access your account from anywhere.
194194
All linked accounts share the same credits and subscriptions.
195195
</p>
196196
<ConnectedAccounts plugin={plugin} />

libs/remix-ui/billing/src/lib/billing-manager.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const BillingManager: React.FC<BillingManagerProps> = ({
130130
try {
131131
const user = await plugin?.call('auth', 'getUser')
132132
setIsAuthenticated(!!user)
133-
133+
134134
// Set token for billing API
135135
const token = localStorage.getItem('remix_access_token')
136136
if (token) {

libs/remix-ui/billing/src/lib/components/credit-packages-view.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const CreditPackagesView: React.FC<CreditPackagesViewProps> = ({
5858
// Get active Paddle provider
5959
const paddleProvider = BillingApiService.getActiveProvider(pkg, 'paddle')
6060
const priceId = paddleProvider?.priceId || null
61-
61+
6262
return (
6363
<div key={pkg.id} className="col-12 col-md-6 col-lg-3">
6464
<div className={`card h-100 ${pkg.popular ? 'border-primary' : ''}`}>
@@ -72,7 +72,7 @@ export const CreditPackagesView: React.FC<CreditPackagesViewProps> = ({
7272
<p className="card-text text-muted small flex-grow-1">
7373
{pkg.description}
7474
</p>
75-
75+
7676
<div className="mb-3">
7777
<div className="h4 mb-0">
7878
<i className="fas fa-coins me-2 text-warning"></i>

libs/remix-ui/billing/src/lib/components/current-subscription.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ export const CurrentSubscription: React.FC<CurrentSubscriptionProps> = ({
3636

3737
const getStatusBadge = () => {
3838
switch (subscription.status) {
39-
case 'active':
40-
return <span className="badge bg-success">Active</span>
41-
case 'paused':
42-
return <span className="badge bg-warning">Paused</span>
43-
case 'canceled':
44-
return <span className="badge bg-secondary">Canceled</span>
45-
case 'past_due':
46-
return <span className="badge bg-danger">Past Due</span>
47-
case 'trialing':
48-
return <span className="badge bg-info">Trial</span>
49-
default:
50-
return <span className="badge bg-secondary">{subscription.status}</span>
39+
case 'active':
40+
return <span className="badge bg-success">Active</span>
41+
case 'paused':
42+
return <span className="badge bg-warning">Paused</span>
43+
case 'canceled':
44+
return <span className="badge bg-secondary">Canceled</span>
45+
case 'past_due':
46+
return <span className="badge bg-danger">Past Due</span>
47+
case 'trialing':
48+
return <span className="badge bg-info">Trial</span>
49+
default:
50+
return <span className="badge bg-secondary">{subscription.status}</span>
5151
}
5252
}
5353

@@ -63,20 +63,20 @@ export const CurrentSubscription: React.FC<CurrentSubscriptionProps> = ({
6363
const mainItem = subscription.items?.[0]
6464
const planName = mainItem?.product?.name || subscription.planId || 'Unknown Plan'
6565
const planDescription = mainItem?.description || ''
66-
66+
6767
// Parse credits from description (e.g., "Pro - 1000 credits/month")
6868
const creditsMatch = planDescription.match(/(\d+)\s*credits/)
6969
const creditsPerMonth = creditsMatch ? parseInt(creditsMatch[1], 10) : subscription.creditsPerMonth
70-
70+
7171
// Get billing period dates
7272
const periodStart = subscription.currentBillingPeriod?.startsAt || subscription.currentPeriodStart
7373
const periodEnd = subscription.currentBillingPeriod?.endsAt || subscription.currentPeriodEnd
74-
74+
7575
// Check for scheduled cancellation
7676
const isCanceling = subscription.scheduledChange?.action === 'cancel' || subscription.cancelAtPeriodEnd
7777

7878
// Format price
79-
const price = mainItem?.unitPrice
79+
const price = mainItem?.unitPrice
8080
? `$${(parseInt(mainItem.unitPrice.amount, 10) / 100).toFixed(2)}`
8181
: null
8282
const billingInterval = mainItem?.billingCycle?.interval || 'month'

libs/remix-ui/billing/src/lib/components/feature-access-products-view.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ export const FeatureAccessProductsView: React.FC<FeatureAccessProductsViewProps>
5050

5151
// Check if user has active membership for a feature group
5252
const hasActiveMembership = (featureGroup: string) => {
53-
return memberships.some(m =>
54-
m.featureGroup === featureGroup &&
53+
return memberships.some(m =>
54+
m.featureGroup === featureGroup &&
5555
m.status === 'active'
5656
)
5757
}
5858

5959
// Get the user's active membership for a feature group
6060
const getActiveMembership = (featureGroup: string) => {
61-
return memberships.find(m =>
62-
m.featureGroup === featureGroup &&
61+
return memberships.find(m =>
62+
m.featureGroup === featureGroup &&
6363
m.status === 'active'
6464
)
6565
}
@@ -71,7 +71,7 @@ export const FeatureAccessProductsView: React.FC<FeatureAccessProductsViewProps>
7171
// Check if user already has access to the primary feature group
7272
const hasAccess = hasActiveMembership(product.featureGroup)
7373
const activeMembership = getActiveMembership(product.featureGroup)
74-
74+
7575
// Get price ID from providers array (if available)
7676
const paddleProvider = product.providers?.find(p => p.slug === 'paddle' && p.isActive)
7777
const priceId = paddleProvider?.priceId || null
@@ -89,15 +89,15 @@ export const FeatureAccessProductsView: React.FC<FeatureAccessProductsViewProps>
8989
<small><i className="fas fa-unlock me-1"></i>Access Granted</small>
9090
</div>
9191
)}
92-
92+
9393
<div className="card-body d-flex flex-column">
9494
<div className="d-flex justify-content-between align-items-start mb-2">
9595
<h5 className="card-title mb-0">{product.name}</h5>
9696
{product.isRecurring && (
9797
<span className="badge bg-info">Subscription</span>
9898
)}
9999
</div>
100-
100+
101101
<p className="card-text text-muted small mb-3">
102102
{product.description}
103103
</p>

libs/remix-ui/billing/src/lib/components/purchase-button.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ export const PurchaseButton: React.FC<PurchaseButtonProps> = ({
1717
const getButtonClass = () => {
1818
const base = 'btn w-100'
1919
switch (variant) {
20-
case 'primary':
21-
return `${base} btn-primary`
22-
case 'secondary':
23-
return `${base} btn-secondary`
24-
case 'outline':
25-
return `${base} btn-outline-primary`
26-
default:
27-
return `${base} btn-primary`
20+
case 'primary':
21+
return `${base} btn-primary`
22+
case 'secondary':
23+
return `${base} btn-secondary`
24+
case 'outline':
25+
return `${base} btn-outline-primary`
26+
default:
27+
return `${base} btn-primary`
2828
}
2929
}
3030

libs/remix-ui/billing/src/lib/components/subscription-plans-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const SubscriptionPlansView: React.FC<SubscriptionPlansViewProps> = ({
6666
<small><i className="fas fa-check me-1"></i>Current Plan</small>
6767
</div>
6868
)}
69-
69+
7070
<div className="card-body d-flex flex-column">
7171
<h5 className="card-title">{plan.name}</h5>
7272
<p className="card-text text-muted small">

libs/remix-ui/billing/src/lib/paddle-singleton.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Paddle.js Singleton
3-
*
3+
*
44
* Ensures only one Paddle instance is initialized across the application.
55
* Provides event subscription mechanism for checkout events.
66
*/
@@ -19,14 +19,14 @@ interface PaddleCache {
1919
// Global singleton storage
2020
const globalRef = globalThis as unknown as { __paddleSingleton?: PaddleCache }
2121
if (!globalRef.__paddleSingleton) {
22-
globalRef.__paddleSingleton = { listeners: [] }
22+
globalRef.__paddleSingleton = { listeners: []}
2323
}
2424
const cache = globalRef.__paddleSingleton
2525

2626
/**
2727
* Build unique cache key from environment and token
2828
*/
29-
const buildKey = (env: Environment, token: string) =>
29+
const buildKey = (env: Environment, token: string) =>
3030
`${String(env).toLowerCase().trim()}:${String(token).trim()}`
3131

3232
/**
@@ -79,9 +79,9 @@ function logPaddleScriptTags(): void {
7979
function debugPaddleStatus(): void {
8080
const w = globalThis as { Paddle?: Paddle }
8181
const hasGlobal = !!w.Paddle
82-
console.log('[Paddle][debug] key:', cache.key,
83-
'hasInstance:', !!cache.instance,
84-
'hasPromise:', !!cache.promise,
82+
console.log('[Paddle][debug] key:', cache.key,
83+
'hasInstance:', !!cache.instance,
84+
'hasPromise:', !!cache.promise,
8585
'globalThis.Paddle:', hasGlobal)
8686
logPaddleScriptTags()
8787
}
@@ -110,13 +110,13 @@ function waitForPaddle(timeoutMs = 10000, intervalMs = 50): Promise<Paddle> {
110110

111111
/**
112112
* Initialize Paddle with the given client token
113-
*
113+
*
114114
* @param token - Paddle client-side token
115115
* @param environment - 'sandbox' for testing, 'production' for live
116116
* @returns Promise resolving to Paddle instance
117117
*/
118118
export async function initPaddle(
119-
token: string,
119+
token: string,
120120
environment: Environment = 'sandbox'
121121
): Promise<Paddle> {
122122
if (!token) {
@@ -181,10 +181,10 @@ export async function initPaddle(
181181

182182
/**
183183
* Open Paddle checkout overlay with a transaction ID
184-
*
184+
*
185185
* The transactionId should be obtained from your backend API which creates
186186
* the transaction with customData (userId, etc.) already set.
187-
*
187+
*
188188
* @param paddle - Paddle instance
189189
* @param transactionId - Transaction ID from backend (e.g., "txn_01abc123...")
190190
* @param options - Additional checkout options
@@ -225,10 +225,10 @@ export function openCheckoutWithTransaction(
225225

226226
/**
227227
* Open Paddle checkout overlay with a price ID (direct checkout)
228-
*
228+
*
229229
* NOTE: This bypasses the backend and won't include customData like userId.
230230
* Prefer using openCheckoutWithTransaction() with a backend-created transaction.
231-
*
231+
*
232232
* @param paddle - Paddle instance
233233
* @param priceId - Paddle price ID (e.g., "pri_01abc123...")
234234
* @param options - Additional checkout options

0 commit comments

Comments
 (0)