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:
Scott Nonnenberg 2018-05-22 12:31:43 -07:00
parent 23586be6b0
commit 2988da0981
49 changed files with 311 additions and 123 deletions

View file

@ -21,7 +21,7 @@ interface BackboneViewConstructor {
* Allows Backbone Views to be rendered inside of React (primarily for the Style Guide)
* while we slowly replace the internals of a given Backbone view with React.
*/
export class BackboneWrapper extends React.Component<Props, {}> {
export class BackboneWrapper extends React.Component<Props> {
protected el: HTMLElement | null = null;
protected view: BackboneView | null = null;
@ -44,10 +44,9 @@ export class BackboneWrapper extends React.Component<Props, {}> {
};
protected setup = () => {
const { el } = this;
const { View, options } = this.props;
if (!el) {
if (!this.el) {
return;
}
this.view = new View(options);
@ -55,7 +54,7 @@ export class BackboneWrapper extends React.Component<Props, {}> {
// It's important to let the view create its own root DOM element. This ensures that
// its tagName property actually takes effect.
el.appendChild(this.view.el);
this.el.appendChild(this.view.el);
};
protected teardown() {