Skip to content

Commit 8daea56

Browse files
committed
Merge branch '@invertase/v7-development' of https://github.com/firebase/firebaseui-web into @invertase/align-translations
2 parents e4525a8 + ea7089b commit 8daea56

File tree

69 files changed

+3227
-30024
lines changed

Some content is hidden

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

69 files changed

+3227
-30024
lines changed

.github/workflows/test.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,29 @@ on:
99
- "**"
1010

1111
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
34+
1235
test:
1336
runs-on: ubuntu-latest
1437
steps:

.gitignore

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

18+
# Next.js
19+
.next
20+
21+
# Coverage
22+
coverage
23+
1824
# Editor directories and files
1925
.vscode/*
2026
!.vscode/extensions.json

.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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ If you are using [TailwindCSS](https://tailwindcss.com/), import the base CSS fr
131131

132132
```css
133133
@import "tailwindcss";
134-
@import "@firebase-ui/styles/src/base.css";
134+
@import "@firebase-ui/styles/tailwind";
135135
```
136136

137137
If you are not using Tailwind, import the distributable CSS in your project:
138138

139139
```css
140-
@import "@firebase-ui/styles/dist.css";
140+
@import "@firebase-ui/styles";
141141
```
142142

143143
To learn more about theming, view the [theming](#theming) section.

eslint.config.js

Lines changed: 95 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,119 @@
1616

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

2022
export default [
21-
{ ignores: ["**/dist/**", "**/node_modules/**", "**/releases/**", "**/.angular/**"] },
23+
{
24+
ignores: [
25+
"dist/**",
26+
"node_modules/**",
27+
"releases/**",
28+
"*.tgz",
29+
"**/dist/**",
30+
"**/node_modules/**",
31+
"**/build/**",
32+
"**/.next/**",
33+
"**/coverage/**",
34+
"**/.angular/**",
35+
"**/cache/**",
36+
"**/.cache/**",
37+
],
38+
},
2239
js.configs.recommended,
2340
prettier,
2441
{
25-
files: ["**/*.{js,jsx,ts,tsx}"],
42+
files: ["**/*.{js,jsx}"],
2643
languageOptions: {
2744
ecmaVersion: 2022,
2845
sourceType: "module",
46+
globals: {
47+
window: "readonly",
48+
console: "readonly",
49+
document: "readonly",
50+
process: "readonly",
51+
Buffer: "readonly",
52+
__dirname: "readonly",
53+
__filename: "readonly",
54+
global: "readonly",
55+
module: "readonly",
56+
require: "readonly",
57+
exports: "readonly",
58+
setImmediate: "readonly",
59+
clearImmediate: "readonly",
60+
URL: "readonly",
61+
clearInterval: "readonly",
62+
clearTimeout: "readonly",
63+
setTimeout: "readonly",
64+
setInterval: "readonly",
65+
},
66+
},
67+
rules: {
68+
"no-unused-vars": "off",
69+
"no-console": "warn",
70+
"prefer-const": "error",
71+
"no-var": "error",
72+
"no-undef": "off",
73+
},
74+
},
75+
{
76+
files: ["**/*.{ts,tsx}"],
77+
languageOptions: {
78+
ecmaVersion: 2022,
79+
sourceType: "module",
80+
parser: tsparser,
2981
parserOptions: {
3082
ecmaFeatures: {
3183
jsx: true,
3284
},
3385
},
86+
globals: {
87+
window: "readonly",
88+
console: "readonly",
89+
document: "readonly",
90+
process: "readonly",
91+
Buffer: "readonly",
92+
__dirname: "readonly",
93+
__filename: "readonly",
94+
global: "readonly",
95+
module: "readonly",
96+
require: "readonly",
97+
exports: "readonly",
98+
setImmediate: "readonly",
99+
clearImmediate: "readonly",
100+
URL: "readonly",
101+
clearInterval: "readonly",
102+
clearTimeout: "readonly",
103+
setTimeout: "readonly",
104+
setInterval: "readonly",
105+
React: "readonly",
106+
describe: "readonly",
107+
it: "readonly",
108+
expect: "readonly",
109+
beforeEach: "readonly",
110+
afterEach: "readonly",
111+
beforeAll: "readonly",
112+
afterAll: "readonly",
113+
vi: "readonly",
114+
test: "readonly",
115+
jest: "readonly",
116+
},
117+
},
118+
plugins: {
119+
"@typescript-eslint": tseslint,
34120
},
35121
rules: {
36-
// Core JavaScript rules
37-
"no-unused-vars": ["error", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
122+
"no-unused-vars": "off",
123+
"no-undef": "off",
38124
"no-console": "warn",
39125
"prefer-const": "error",
40126
"no-var": "error",
41-
42-
// Security and best practices
43-
"no-debugger": "error",
44-
"no-eval": "error",
45-
"no-implied-eval": "error",
46-
"no-new-func": "error",
47-
"no-script-url": "error",
48-
"no-with": "error",
49-
50-
// Modern JavaScript preferences
51-
"prefer-arrow-callback": "error",
52-
"prefer-template": "error",
53-
"prefer-destructuring": ["error", { object: true, array: false }],
54-
55-
// Code quality
56-
eqeqeq: ["error", "always"],
57-
"no-duplicate-imports": "error",
58-
"no-useless-return": "error",
59-
"no-useless-concat": "error",
127+
"@typescript-eslint/no-unused-vars": [
128+
"error",
129+
{ varsIgnorePattern: "^_", argsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_" },
130+
],
131+
"@typescript-eslint/no-explicit-any": "warn",
60132
},
61133
},
62134
];

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: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prefix": "app",
1111
"architect": {
1212
"build": {
13-
"builder": "@angular-devkit/build-angular:application",
13+
"builder": "@angular/build:application",
1414
"options": {
1515
"outputPath": "dist/angular-ssr",
1616
"index": "src/index.html",
@@ -26,7 +26,7 @@
2626
"styles": ["src/styles.css"],
2727
"scripts": [],
2828
"server": "src/main.server.ts",
29-
"prerender": true,
29+
"prerender": false,
3030
"ssr": {
3131
"entry": "src/server.ts"
3232
}
@@ -36,8 +36,8 @@
3636
"budgets": [
3737
{
3838
"type": "initial",
39-
"maximumWarning": "500kB",
40-
"maximumError": "1MB"
39+
"maximumWarning": "1MB",
40+
"maximumError": "2MB"
4141
},
4242
{
4343
"type": "anyComponentStyle",
@@ -56,7 +56,7 @@
5656
"defaultConfiguration": "production"
5757
},
5858
"serve": {
59-
"builder": "@angular-devkit/build-angular:dev-server",
59+
"builder": "@angular/build:dev-server",
6060
"configurations": {
6161
"production": {
6262
"buildTarget": "angular-ssr:build:production"
@@ -68,22 +68,7 @@
6868
"defaultConfiguration": "development"
6969
},
7070
"extract-i18n": {
71-
"builder": "@angular-devkit/build-angular:extract-i18n"
72-
},
73-
"test": {
74-
"builder": "@angular-devkit/build-angular: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-
}
71+
"builder": "@angular/build:extract-i18n"
8772
}
8873
}
8974
},
@@ -94,7 +79,7 @@
9479
"prefix": "lib",
9580
"architect": {
9681
"build": {
97-
"builder": "@angular-devkit/build-angular:ng-packagr",
82+
"builder": "@angular/build:ng-packagr",
9883
"options": {
9984
"project": "projects/angular/ng-package.json"
10085
},
@@ -107,18 +92,37 @@
10792
}
10893
},
10994
"defaultConfiguration": "production"
110-
},
111-
"test": {
112-
"builder": "@angular-devkit/build-angular:karma",
113-
"options": {
114-
"tsConfig": "projects/angular/tsconfig.spec.json",
115-
"polyfills": ["zone.js", "zone.js/testing"]
116-
}
11795
}
11896
}
11997
}
12098
},
12199
"cli": {
122100
"analytics": false
101+
},
102+
"schematics": {
103+
"@schematics/angular:component": {
104+
"type": "component"
105+
},
106+
"@schematics/angular:directive": {
107+
"type": "directive"
108+
},
109+
"@schematics/angular:service": {
110+
"type": "service"
111+
},
112+
"@schematics/angular:guard": {
113+
"typeSeparator": "."
114+
},
115+
"@schematics/angular:interceptor": {
116+
"typeSeparator": "."
117+
},
118+
"@schematics/angular:module": {
119+
"typeSeparator": "."
120+
},
121+
"@schematics/angular:pipe": {
122+
"typeSeparator": "."
123+
},
124+
"@schematics/angular:resolver": {
125+
"typeSeparator": "."
126+
}
123127
}
124128
}

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)