mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
[PM-10813] add eslint rule to restrict imports from apps
in libs
(#10481)
* restrict app imports in libs * add eslint ignore comments
This commit is contained in:
parent
910ae7d799
commit
7571c766e0
@ -100,6 +100,11 @@
|
||||
"error",
|
||||
{
|
||||
"zones": [
|
||||
{
|
||||
"target": ["libs/**/*"],
|
||||
"from": ["apps/**/*"],
|
||||
"message": "Libs should not import app-specific code."
|
||||
},
|
||||
{
|
||||
// avoid specific frameworks or large dependencies in common
|
||||
"target": "./libs/common/**/*",
|
||||
|
@ -19,6 +19,8 @@ import { ThemeType } from "@bitwarden/common/platform/enums";
|
||||
import { ThemeStateService } from "@bitwarden/common/platform/theming/theme-state.service";
|
||||
import { ButtonModule } from "@bitwarden/components";
|
||||
|
||||
// FIXME: remove `/apps` import from `/libs`
|
||||
// eslint-disable-next-line import/no-restricted-paths
|
||||
import { PreloadedEnglishI18nModule } from "../../../../../apps/web/src/app/core/tests";
|
||||
import { LockIcon } from "../icons";
|
||||
import { RegistrationCheckEmailIcon } from "../icons/registration-check-email.icon";
|
||||
|
@ -11,6 +11,8 @@ import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.se
|
||||
import { PasswordStrengthServiceAbstraction } from "@bitwarden/common/tools/password-strength";
|
||||
import { DialogService, ToastService } from "@bitwarden/components";
|
||||
|
||||
// FIXME: remove `/apps` import from `/libs`
|
||||
// eslint-disable-next-line import/no-restricted-paths
|
||||
import { PreloadedEnglishI18nModule } from "../../../../../apps/web/src/app/core/tests";
|
||||
|
||||
import { InputPasswordComponent } from "./input-password.component";
|
||||
|
@ -27,6 +27,8 @@ import {
|
||||
TypographyModule,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
// FIXME: remove `/apps` import from `/libs`
|
||||
// eslint-disable-next-line import/no-restricted-paths
|
||||
import { PreloadedEnglishI18nModule } from "../../../../../../apps/web/src/app/core/tests";
|
||||
|
||||
import { RegistrationStartComponent } from "./registration-start.component";
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { mock } from "jest-mock-extended";
|
||||
import { firstValueFrom, Observable } from "rxjs";
|
||||
|
||||
// FIXME: remove `/apps` import from `/libs`
|
||||
// eslint-disable-next-line import/no-restricted-paths
|
||||
import { flushPromises } from "@bitwarden/browser/src/autofill/spec/testing-utils";
|
||||
|
||||
import { Fido2CredentialView } from "../../../vault/models/view/fido2-credential.view";
|
||||
|
@ -13,6 +13,8 @@ import { Send } from "@bitwarden/common/tools/send/models/domain/send";
|
||||
import { SendView } from "@bitwarden/common/tools/send/models/view/send.view";
|
||||
import { AsyncActionsModule, ButtonModule, ToastService } from "@bitwarden/components";
|
||||
import { SendFormConfig } from "@bitwarden/send-ui";
|
||||
// FIXME: remove `/apps` import from `/libs`
|
||||
// eslint-disable-next-line import/no-restricted-paths
|
||||
import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/src/app/core/tests";
|
||||
|
||||
import { SendFormService } from "./abstractions/send-form.service";
|
||||
|
@ -26,6 +26,8 @@ import {
|
||||
CipherFormGenerationService,
|
||||
PasswordRepromptService,
|
||||
} from "@bitwarden/vault";
|
||||
// FIXME: remove `/apps` import from `/libs`
|
||||
// eslint-disable-next-line import/no-restricted-paths
|
||||
import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/src/app/core/tests";
|
||||
|
||||
import { CipherFormService } from "./abstractions/cipher-form.service";
|
||||
|
Loading…
Reference in New Issue
Block a user