Fix no-unused-variable tslint rule to include parameters and fix issues

This commit is contained in:
Fabio Berger
2018-06-11 23:42:30 +02:00
parent b6df727efb
commit e1879ef4d9
66 changed files with 104 additions and 113 deletions

View File

@@ -73,7 +73,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
public componentWillUnmount(): void {
window.removeEventListener('hashchange', this._onHashChanged.bind(this), false);
}
public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState): void {
public componentDidUpdate(prevProps: DocumentationProps, _prevState: DocumentationState): void {
if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) {
const hash = window.location.hash.slice(1);
sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
@@ -364,7 +364,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
/>
);
}
private _onSidebarHover(event: React.FormEvent<HTMLInputElement>): void {
private _onSidebarHover(_event: React.FormEvent<HTMLInputElement>): void {
this.setState({
isHoveringSidebar: true,
});
@@ -374,7 +374,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
isHoveringSidebar: false,
});
}
private _onHashChanged(event: any): void {
private _onHashChanged(_event: any): void {
const hash = window.location.hash.slice(1);
sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
}

View File

@@ -8,7 +8,7 @@ export interface EnumProps {
}
export const Enum = (props: EnumProps) => {
const values = _.map(props.values, (value, i) => {
const values = _.map(props.values, value => {
const defaultValueIfAny = !_.isUndefined(value.defaultValue) ? ` = ${value.defaultValue}` : '';
return `\n\t${value.name}${defaultValueIfAny},`;
});