Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions .opensource/project.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
{
"name": "FirebaseUI for Web",

"platforms": [
"Web"
],

"content": "README.md",
"name": "FirebaseUI for Web",

"pages" : {
"LANGUAGES.md": "Supported Languages"
},
"related": [
"firebase/firebaseui-android",
"firebase/firebaseui-ios",
"firebase/firebaseui-web-react"
]
"platforms": ["Web"],

"content": "README.md",

"pages": {
"LANGUAGES.md": "Supported Languages"
},

"related": ["firebase/firebaseui-android", "firebase/firebaseui-ios", "firebase/firebaseui-web-react"]
}
22 changes: 22 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dependencies
node_modules/
pnpm-lock.yaml
package-lock.json
yarn.lock

# Build outputs
dist/
build/
.angular/
releases/

# Generated files
*.min.js
*.min.css

# Logs
*.log

# OS generated files
.DS_Store
Thumbs.db
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": false,
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"endOfLine": "auto"
}
62 changes: 62 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import js from "@eslint/js";
import prettier from "eslint-config-prettier";

export default [
{ ignores: ["**/dist/**", "**/node_modules/**", "**/releases/**", "**/.angular/**"] },
js.configs.recommended,
prettier,
{
files: ["**/*.{js,jsx,ts,tsx}"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
rules: {
// Core JavaScript rules
"no-unused-vars": ["error", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
"no-console": "warn",
"prefer-const": "error",
"no-var": "error",

// Security and best practices
"no-debugger": "error",
"no-eval": "error",
"no-implied-eval": "error",
"no-new-func": "error",
"no-script-url": "error",
"no-with": "error",

// Modern JavaScript preferences
"prefer-arrow-callback": "error",
"prefer-template": "error",
"prefer-destructuring": ["error", { object: true, array: false }],

// Code quality
eqeqeq: ["error", "always"],
"no-duplicate-imports": "error",
"no-useless-return": "error",
"no-useless-concat": "error",
},
},
];
2 changes: 1 addition & 1 deletion examples/angular/.postcssrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"plugins": {
"@tailwindcss/postcss": {}
}
}
}
9 changes: 9 additions & 0 deletions examples/angular/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": false,
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"endOfLine": "auto"
}
22 changes: 5 additions & 17 deletions examples/angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@
"outputPath": "dist/angular-ssr",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.css"
],
"styles": ["src/styles.css"],
"scripts": [],
"server": "src/main.server.ts",
"prerender": true,
Expand Down Expand Up @@ -77,20 +73,15 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.css"
],
"styles": ["src/styles.css"],
"scripts": []
}
}
Expand Down Expand Up @@ -121,10 +112,7 @@
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "projects/firebaseui-angular/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
"polyfills": ["zone.js", "zone.js/testing"]
}
}
}
Expand Down
42 changes: 42 additions & 0 deletions examples/angular/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import js from "@eslint/js";
import prettier from "eslint-config-prettier";

export default [
{ ignores: ["dist/**", "node_modules/**", ".angular/**"] },
js.configs.recommended,
prettier,
{
files: ["**/*.ts"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
parserOptions: {
project: "./tsconfig.json",
},
},
rules: {
"no-unused-vars": ["error", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
"no-console": "warn",
"prefer-const": "error",
"no-var": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": ["error", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
},
},
];
10 changes: 9 additions & 1 deletion examples/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"test": "ng test",
"test:unit": "ng test --exclude=\"**/integration/**\" --no-watch --no-progress --browsers=ChromeHeadless",
"test:integration": "ng test --include=\"**/tests/integration/**/*.spec.ts\" --no-watch --no-progress --browsers=ChromeHeadless",
"serve:ssr:angular-ssr": "node dist/angular-ssr/server/server.mjs"
"serve:ssr:angular-ssr": "node dist/angular-ssr/server/server.mjs",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"format": "prettier --write \"src/**/*.{ts,html,css,scss}\"",
"format:check": "prettier --check \"src/**/*.{ts,html,css,scss}\""
},
"dependencies": {
"@angular/animations": "^19.1.0",
Expand Down Expand Up @@ -41,10 +45,13 @@
"@angular-devkit/build-angular": "^19.1.7",
"@angular/cli": "^19.1.7",
"@angular/compiler-cli": "^19.1.0",
"@eslint/js": "^9.22.0",
"@tanstack/angular-form": "^0.42.0",
"@types/express": "^4.17.17",
"@types/jasmine": "~5.1.0",
"@types/node": "^18.18.0",
"eslint": "^9.22.0",
"eslint-config-prettier": "^9.1.0",
"firebase": "^11",
"jasmine-core": "~5.5.0",
"karma": "~6.4.0",
Expand All @@ -54,6 +61,7 @@
"karma-jasmine-html-reporter": "~2.1.0",
"nanostores": "^0.11.3",
"ng-packagr": "^19.1.0",
"prettier": "^3.1.1",
"typescript": "~5.7.2"
}
}
1 change: 0 additions & 1 deletion examples/angular/src/app/app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

46 changes: 27 additions & 19 deletions examples/angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/

import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { CommonModule } from '@angular/common';
import { HeaderComponent } from './components/header';
import { Component } from "@angular/core";
import { RouterOutlet } from "@angular/router";
import { CommonModule } from "@angular/common";
import { HeaderComponent } from "./components/header";

@Component({
selector: 'app-root',
selector: "app-root",
standalone: true,
imports: [CommonModule, RouterOutlet, HeaderComponent],
template: `
Expand All @@ -29,20 +29,28 @@ import { HeaderComponent } from './components/header';
<router-outlet></router-outlet>
</div>
`,
styles: [`
.app-container {
max-width: 1200px;
margin: 0 auto;
}

:host {
display: block;
min-height: 100vh;
background-color: #f9fafb;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
`]
styles: [
`
.app-container {
max-width: 1200px;
margin: 0 auto;
}

:host {
display: block;
min-height: 100vh;
background-color: #f9fafb;
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
sans-serif;
}
`,
],
})
export class AppComponent {
title = 'Firebase UI Angular Example';
title = "Firebase UI Angular Example";
}
10 changes: 4 additions & 6 deletions examples/angular/src/app/app.config.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@
* limitations under the License.
*/

import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
import { provideServerRendering } from '@angular/platform-server';
import { appConfig } from './app.config';
import { mergeApplicationConfig, ApplicationConfig } from "@angular/core";
import { provideServerRendering } from "@angular/platform-server";
import { appConfig } from "./app.config";

const serverConfig: ApplicationConfig = {
providers: [
provideServerRendering(),
]
providers: [provideServerRendering()],
};

export const config = mergeApplicationConfig(appConfig, serverConfig);
Loading