aboutsummaryrefslogtreecommitdiff
path: root/test/scripts
diff options
context:
space:
mode:
authorShinigami <[email protected]>2023-02-01 14:04:18 +0100
committerGitHub <[email protected]>2023-02-01 14:04:18 +0100
commit5b705d4b047640e91b690566d6e0fdbae17bb842 (patch)
treea179a77cca1b72e2c730607def2786a5531b531f /test/scripts
parentbe77179faf097383763eaa6414cf7b6a1a8b131a (diff)
downloadfaker-5b705d4b047640e91b690566d6e0fdbae17bb842.tar.xz
faker-5b705d4b047640e91b690566d6e0fdbae17bb842.zip
infra: configure lint rule array-type (#1793)
Diffstat (limited to 'test/scripts')
-rw-r--r--test/scripts/apidoc/examplesAndDeprecations.spec.ts2
-rw-r--r--test/scripts/apidoc/signature.example.ts8
2 files changed, 5 insertions, 5 deletions
diff --git a/test/scripts/apidoc/examplesAndDeprecations.spec.ts b/test/scripts/apidoc/examplesAndDeprecations.spec.ts
index ac73244c..8d6124e0 100644
--- a/test/scripts/apidoc/examplesAndDeprecations.spec.ts
+++ b/test/scripts/apidoc/examplesAndDeprecations.spec.ts
@@ -41,7 +41,7 @@ beforeAll(initMarkdownRenderer);
describe('examples and deprecations', () => {
const modules = loadProjectModules();
- const consoleSpies: Array<SpyInstance> = Object.keys(console)
+ const consoleSpies: SpyInstance[] = Object.keys(console)
.filter((key) => typeof console[key] === 'function')
.map((methodName) => vi.spyOn(console, methodName as keyof typeof console));
diff --git a/test/scripts/apidoc/signature.example.ts b/test/scripts/apidoc/signature.example.ts
index e9925626..26c35923 100644
--- a/test/scripts/apidoc/signature.example.ts
+++ b/test/scripts/apidoc/signature.example.ts
@@ -142,10 +142,10 @@ export class SignatureTest {
literalUnionParamMethod(
value: LiteralUnion<'a' | 'b'>,
namedValue: LiteralUnion<AB>,
- array: readonly LiteralUnion<'a' | 'b'>[],
- namedArray: readonly LiteralUnion<AB>[],
- mixed: LiteralUnion<'a' | 'b'> | readonly LiteralUnion<'a' | 'b'>[],
- namedMixed: readonly LiteralUnion<AB>[] | LiteralUnion<AB>
+ array: ReadonlyArray<LiteralUnion<'a' | 'b'>>,
+ namedArray: ReadonlyArray<LiteralUnion<AB>>,
+ mixed: LiteralUnion<'a' | 'b'> | ReadonlyArray<LiteralUnion<'a' | 'b'>>,
+ namedMixed: ReadonlyArray<LiteralUnion<AB>> | LiteralUnion<AB>
): string {
return (
value +