Skip to content

Commit 8c532fe

Browse files
committed
Merge branch '@invertase/v7-development' of https://github.com/firebase/firebaseui-web into @invertase/brands
2 parents 1fdf14a + ef2b203 commit 8c532fe

File tree

149 files changed

+17975
-27253
lines changed

Some content is hidden

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

149 files changed

+17975
-27253
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: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,38 @@ name: Test
33
on:
44
push:
55
branches:
6-
- "**"
6+
- "@invertase/v7-development"
77
pull_request:
8-
branches:
9-
- "**"
108

119
jobs:
10+
1211
test:
1312
runs-on: ubuntu-latest
1413
steps:
1514
- name: Checkout
1615
uses: actions/checkout@v4
16+
1717
- name: Setup node
1818
uses: actions/setup-node@v4
1919
with:
2020
node-version: '20'
2121
check-latest: true
22+
2223
- name: Setup pnpm
2324
uses: pnpm/action-setup@v4
2425
with:
2526
version: latest
27+
2628
- name: Install dependencies
2729
run: pnpm install
30+
31+
- name: Build packages
32+
run: pnpm run build
33+
2834
- name: Install Firebase CLI
2935
run: npm i -g [email protected]
30-
- name: Start Firebase emulator and run tests
36+
37+
- name: Start Firebase emulator
3138
run: |
3239
firebase emulators:start --only auth --project demo-test &
3340
sleep 15
@@ -36,5 +43,7 @@ jobs:
3643
echo "Waiting for emulator to start..."
3744
sleep 2
3845
done
39-
echo "Emulator is ready, running tests..."
40-
pnpm test
46+
echo "Emulator is ready"
47+
48+
- name: Run tests
49+
run: pnpm test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ dist-ssr
1515
# Angular
1616
.angular
1717

18+
# Next.js
19+
.next
20+
1821
# Coverage
1922
coverage
2023

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ releases/
1313
# Generated files
1414
*.min.js
1515
*.min.css
16+
packages/styles/dist.css
1617

1718
# Logs
1819
*.log

eslint.config.js

Lines changed: 0 additions & 62 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/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ This will compile your project and store the build artifacts in the `dist/` dire
3838

3939
## Running unit tests
4040

41-
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
41+
To execute unit tests with [Vitest](https://vitest.dev), use the following command:
4242

4343
```bash
44-
ng test
44+
pnpm test
4545
```
4646

4747
## Running end-to-end tests

examples/angular/angular.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,6 @@
6969
},
7070
"extract-i18n": {
7171
"builder": "@angular/build:extract-i18n"
72-
},
73-
"test": {
74-
"builder": "@angular/build:karma",
75-
"options": {
76-
"polyfills": ["zone.js", "zone.js/testing"],
77-
"tsConfig": "tsconfig.spec.json",
78-
"assets": [
79-
{
80-
"glob": "**/*",
81-
"input": "public"
82-
}
83-
],
84-
"styles": ["src/styles.css"],
85-
"scripts": []
86-
}
8772
}
8873
}
8974
},
@@ -107,13 +92,6 @@
10792
}
10893
},
10994
"defaultConfiguration": "production"
110-
},
111-
"test": {
112-
"builder": "@angular/build:karma",
113-
"options": {
114-
"tsConfig": "projects/angular/tsconfig.spec.json",
115-
"polyfills": ["zone.js", "zone.js/testing"]
116-
}
11795
}
11896
}
11997
}

examples/angular/eslint.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
import js from "@eslint/js";
1818
import prettier from "eslint-config-prettier";
19+
import typescript from "@typescript-eslint/eslint-plugin";
20+
import typescriptParser from "@typescript-eslint/parser";
1921

2022
export default [
2123
{ ignores: ["dist/**", "node_modules/**", ".angular/**"] },
@@ -26,13 +28,18 @@ export default [
2628
languageOptions: {
2729
ecmaVersion: 2022,
2830
sourceType: "module",
31+
parser: typescriptParser,
2932
parserOptions: {
3033
project: "./tsconfig.json",
3134
},
3235
},
36+
plugins: {
37+
"@typescript-eslint": typescript,
38+
},
3339
rules: {
34-
"no-unused-vars": ["error", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
35-
"no-console": "warn",
40+
"no-unused-vars": "off", // Use TypeScript version instead
41+
"no-console": "off", // Allow console in examples
42+
"no-undef": "off", // TypeScript handles this
3643
"prefer-const": "error",
3744
"no-var": "error",
3845
"@typescript-eslint/no-explicit-any": "warn",

0 commit comments

Comments
 (0)