refactor: enforce semicolons in ts

pull/9/head
sualko 2020-04-27 16:50:45 +02:00
parent 938e8ee68c
commit 29c990692f
6 changed files with 17 additions and 16 deletions

View File

@ -29,5 +29,6 @@ module.exports = {
'array-bracket-newline': ['error', 'consistent'],
'quote-props': ['error', 'as-needed'],
'indent': ['warn', 'tab'],
semi: ["error", "always"],
},
}

View File

@ -27,7 +27,7 @@ function sortRooms(key: SortKey, orderBy: SortOrder) {
return 0;
}
}
};
}
type Props = {
@ -126,7 +126,7 @@ const App: React.FC<Props> = () => {
</tfoot>
</table>
</div>
)
}
);
};
export default App;

View File

@ -21,11 +21,11 @@ const NewRoomForm: React.FC<Props> = (props) => {
className="newgroup-name"
value={name}
placeholder="Room name"
onChange={(event) => {setName(event.target.value)}} />
onChange={(event) => {setName(event.target.value);}} />
<input type="submit" value="Create" />
</form>
)
}
);
};
export default NewRoomForm;

View File

@ -26,7 +26,7 @@ const EditableValue: React.FC<EditableValueProps> = ({ setValue, setActive, acti
onClick={event => event.stopPropagation()}
initialValue={value}
type={type}
/>
/>;
}
function onClick(ev) {
@ -36,7 +36,7 @@ const EditableValue: React.FC<EditableValueProps> = ({ setValue, setActive, acti
}
return <a className="action-rename" onClick={onClick}>{value}</a>;
}
};
const RoomRow: React.FC<Props> = (props) => {
const [activeEdit, setActiveEdit] = useState('');
@ -67,7 +67,7 @@ const RoomRow: React.FC<Props> = (props) => {
}
function edit(field: string, type: 'text' | 'number' = 'text'){
return <EditableValue field={field} value={room[field]} active={activeEdit} setActive={setActiveEdit} setValue={updateRoom} type={type} />
return <EditableValue field={field} value={room[field]} active={activeEdit} setActive={setActiveEdit} setValue={updateRoom} type={type} />;
}
return (
@ -99,7 +99,7 @@ const RoomRow: React.FC<Props> = (props) => {
title="Delete" />
</td>
</tr>
)
}
);
};
export default RoomRow;

View File

@ -6,5 +6,5 @@ $(() => {
OCP.AppConfig.setValue('bbb', 'api.url', this['api.url'].value);
OCP.AppConfig.setValue('bbb', 'api.secret', this['api.secret'].value);
})
});
});

View File

@ -6,9 +6,9 @@ declare const OCA: any;
class BigBlueButton {
public async getRooms(): Promise<Room[]> {
const response = await axios.get(OC.generateUrl('/apps/bbb/rooms'))
const response = await axios.get(OC.generateUrl('/apps/bbb/rooms'));
return response.data
return response.data;
}
}
@ -27,12 +27,12 @@ $(() => {
'application/msword',
'application/vnd.ms-powerpoint',
];
const bbb = new BigBlueButton()
const bbb = new BigBlueButton();
bbb.getRooms().then(rooms => {
rooms.forEach(room => {
mimeTypes.forEach(mime => registerFileAction(mime, room.id, room.uid, room.name));
})
});
});
function registerFileAction(mime, id, uid, name) {