Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Chore/add lint (#27572)

Terry Sutton55077a5ceca3
diff --git a/apps/studio/components/interfaces/Integrations/ProjectLinker.tsx b/apps/studio/components/interfaces/Integrations/ProjectLinker.tsx
index 03b17fab877..8a2cc393f85 100644
--- a/apps/studio/components/interfaces/Integrations/ProjectLinker.tsx
+++ b/apps/studio/components/interfaces/Integrations/ProjectLinker.tsx
@@ -29,7 +29,6 @@ import {
} from 'ui'
export interface Project {
- id: string
name: string
ref: string
}
diff --git a/apps/studio/components/interfaces/Linter/Linter.utils.tsx b/apps/studio/components/interfaces/Linter/Linter.utils.tsx
index 0a0991fe19f..5eb57131661 100644
--- a/apps/studio/components/interfaces/Linter/Linter.utils.tsx
+++ b/apps/studio/components/interfaces/Linter/Linter.utils.tsx
@@ -168,6 +168,16 @@ export const lintInfoMap: LintInfo[] = [
docsLink:
'https://supabase.com/docs/guides/database/database-advisors?lint=0016_materialized_view_in_api',
},
+ {
+ name: 'foreign_table_in_api',
+ title: 'Foreign Table in API',
+ icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1.5} />,
+ link: () =>
+ `https://supabase.com/docs/guides/database/database-linter?lint=0017_foreign_table_in_api`,
+ linkText: 'View docs',
+ docsLink:
+ 'https://supabase.com/docs/guides/database/database-linter?lint=0017_foreign_table_in_api',
+ },
]
export const LintCTA = ({
diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/DowngradeModal.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/DowngradeModal.tsx
index 3a6514e1c56..4c882e3b67a 100644
--- a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/DowngradeModal.tsx
+++ b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/DowngradeModal.tsx
@@ -94,7 +94,7 @@ const DowngradeModal = ({
{projects
.filter((it) => it.infra_compute_size === 'micro')
.map((project) => (
- <li className="list-disc ml-6" key={project.id}>
+ <li className="list-disc ml-6" key={project.ref}>
{project.name}: Compute will be downgraded. Project will also{' '}
<span className="font-bold">need to be restarted</span>.
</li>
diff --git a/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelGitHubRepoLinker.tsx b/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelGitHubRepoLinker.tsx
index 9ec66da24f9..3eccf231323 100644
--- a/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelGitHubRepoLinker.tsx
+++ b/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelGitHubRepoLinker.tsx
@@ -54,8 +54,7 @@ const SidePanelGitHubRepoLinker = ({ projectRef }: SidePanelGitHubRepoLinkerProp
() =>
supabaseProjectsData
?.filter((project) => project.organization_id === selectedOrganization?.id)
- .map((project) => ({ id: project.id.toString(), name: project.name, ref: project.ref })) ??
- EMPTY_ARR,
+ .map((project) => ({ name: project.name, ref: project.ref })) ?? EMPTY_ARR,
[selectedOrganization?.id, supabaseProjectsData]
)
diff --git a/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelVercelProjectLinker.tsx b/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelVercelProjectLinker.tsx
index eb883e15110..b3350fd2cb6 100644
--- a/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelVercelProjectLinker.tsx
+++ b/apps/studio/components/interfaces/Organization/IntegrationSettings/SidePanelVercelProjectLinker.tsx
@@ -52,8 +52,7 @@ const SidePanelVercelProjectLinker = () => {
() =>
supabaseProjectsData
?.filter((project) => project.organization_id === selectedOrganization?.id)
- .map((project) => ({ id: project.id.toString(), name: project.name, ref: project.ref })) ??
- EMPTY_ARR,
+ .map((project) => ({ name: project.name, ref: project.ref })) ?? EMPTY_ARR,
[selectedOrganization?.id, supabaseProjectsData]
)
diff --git a/apps/studio/pages/integrations/vercel/[slug]/marketplace/choose-project.tsx b/apps/studio/pages/integrations/vercel/[slug]/marketplace/choose-project.tsx
index d22d3a1f4ba..3cbfdb35052 100644
--- a/apps/studio/pages/integrations/vercel/[slug]/marketplace/choose-project.tsx
+++ b/apps/studio/pages/integrations/vercel/[slug]/marketplace/choose-project.tsx
@@ -65,8 +65,7 @@ const VercelIntegration: NextPageWithLayout = () => {
project.status === PROJECT_STATUS['COMING_UP'] ||
project.status === PROJECT_STATUS['RESTORING'])
)
- .map((project) => ({ id: project.id.toString(), name: project.name, ref: project.ref })) ??
- EMPTY_ARR,
+ .map((project) => ({ name: project.name, ref: project.ref })) ?? EMPTY_ARR,
[organization?.id, supabaseProjectsData]
)
diff --git a/apps/studio/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsx
index becbd70eb8f..dcb945491c3 100644
--- a/apps/studio/pages/new/[slug].tsx
+++ b/apps/studio/pages/new/[slug].tsx
@@ -812,7 +812,7 @@ const Wizard: NextPageWithLayout = () => {
</TableHeader>
<TableBody className="[&_td]:py-2">
{organizationProjects.map((project) => (
- <TableRow key={project.id} className="text-foreground-light">
+ <TableRow key={project.ref} className="text-foreground-light">
<TableCell className="w-[170px]">{project.name}</TableCell>
<TableCell className="text-center">
{instanceLabel(project.infra_compute_size)}
diff --git a/package-lock.json b/package-lock.json
index 676b2fb6eda..373ff1b938a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13947,9 +13947,9 @@
}
},
"node_modules/@testing-library/jest-dom": {
- "version": "6.4.2",
- "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.2.tgz",
- "integrity": "sha512-CzqH0AFymEMG48CpzXFriYYkOjk6ZGPCLMhW9e9jg3KMCn5OfJecF8GtGW7yGfR/IgCe3SX8BSwjdzI6BBbZLw==",
+ "version": "6.4.5",
+ "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.5.tgz",
+ "integrity": "sha512-AguB9yvTXmCnySBP1lWjfNNUwpbElsaQ567lt2VdGqAdHtpieLgjmcVyv1q7PMIvLbgpDdkWV5Ydv3FEejyp2A==",
"dev": true,
"dependencies": {
"@adobe/css-tools": "^4.3.2",
@@ -13958,7 +13958,7 @@
"chalk": "^3.0.0",
"css.escape": "^1.5.1",
"dom-accessibility-api": "^0.6.3",
- "lodash": "^4.17.15",
+ "lodash": "^4.17.21",
"redent": "^3.0.0"
},
"engines": {
@@ -15322,6 +15322,19 @@
"vite": "^4.2.0 || ^5.0.0"
}
},
+ "node_modules/@vitest/expect": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz",
+ "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==",
+ "dependencies": {
+ "@vitest/spy": "1.6.0",
+ "@vitest/utils": "1.6.0",
+ "chai": "^4.3.10"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
"node_modules/@vitest/runner": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.0.tgz",
@@ -41740,19 +41753,6 @@
}
}
},
- "node_modules/vitest/node_modules/@vitest/expect": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz",
- "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==",
- "dependencies": {
- "@vitest/spy": "1.6.0",
- "@vitest/utils": "1.6.0",
- "chai": "^4.3.10"
- },
- "funding": {
- "url": "https://opencollective.com/vitest"
- }
- },
"node_modules/vitest/node_modules/execa": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",