Skip to content

Commit 71e57df

Browse files
committed
chore: Add type-imports eslint rule + fix
1 parent dc136a1 commit 71e57df

Some content is hidden

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

50 files changed

+104
-89
lines changed

eslint.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const config: any[] = [
1616
"**/.next/**",
1717
"**/.angular/**",
1818
"**/releases/**",
19+
"**/shadcn/public-dev/**",
1920
"packages/styles/dist.css",
2021
"packages/angular/**",
2122
]),
@@ -29,6 +30,14 @@ const config: any[] = [
2930
"prettier/prettier": "error",
3031
"arrow-body-style": "off",
3132
"prefer-arrow-callback": "off",
33+
"@typescript-eslint/consistent-type-imports": [
34+
"error",
35+
{
36+
disallowTypeAnnotations: false,
37+
prefer: "type-imports",
38+
fixStyle: "inline-type-imports",
39+
},
40+
],
3241
},
3342
},
3443
{
@@ -59,6 +68,7 @@ const config: any[] = [
5968
rules: {
6069
"@typescript-eslint/no-explicit-any": "off",
6170
"@typescript-eslint/no-unused-vars": "off",
71+
"@typescript-eslint/consistent-type-imports": "off",
6272
},
6373
},
6474
];

examples/angular/src/app/app.config.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { mergeApplicationConfig, ApplicationConfig } from "@angular/core";
17+
import { mergeApplicationConfig, type ApplicationConfig } from "@angular/core";
1818
import { provideServerRendering, withRoutes } from "@angular/ssr";
1919
import { serverRoutes } from "./app.routes.server";
2020
import { appConfig } from "./app.config";

examples/angular/src/app/app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { ApplicationConfig, provideZoneChangeDetection, isDevMode } from "@angular/core";
17+
import { type ApplicationConfig, provideZoneChangeDetection, isDevMode } from "@angular/core";
1818
import { provideRouter } from "@angular/router";
1919

2020
import { routes } from "./app.routes";

examples/angular/src/app/app.routes.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { RenderMode, ServerRoute } from "@angular/ssr";
17+
import { RenderMode, type ServerRoute } from "@angular/ssr";
1818

1919
export const serverRoutes: ServerRoute[] = [
2020
/** Home page - perfect for SSG as it's a static landing page */

examples/angular/src/app/app.routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { Routes } from "@angular/router";
17+
import { type Routes } from "@angular/router";
1818

1919
export const routes: Routes = [
2020
{

examples/angular/src/app/auth/email-link-oauth/email-link-oauth.component.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 { Component, OnInit, inject } from "@angular/core";
17+
import { Component, type OnInit, inject } from "@angular/core";
1818
import { CommonModule } from "@angular/common";
1919
import { Router, RouterModule } from "@angular/router";
20-
import { Auth, User, authState } from "@angular/fire/auth";
20+
import { Auth, type User, authState } from "@angular/fire/auth";
2121
import { EmailLinkAuthScreenComponent, GoogleSignInButtonComponent } from "@firebase-ui/angular";
2222

2323
@Component({

examples/angular/src/app/auth/email-link-screen/email-link-screen.component.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 { Component, OnInit, inject } from "@angular/core";
17+
import { Component, type OnInit, inject } from "@angular/core";
1818
import { CommonModule } from "@angular/common";
1919
import { Router, RouterModule } from "@angular/router";
20-
import { Auth, User, authState } from "@angular/fire/auth";
20+
import { Auth, type User, authState } from "@angular/fire/auth";
2121
import { EmailLinkAuthScreenComponent } from "@firebase-ui/angular";
2222

2323
@Component({

examples/angular/src/app/auth/email-link/email-link.component.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 { Component, OnInit, inject } from "@angular/core";
17+
import { Component, type OnInit, inject } from "@angular/core";
1818
import { CommonModule } from "@angular/common";
1919
import { Router, RouterModule } from "@angular/router";
20-
import { Auth, User, authState } from "@angular/fire/auth";
20+
import { Auth, type User, authState } from "@angular/fire/auth";
2121
import { EmailLinkAuthScreenComponent } from "@firebase-ui/angular";
2222

2323
@Component({

examples/angular/src/app/auth/forgot-password/forgot-password.component.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 { Component, OnInit, inject } from "@angular/core";
17+
import { Component, type OnInit, inject } from "@angular/core";
1818
import { CommonModule } from "@angular/common";
1919
import { Router, RouterModule } from "@angular/router";
20-
import { Auth, User, authState } from "@angular/fire/auth";
20+
import { Auth, type User, authState } from "@angular/fire/auth";
2121
import { PasswordResetScreenComponent } from "@firebase-ui/angular";
2222

2323
@Component({

examples/angular/src/app/auth/oauth/oauth.component.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 { Component, OnInit, inject } from "@angular/core";
17+
import { Component, type OnInit, inject } from "@angular/core";
1818
import { CommonModule } from "@angular/common";
1919
import { Router, RouterModule } from "@angular/router";
20-
import { Auth, User, authState } from "@angular/fire/auth";
20+
import { Auth, type User, authState } from "@angular/fire/auth";
2121
import { OAuthScreenComponent, GoogleSignInButtonComponent } from "@firebase-ui/angular";
2222

2323
@Component({

0 commit comments

Comments
 (0)