Skip to content

Commit 7d8cc3b

Browse files
committed
Merge branch '@invertase/v7-development' of https://github.com/firebase/firebaseui-web into @invertase/react-recaptcha-verifier
2 parents 98a99ed + 5db38b0 commit 7d8cc3b

File tree

142 files changed

+7854
-4061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+7854
-4061
lines changed

.github/workflows/lint.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Lint and Format Check
2+
3+
on:
4+
push:
5+
branches:
6+
- "@invertase/v7-development"
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
name: Lint and Format Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 10
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Run ESLint check
32+
run: pnpm run lint:check
33+
34+
- name: Run Prettier check
35+
run: pnpm run format:check

.github/workflows/test.yaml

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,38 @@ name: Test
33
on:
44
push:
55
branches:
6-
- "**"
6+
- "@invertase/v7-development"
77
pull_request:
8-
branches:
9-
- "**"
108

119
jobs:
12-
lint:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v4
17-
- name: Setup node
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version: '20'
21-
check-latest: true
22-
- name: Setup pnpm
23-
uses: pnpm/action-setup@v4
24-
with:
25-
version: latest
26-
- name: Install dependencies
27-
run: pnpm install
28-
- name: Run ESLint on core packages
29-
run: pnpm --filter="@firebase-ui/*" run lint
30-
- name: Run ESLint on example apps
31-
run: pnpm --filter="angular-example" --filter="nextjs" --filter="react" run lint
32-
- name: Check Prettier formatting
33-
run: pnpm format:check
3410

3511
test:
3612
runs-on: ubuntu-latest
3713
steps:
3814
- name: Checkout
3915
uses: actions/checkout@v4
16+
4017
- name: Setup node
4118
uses: actions/setup-node@v4
4219
with:
4320
node-version: '20'
4421
check-latest: true
22+
4523
- name: Setup pnpm
4624
uses: pnpm/action-setup@v4
4725
with:
4826
version: latest
27+
4928
- name: Install dependencies
5029
run: pnpm install
30+
31+
- name: Build packages
32+
run: pnpm run build
33+
5134
- name: Install Firebase CLI
5235
run: npm i -g [email protected]
53-
- name: Start Firebase emulator and run tests
36+
37+
- name: Start Firebase emulator
5438
run: |
5539
firebase emulators:start --only auth --project demo-test &
5640
sleep 15
@@ -59,5 +43,7 @@ jobs:
5943
echo "Waiting for emulator to start..."
6044
sleep 2
6145
done
62-
echo "Emulator is ready, running tests..."
63-
pnpm test
46+
echo "Emulator is ready"
47+
48+
- name: Run tests
49+
run: pnpm test

eslint.config.js

Lines changed: 0 additions & 134 deletions
This file was deleted.

eslint.config.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
2+
3+
import js from "@eslint/js";
4+
import { globalIgnores } from "eslint/config";
5+
import globals from "globals";
6+
import tseslint from "typescript-eslint";
7+
import pluginPrettier from "eslint-plugin-prettier";
8+
import pluginReact from "eslint-plugin-react";
9+
import pluginReactHooks from "eslint-plugin-react-hooks";
10+
11+
const config: any[] = [
12+
globalIgnores([
13+
"**/dist/**",
14+
"**/node_modules/**",
15+
"**/build/**",
16+
"**/.next/**",
17+
"**/.angular/**",
18+
"**/releases/**",
19+
"packages/styles/dist.css",
20+
"packages/angular/**",
21+
]),
22+
...tseslint.configs.recommended,
23+
{
24+
// All TypeScript files
25+
files: ["**/*.ts", "**/*.tsx"],
26+
plugins: { js, prettier: pluginPrettier },
27+
languageOptions: { globals: { ...globals.browser, ...globals.node } },
28+
rules: {
29+
"prettier/prettier": "error",
30+
"arrow-body-style": "off",
31+
"prefer-arrow-callback": "off",
32+
},
33+
},
34+
{
35+
// React package specific rules
36+
files: ["packages/react/src/**/*.{ts,tsx}"],
37+
plugins: { react: pluginReact, "react-hooks": pluginReactHooks },
38+
languageOptions: {
39+
parserOptions: {
40+
ecmaFeatures: {
41+
jsx: true,
42+
},
43+
},
44+
},
45+
settings: {
46+
react: {
47+
version: "detect",
48+
},
49+
},
50+
rules: {
51+
...pluginReact.configs.recommended.rules,
52+
...pluginReactHooks.configs.recommended.rules,
53+
"react/react-in-jsx-scope": "off", // Not needed with React 17+
54+
},
55+
},
56+
{
57+
// Test files - more lenient rules
58+
files: ["**/*.test.{ts,tsx}", "**/*.spec.{ts,tsx}", "**/tests/**/*.{ts,tsx}"],
59+
rules: {
60+
"@typescript-eslint/no-explicit-any": "off",
61+
"@typescript-eslint/no-unused-vars": "off",
62+
},
63+
},
64+
];
65+
66+
export default config;

