Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First pass at TSLint updates #30

Merged
merged 1 commit into from
May 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/notebookItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class NotebookItem extends React.Component<NotebookItemProps, NotebookItemState>
{this.isExpandable() ? <i className='picker-icon-right ms-Icon ms-Icon--ChevronDownMed'></i> : undefined}
</span>
</a>
<ul className="picker-list-header" style={this.state.expanded ? { display: 'block' } : { display: 'none' }}>
<ul className='picker-list-header' style={this.state.expanded ? { display: 'block' } : { display: 'none' }}>
{this.props.notebook.sectionGroups.map(sectionGroup => <SectionGroupItem globals={this.props.globals} sectionGroup={sectionGroup} key={sectionGroup.name}></SectionGroupItem>)}
{this.props.notebook.sections.map(section => <SectionItem globals={this.props.globals} section={section} key={section.name}></SectionItem>)}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/components/pageItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ class PageItem extends React.Component<PageItemProps, null> {
}
}

export default PageItem;
export default PageItem;
2 changes: 1 addition & 1 deletion src/oneNoteDataStructures/notebookListUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ class NotebookListUpdater {
}
}

export default NotebookListUpdater;
export default NotebookListUpdater;
6 changes: 3 additions & 3 deletions src/oneNoteDataStructures/oneNoteApiResponseTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class OneNoteApiResponseTransformer {
expanded: this.defaultExpanded,
sectionGroups: notebook.sectionGroups.map(sg => this.transformSectionGroup(sg)),
sections: notebook.sections.map(section => this.transformSection(section))
}
};
}

transformSectionGroup(sectionGroup: OneNoteApi.SectionGroup): SectionGroup {
Expand All @@ -31,7 +31,7 @@ class OneNoteApiResponseTransformer {
expanded: this.defaultExpanded,
sectionGroups: sectionGroup.sectionGroups.map(sg => this.transformSectionGroup(sg)),
sections: sectionGroup.sections.map(section => this.transformSection(section))
}
};
}

transformSection(section: OneNoteApi.Section): Section {
Expand All @@ -41,7 +41,7 @@ class OneNoteApiResponseTransformer {
name: section.name,
expanded: this.defaultExpanded,
pages: !!section.pages ? section.pages.map(page => this.transformPage(page)) : undefined
}
};
}

transformPages(pageList: OneNoteApi.Page[]): Page[] {
Expand Down
2 changes: 1 addition & 1 deletion src/props/globalProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface GlobalProps {

// TODO we need a way to distinguish between section and page
selectedId?: string;
}
};
}

export default GlobalProps;
14 changes: 5 additions & 9 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@
"check-space"
],
"curly": true,
"eofline": false,
"eofline": true,
"forin": true,
"indent": [ true, "tabs" ],
"interface-name": [true, "never-prefix"],
"jsdoc-format": true,
"jsx-no-lambda": false,
"jsx-no-multiline-js": false,
"label-position": true,
"max-line-length": [ true, 120 ],
"max-line-length": [ false ],
"member-ordering": [
true,
"public-before-private",
"static-before-instance",
"variables-before-functions"
],
Expand All @@ -41,11 +38,11 @@
"timeEnd",
"trace"
],
"no-consecutive-blank-lines": true,
"no-consecutive-blank-lines": [ true ],
"no-construct": true,
"no-debugger": true,
"no-duplicate-variable": true,
"no-empty": true,
"no-empty": false,
"no-eval": true,
"no-shadowed-variable": true,
"no-string-literal": true,
Expand All @@ -60,7 +57,7 @@
"check-open-brace",
"check-whitespace"
],
"quotemark": [true, "single", "jsx-double"],
"quotemark": [true, "single", "jsx-single"],
"radix": true,
"semicolon": [true, "always"],
"switch-default": true,
Expand All @@ -70,7 +67,6 @@
"triple-equals": [ true, "allow-null-check" ],
"typedef": [
true,
"parameter",
"property-declaration"
],
"typedef-whitespace": [
Expand Down