Skip to content

Commit 746a2ab

Browse files
authored
Eslint consitent types (#181)
* update @frontside/eslint-config and apply @typescript/consistent-types * add changeSet * run lint --fix in integrations/cypress
1 parent f85818b commit 746a2ab

Some content is hidden

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

67 files changed

+535
-581
lines changed

.changes/apply-consistent-types.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@simulacrum/server": patch
3+
"@simulacrum/client": patch
4+
"@simulacrum/ui": patch
5+
"@simulacrum/auth0-simulator": patch
6+
"@simulacrum/ldap-simulator": patch
7+
"@simulacrum/auth0-cypress": patch
8+
---
9+
apply @typescript/consistent-types

examples/create-react-app/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nextjs/nextjs-auth0/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integrations/cypress/cypress/support/commands/auth0_react/auth.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Auth0Client, Auth0ClientOptions } from '@auth0/auth0-spa-js';
1+
import type { Auth0ClientOptions } from '@auth0/auth0-spa-js';
2+
import { Auth0Client } from '@auth0/auth0-spa-js';
23

34
const Auth0ConfigDefaults: Pick<Auth0ClientOptions, 'connection' | 'scope'> = {
45
connection: 'Username-Password-Authentication',

integrations/cypress/cypress/support/commands/auth0_react/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CommandMaker } from '../../types';
1+
import type { CommandMaker } from '../../types';
22
import { assert } from 'assert-ts';
33
import { makeCypressLogger } from '../../utils/cypress-logger';
44

integrations/cypress/cypress/support/commands/create-simulation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CommandMaker, CreateSimulation } from '../types';
1+
import type { CommandMaker, CreateSimulation } from '../types';
22
import { getAuth0Config } from '../utils/config';
33
import { makeCypressLogger } from '../utils/cypress-logger';
44
import { SimulationId } from './constants';

integrations/cypress/cypress/support/commands/destroy-simulation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Simulation } from '@simulacrum/client';
2-
import { CommandMaker } from '../types';
1+
import type { Simulation } from '@simulacrum/client';
2+
import type { CommandMaker } from '../types';
33
import { makeCypressLogger } from '../utils/cypress-logger';
44
import { SimulationId } from './constants';
55

integrations/cypress/cypress/support/commands/given.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CommandMaker, Person } from '../types';
1+
import type { CommandMaker, Person } from '../types';
22
import { assert } from 'assert-ts';
33
import { makeCypressLogger } from '../utils/cypress-logger';
44

integrations/cypress/cypress/support/commands/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import { createAtom } from '@effection/atom';
44
import { makeCreateSimulation } from './create-simulation';
5-
import { CreateSimulation, Person, TestState, Token } from '../types';
5+
import type { CreateSimulation, Person, TestState, Token } from '../types';
66
import { makeGetClientFromSpec } from '../utils/spec';
77
import { makeGiven } from './given';
88
import { makeSDKCommands } from './add-sdk-commands';
9-
import { Auth0Result } from 'auth0-js';
9+
import type { Auth0Result } from 'auth0-js';
1010
import './nextjs_auth0/get-user-info';
1111
import './nextjs_auth0/get-user-tokens';
1212
import { makeDestroySimulation } from './destroy-simulation';

integrations/cypress/cypress/support/commands/nextjs_auth0/get-user-tokens.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Person } from '../../types';
2-
import { DefaultDirectoryLoginOptions } from 'auth0-js';
1+
import type { Person } from '../../types';
2+
import type { DefaultDirectoryLoginOptions } from 'auth0-js';
33
import { makeCypressLogger } from '../../utils/cypress-logger';
44
import { getConfig } from '../../utils/config';
55

integrations/cypress/cypress/support/commands/nextjs_auth0/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CommandMaker } from '../../types';
1+
import type { CommandMaker } from '../../types';
22
import { assert } from 'assert-ts';
33
import { makeCypressLogger } from '../../utils/cypress-logger';
44
import { getConfig } from '../../utils/config';

integrations/cypress/cypress/support/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Slice } from '@effection/atom';
2-
import { AuthOptions } from 'auth0-js';
3-
import { Client, Simulation } from '@simulacrum/client';
2+
import type { AuthOptions } from 'auth0-js';
3+
import type { Client, Simulation } from '@simulacrum/client';
44

55
export type Auth0SDKs = 'nextjs_auth0' | 'auth0_react'
66

integrations/cypress/cypress/support/utils/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Auth0SDKs } from '../types';
1+
import type { Auth0SDKs } from '../types';
22

33
interface Config {
44
sessionCookieName: string;

integrations/cypress/cypress/support/utils/encrypt.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { EncryptPayload } from '../types';
22
import hkdf from 'futoin-hkdf';
3-
import { EncryptJWT, JWTPayload } from 'jose';
3+
import type { JWTPayload } from 'jose';
4+
import { EncryptJWT } from 'jose';
45

56
const BYTE_LENGTH = 32;
67
const ENCRYPTION_INFO = 'JWE CEK';

integrations/cypress/cypress/support/utils/spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { Slice } from '@effection/atom';
2-
import { Client, createClient } from '@simulacrum/client';
3-
import { TestState } from '../types';
1+
import type { Slice } from '@effection/atom';
2+
import type { Client } from '@simulacrum/client';
3+
import { createClient } from '@simulacrum/client';
4+
import type { TestState } from '../types';
45

56
export interface MakeGetClientFromSpecOptions {
67
atom: Slice<TestState>;

0 commit comments

Comments
 (0)