mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
Forbid substitute (#3734)
This commit is contained in:
parent
bb4f063fe7
commit
f6b2b75ad8
@ -101,7 +101,10 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"no-restricted-imports": ["error", { "patterns": ["src/**/*"] }]
|
"no-restricted-imports": [
|
||||||
|
"error",
|
||||||
|
{ "patterns": ["src/**/*"], "paths": ["@fluffy-spoon/substitute"] }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { Utils } from "@bitwarden/common/misc/utils";
|
import { Utils } from "@bitwarden/common/misc/utils";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { LogService } from "@bitwarden/common/abstractions/log.service";
|
import { LogService } from "@bitwarden/common/abstractions/log.service";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { NO_ERRORS_SCHEMA } from "@angular/core";
|
import { NO_ERRORS_SCHEMA } from "@angular/core";
|
||||||
import { ComponentFixture, TestBed } from "@angular/core/testing";
|
import { ComponentFixture, TestBed } from "@angular/core/testing";
|
||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute } from "@fluffy-spoon/substitute";
|
import { Substitute } from "@fluffy-spoon/substitute";
|
||||||
import { mock, MockProxy } from "jest-mock-extended";
|
import { mock, MockProxy } from "jest-mock-extended";
|
||||||
|
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
"**/app/shared/*",
|
"**/app/shared/*",
|
||||||
"@bitwarden/web-vault/*",
|
"@bitwarden/web-vault/*",
|
||||||
"src/**/*"
|
"src/**/*"
|
||||||
]
|
],
|
||||||
|
"paths": ["@fluffy-spoon/substitute"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from "@angular/core/testin
|
|||||||
import { FormBuilder, UntypedFormBuilder } from "@angular/forms";
|
import { FormBuilder, UntypedFormBuilder } from "@angular/forms";
|
||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { RouterTestingModule } from "@angular/router/testing";
|
import { RouterTestingModule } from "@angular/router/testing";
|
||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute } from "@fluffy-spoon/substitute";
|
import { Substitute } from "@fluffy-spoon/substitute";
|
||||||
import { BehaviorSubject } from "rxjs";
|
import { BehaviorSubject } from "rxjs";
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
|
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute, Arg, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Substitute, Arg, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
|
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
||||||
import { Jsonify } from "type-fest";
|
import { Jsonify } from "type-fest";
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
||||||
import { mock, MockProxy } from "jest-mock-extended";
|
import { mock, MockProxy } from "jest-mock-extended";
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { UriMatchType } from "@bitwarden/common/enums/uriMatchType";
|
import { UriMatchType } from "@bitwarden/common/enums/uriMatchType";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute, Arg, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Substitute, Arg, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { AbstractEncryptService } from "@bitwarden/common/abstractions/abstractEncrypt.service";
|
import { AbstractEncryptService } from "@bitwarden/common/abstractions/abstractEncrypt.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { SendType } from "@bitwarden/common/enums/sendType";
|
import { SendType } from "@bitwarden/common/enums/sendType";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
import { BehaviorSubject } from "rxjs";
|
import { BehaviorSubject } from "rxjs";
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
import { BehaviorSubject, firstValueFrom } from "rxjs";
|
import { BehaviorSubject, firstValueFrom } from "rxjs";
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
import { BehaviorSubject, firstValueFrom } from "rxjs";
|
import { BehaviorSubject, firstValueFrom } from "rxjs";
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
import { Arg, Substitute, SubstituteOf } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service";
|
import { AbstractStorageService } from "@bitwarden/common/abstractions/storage.service";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
import { Substitute, Arg } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { EncString } from "@bitwarden/common/models/domain/encString";
|
import { EncString } from "@bitwarden/common/models/domain/encString";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line no-restricted-imports
|
||||||
import { Substitute } from "@fluffy-spoon/substitute";
|
import { Substitute } from "@fluffy-spoon/substitute";
|
||||||
|
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
|
||||||
|
Loading…
Reference in New Issue
Block a user