mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Turn on all of Microsoft's recommend lint rules
Biggest changes forced by this: alt tags for all images, resulting in new strings added to messages.json, and a new i18n paramter/prop added in a plot of places. Another change of note is that there are two new tslint.json files under ts/test and ts/styleguide to relax our rules a bit there. This required a change to our package.json script, as manually specifying the config file there made it ignore our tslint.json files in subdirectories
This commit is contained in:
@@ -121,6 +121,7 @@ export const getSuggestedFilename = ({
|
||||
: '';
|
||||
const fileType = getFileExtension(attachment);
|
||||
const extension = fileType ? `.${fileType}` : '';
|
||||
|
||||
return `${prefix}${suffix}${extension}`;
|
||||
};
|
||||
|
||||
@@ -133,7 +134,6 @@ export const getFileExtension = (attachment: Attachment): string | null => {
|
||||
case 'video/quicktime':
|
||||
return 'mov';
|
||||
default:
|
||||
// TODO: Use better MIME --> file extension mapping:
|
||||
return attachment.contentType.split('/')[1];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -85,6 +85,7 @@ export function contactSelector(
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
...contact,
|
||||
avatar,
|
||||
|
||||
@@ -100,5 +100,6 @@ export const hasExpiration = (message: Message): boolean => {
|
||||
}
|
||||
|
||||
const { expireTimer } = message;
|
||||
|
||||
return typeof expireTimer === 'number' && expireTimer > 0;
|
||||
};
|
||||
|
||||
@@ -4,5 +4,5 @@ export interface Collection<T> {
|
||||
models: Array<Model<T>>;
|
||||
// tslint:disable-next-line no-misused-new
|
||||
new (): Collection<T>;
|
||||
fetch(options: object): JQuery.Deferred<any, any, any>;
|
||||
fetch(options: object): JQuery.Deferred<any>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user