Skip to content

Commit afa4770

Browse files
authored
Merge pull request #1023 from joshunrau/v1.6.2
2 parents fa6a110 + fe3400a commit afa4770

File tree

40 files changed

+1258
-1715
lines changed

40 files changed

+1258
-1715
lines changed

apps/api/src/auth/auth.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class AuthService {
4444

4545
/** Wraps UserService.getByUsername with appropriate exception handling */
4646
private async getUser(username: string) {
47-
let user: { groups: GroupModel[] } & UserModel;
47+
let user: UserModel & { groups: GroupModel[] };
4848
try {
4949
user = await this.usersService.findByUsername(username);
5050
// user = await this.usersService.findByUsername(username).then((doc) => doc.toObject({ virtuals: true }));

apps/api/src/auth/strategies/jwt.strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') {
3535

3636
/** Returns the user associated with the JWT if they exist, otherwise throws UnauthorizedException */
3737
private async getUser(username: string) {
38-
let user: { groups: GroupModel[] } & UserModel;
38+
let user: UserModel & { groups: GroupModel[] };
3939
try {
4040
user = await this.usersService.findByUsername(username);
4141
} catch (error) {

apps/api/src/demo/demo.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class DemoService {
7474
await this.instrumentsService.create({ bundle: happinessQuestionnaireWithConsent });
7575
this.logger.debug('Done creating series instruments');
7676

77-
const groups: ({ dummyIdPrefix?: string } & Group)[] = [];
77+
const groups: (Group & { dummyIdPrefix?: string })[] = [];
7878
for (const group of DEMO_GROUPS) {
7979
const { dummyIdPrefix, ...createGroupData } = group;
8080
const groupModel = await this.groupsService.create(createGroupData);

apps/api/src/instruments/instruments.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class InstrumentsService {
145145
async findById(
146146
id: string,
147147
{ ability }: EntityOperationOptions = {}
148-
): Promise<{ bundle: string; id: string } & AnyInstrument> {
148+
): Promise<AnyInstrument & { bundle: string; id: string }> {
149149
const instrument = await this.instrumentModel.findFirst({
150150
where: { AND: [accessibleQuery(ability, 'read', 'Instrument')], id }
151151
});

apps/api/src/prisma/prisma.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { ExtendedPrismaClient } from './prisma.factory';
55

66
export type ModelReferenceName = Uncapitalize<Prisma.ModelName>;
77

8-
export type ModelName<T extends ModelEntityName> = `${T}Model` & Prisma.ModelName;
8+
export type ModelName<T extends ModelEntityName> = Prisma.ModelName & `${T}Model`;
99

1010
export type ModelEntityName = Replace<Prisma.ModelName, 'Model', ''>;
1111

apps/playground/src/components/Editor/EditorPane.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const EditorPane = React.forwardRef<EditorPaneRef, EditorPaneProps>(funct
3434
const editorRef = useRef<MonacoEditorType | null>(null);
3535
const monacoRef = useRef<MonacoType | null>(null);
3636

37-
const [defaultFile, setDefaultFile] = useState<({ id: string } & EditorFile) | null>(null);
37+
const [defaultFile, setDefaultFile] = useState<(EditorFile & { id: string }) | null>(null);
3838
const filesRef = useFilesRef();
3939

4040
useImperativeHandle(

apps/playground/src/components/Header/UploadButton/UploadButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const UploadButton = () => {
2020
const instruments = useAppStore((store) => store.instruments);
2121

2222
const handleSubmit = async (files: File[]) => {
23-
const zip = new JSZip() as { comment?: unknown } & JSZip;
23+
const zip = new JSZip() as JSZip & { comment?: unknown };
2424
await zip.loadAsync(files[0]!);
2525
let label: string;
2626
try {

apps/playground/src/instruments/examples/interactive/Interactive-With-Vanilla/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export default defineInstrument({
7878
dy = -dy;
7979
b.status = 0;
8080
score++;
81+
// eslint-disable-next-line max-depth
8182
if (score === brickRowCount * brickColumnCount) {
8283
done({
8384
livesRemaining: lives,

apps/playground/src/utils/encode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { z } from 'zod';
44
import { $EditorFile, type EditorFile } from '@/models/editor-file.model';
55
import type { InstrumentRepository } from '@/models/instrument-repository.model';
66

7-
type ShareURL = { size: number } & URL;
7+
type ShareURL = URL & { size: number };
88

99
const $EditorFiles = z.array($EditorFile);
1010

apps/playground/src/vim/adapter.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-lines */
21
/* eslint-disable no-fallthrough */
32

43
/* eslint-disable @typescript-eslint/no-unsafe-member-access */

0 commit comments

Comments
 (0)