Skip to content

Commit 0f6bca7

Browse files
authored
chore(*): added formatting and linting
2 parents 118ed70 + e6da722 commit 0f6bca7

File tree

230 files changed

+14645
-6728
lines changed

Some content is hidden

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

230 files changed

+14645
-6728
lines changed

.opensource/project.json

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
{
2-
"name": "FirebaseUI for Web",
3-
4-
"platforms": [
5-
"Web"
6-
],
7-
8-
"content": "README.md",
2+
"name": "FirebaseUI for Web",
93

10-
"pages" : {
11-
"LANGUAGES.md": "Supported Languages"
12-
},
13-
14-
"related": [
15-
"firebase/firebaseui-android",
16-
"firebase/firebaseui-ios",
17-
"firebase/firebaseui-web-react"
18-
]
4+
"platforms": ["Web"],
5+
6+
"content": "README.md",
7+
8+
"pages": {
9+
"LANGUAGES.md": "Supported Languages"
10+
},
11+
12+
"related": ["firebase/firebaseui-android", "firebase/firebaseui-ios", "firebase/firebaseui-web-react"]
1913
}

.prettierignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Dependencies
2+
node_modules/
3+
pnpm-lock.yaml
4+
package-lock.json
5+
yarn.lock
6+
7+
# Build outputs
8+
dist/
9+
build/
10+
.angular/
11+
releases/
12+
13+
# Generated files
14+
*.min.js
15+
*.min.css
16+
17+
# Logs
18+
*.log
19+
20+
# OS generated files
21+
.DS_Store
22+
Thumbs.db

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": false,
5+
"printWidth": 120,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"endOfLine": "auto"
9+
}

eslint.config.js

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/**
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import js from "@eslint/js";
18+
import prettier from "eslint-config-prettier";
19+
20+
export default [
21+
{ ignores: ["**/dist/**", "**/node_modules/**", "**/releases/**", "**/.angular/**"] },
22+
js.configs.recommended,
23+
prettier,
24+
{
25+
files: ["**/*.{js,jsx,ts,tsx}"],
26+
languageOptions: {
27+
ecmaVersion: 2022,
28+
sourceType: "module",
29+
parserOptions: {
30+
ecmaFeatures: {
31+
jsx: true,
32+
},
33+
},
34+
},
35+
rules: {
36+
// Core JavaScript rules
37+
"no-unused-vars": ["error", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
38+
"no-console": "warn",
39+
"prefer-const": "error",
40+
"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",
60+
},
61+
},
62+
];

examples/angular/.postcssrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"plugins": {
33
"@tailwindcss/postcss": {}
44
}
5-
}
5+
}

examples/angular/.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": false,
5+
"printWidth": 120,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"endOfLine": "auto"
9+
}

examples/angular/angular.json

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,15 @@
1515
"outputPath": "dist/angular-ssr",
1616
"index": "src/index.html",
1717
"browser": "src/main.ts",
18-
"polyfills": [
19-
"zone.js"
20-
],
18+
"polyfills": ["zone.js"],
2119
"tsConfig": "tsconfig.app.json",
2220
"assets": [
2321
{
2422
"glob": "**/*",
2523
"input": "public"
2624
}
2725
],
28-
"styles": [
29-
"src/styles.css"
30-
],
26+
"styles": ["src/styles.css"],
3127
"scripts": [],
3228
"server": "src/main.server.ts",
3329
"prerender": true,
@@ -77,20 +73,15 @@
7773
"test": {
7874
"builder": "@angular-devkit/build-angular:karma",
7975
"options": {
80-
"polyfills": [
81-
"zone.js",
82-
"zone.js/testing"
83-
],
76+
"polyfills": ["zone.js", "zone.js/testing"],
8477
"tsConfig": "tsconfig.spec.json",
8578
"assets": [
8679
{
8780
"glob": "**/*",
8881
"input": "public"
8982
}
9083
],
91-
"styles": [
92-
"src/styles.css"
93-
],
84+
"styles": ["src/styles.css"],
9485
"scripts": []
9586
}
9687
}
@@ -121,10 +112,7 @@
121112
"builder": "@angular-devkit/build-angular:karma",
122113
"options": {
123114
"tsConfig": "projects/firebaseui-angular/tsconfig.spec.json",
124-
"polyfills": [
125-
"zone.js",
126-
"zone.js/testing"
127-
]
115+
"polyfills": ["zone.js", "zone.js/testing"]
128116
}
129117
}
130118
}

examples/angular/eslint.config.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import js from "@eslint/js";
18+
import prettier from "eslint-config-prettier";
19+
20+
export default [
21+
{ ignores: ["dist/**", "node_modules/**", ".angular/**"] },
22+
js.configs.recommended,
23+
prettier,
24+
{
25+
files: ["**/*.ts"],
26+
languageOptions: {
27+
ecmaVersion: 2022,
28+
sourceType: "module",
29+
parserOptions: {
30+
project: "./tsconfig.json",
31+
},
32+
},
33+
rules: {
34+
"no-unused-vars": ["error", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
35+
"no-console": "warn",
36+
"prefer-const": "error",
37+
"no-var": "error",
38+
"@typescript-eslint/no-explicit-any": "warn",
39+
"@typescript-eslint/no-unused-vars": ["error", { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }],
40+
},
41+
},
42+
];

examples/angular/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
"test": "ng test",
1212
"test:unit": "ng test --exclude=\"**/integration/**\" --no-watch --no-progress --browsers=ChromeHeadless",
1313
"test:integration": "ng test --include=\"**/tests/integration/**/*.spec.ts\" --no-watch --no-progress --browsers=ChromeHeadless",
14-
"serve:ssr:angular-ssr": "node dist/angular-ssr/server/server.mjs"
14+
"serve:ssr:angular-ssr": "node dist/angular-ssr/server/server.mjs",
15+
"lint": "eslint . --ext .ts",
16+
"lint:fix": "eslint . --ext .ts --fix",
17+
"format": "prettier --write \"src/**/*.{ts,html,css,scss}\"",
18+
"format:check": "prettier --check \"src/**/*.{ts,html,css,scss}\""
1519
},
1620
"dependencies": {
1721
"@angular/animations": "^19.1.0",
@@ -41,10 +45,13 @@
4145
"@angular-devkit/build-angular": "^19.1.7",
4246
"@angular/cli": "^19.1.7",
4347
"@angular/compiler-cli": "^19.1.0",
48+
"@eslint/js": "^9.22.0",
4449
"@tanstack/angular-form": "^0.42.0",
4550
"@types/express": "^4.17.17",
4651
"@types/jasmine": "~5.1.0",
4752
"@types/node": "^18.18.0",
53+
"eslint": "^9.22.0",
54+
"eslint-config-prettier": "^9.1.0",
4855
"firebase": "^11",
4956
"jasmine-core": "~5.5.0",
5057
"karma": "~6.4.0",
@@ -54,6 +61,7 @@
5461
"karma-jasmine-html-reporter": "~2.1.0",
5562
"nanostores": "^0.11.3",
5663
"ng-packagr": "^19.1.0",
64+
"prettier": "^3.1.1",
5765
"typescript": "~5.7.2"
5866
}
5967
}

examples/angular/src/app/app.component.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-

0 commit comments

Comments
 (0)