examples/angular/src/main.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { bootstrapApplication } from "@angular/platform-browser";
17+
import { bootstrapApplication, BootstrapContext } from "@angular/platform-browser";
1818
import { AppComponent } from "./app/app.component";
1919
import { config } from "./app/app.config.server";
2020

21-
const bootstrap = (context: any) => bootstrapApplication(AppComponent, config, context);
21+
const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, config, context);
2222

2323
export default bootstrap;

examples/angular/src/test-setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
/**
23
* Copyright 2025 Google LLC
34
*

examples/react/src/components/header.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@
1818

1919
import { NavLink } from "react-router";
2020
import { useUser } from "../firebase/hooks";
21-
import { signOut, type User } from "firebase/auth";
21+
import { signOut } from "firebase/auth";
2222
import { auth } from "../firebase/firebase";
2323

2424
export function Header() {
2525
const user = useUser();
2626

2727
async function onSignOut() {
2828
await signOut(auth);
29-
router.push("/sign-in");
29+
// TODO: Use the router instead of window.location.href
30+
window.location.href = "/";
3031
}
3132

3233
return (

examples/react/src/firebase/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ export const firebaseConfig = {
2020
projectId: "fir-ui-rework",
2121
storageBucket: "fir-ui-rework.firebasestorage.app",
2222
messagingSenderId: "200312857118",
23-
appId: "1:200312857118:web:94e3f69b0e0a4a863f040f"
23+
appId: "1:200312857118:web:94e3f69b0e0a4a863f040f",
2424
};

examples/react/src/firebase/firebase.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,22 @@
1919
import { initializeApp, getApps } from "firebase/app";
2020
import { firebaseConfig } from "./config";
2121
import { connectAuthEmulator, getAuth } from "firebase/auth";
22-
import { autoAnonymousLogin, initializeUI } from "@firebase-ui/core";
22+
import { autoAnonymousLogin, initializeUI, oneTapSignIn } from "@firebase-ui/core";
2323

2424
export const firebaseApp = getApps().length === 0 ? initializeApp(firebaseConfig) : getApps()[0];
2525

2626
export const auth = getAuth(firebaseApp);
2727

28-
if (import.meta.env.MODE === "development") {
29-
connectAuthEmulator(auth, "http://localhost:9099");
30-
}
31-
3228
export const ui = initializeUI({
3329
app: firebaseApp,
34-
auth,
35-
behaviors: [autoAnonymousLogin()],
30+
behaviors: [
31+
autoAnonymousLogin(),
32+
oneTapSignIn({
33+
clientId: "200312857118-lscdui98fkaq7ffr81446blafjn5o6r0.apps.googleusercontent.com",
34+
}),
35+
],
3636
});
37+
38+
if (import.meta.env.MODE === "development") {
39+
connectAuthEmulator(auth, "http://localhost:9099");
40+
}

examples/react/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
@import "@firebase-ui/styles/tailwind";
1919

2020
/* @import "@firebase-ui/styles/src/themes/dark.css"; */
21-
/* @import "@firebase-ui/styles/src/themes/brutalist.css"; */
21+
/* @import "@firebase-ui/styles/src/themes/brutalist.css"; */

0 commit comments

Comments
 (0)