From f30fb44df65daa54541d1fa21cdabfc4a3930f9a Mon Sep 17 00:00:00 2001 From: Mark Polak Date: Thu, 19 Apr 2018 00:49:41 +0200 Subject: [PATCH 1/2] Remove unused variables --- .../components/ActivityItem/ActivityItem.tsx | 7 +--- .../src/components/Button/BaseButton.tsx | 3 +- .../components/Coachmark/Coachmark.styles.ts | 1 - .../PositioningContainer.tsx | 5 +-- .../src/components/ComboBox/ComboBox.tsx | 12 ++---- .../examples/ComboBox.Basic.Example.tsx | 40 +++++++++---------- .../ContextualMenu/ContextualMenuItem.tsx | 2 - .../DetailsList/DetailsHeader.test.tsx | 2 - .../DetailsList/DetailsListPage.tsx | 1 - .../DocumentCard/DocumentCardStatus.tsx | 1 - .../DocumentCard/DocumentCardTitle.test.tsx | 4 -- .../src/components/Fabric/Fabric.tsx | 4 -- .../src/components/Facepile/FacepilePage.tsx | 1 - .../FocusTrapZone/FocusTrapZonePage.tsx | 3 -- .../examples/FocusZone.Tabbable.Example.tsx | 5 +-- .../src/components/Layer/LayerPage.tsx | 2 +- .../src/components/Modal/ModalPage.tsx | 1 - .../components/OverflowSet/OverflowSet.tsx | 1 - .../src/components/Panel/PanelPage.tsx | 1 - .../src/components/Persona/Persona.types.ts | 2 - .../src/components/Persona/PersonaConsts.tsx | 1 - .../PersonaPresence/PersonaPresence.styles.ts | 6 +-- .../ProgressIndicator.styles.ts | 9 +---- .../components/SearchBox/SearchBoxPage.tsx | 1 - .../src/components/Spinner/Spinner.styles.tsx | 4 +- .../src/components/Spinner/Spinner.tsx | 3 +- .../src/components/Spinner/Spinner.types.ts | 3 +- .../src/components/Theme/ThemePage.tsx | 15 +------ .../src/components/Theme/ThemePage.types.ts | 2 +- .../src/components/Toggle/TogglePage.tsx | 1 - .../src/components/Tooltip/TooltipHost.tsx | 1 - .../src/components/Tooltip/TooltipPage.tsx | 1 - .../pickers/PeoplePicker/PeoplePickerPage.tsx | 1 - .../src/components/pickers/PickersPage.tsx | 1 - .../pickers/Suggestions/Suggestions.test.tsx | 5 --- .../src/demo/GettingStartedPage.tsx | 5 +-- packages/office-ui-fabric-react/tslint.json | 3 +- 37 files changed, 40 insertions(+), 120 deletions(-) diff --git a/packages/office-ui-fabric-react/src/components/ActivityItem/ActivityItem.tsx b/packages/office-ui-fabric-react/src/components/ActivityItem/ActivityItem.tsx index 6c7281ebe9814b..abbb5e18601ed2 100644 --- a/packages/office-ui-fabric-react/src/components/ActivityItem/ActivityItem.tsx +++ b/packages/office-ui-fabric-react/src/components/ActivityItem/ActivityItem.tsx @@ -1,9 +1,7 @@ -/* tslint:disable */ + import * as React from 'react'; -/* tslint:enable */ -import { DefaultPalette } from '../../Styling'; import { BaseComponent } from '../../Utilities'; -import { IActivityItemProps, IActivityItemStyles } from './ActivityItem.types'; +import { IActivityItemProps } from './ActivityItem.types'; import { IActivityItemClassNames, getClassNames } from './ActivityItem.classNames'; import { getStyles } from './ActivityItem.styles'; import { PersonaSize, PersonaCoin, IPersonaSharedProps } from '../../Persona'; @@ -20,7 +18,6 @@ export class ActivityItem extends BaseComponent { onRenderActivityDescription = this._onRenderActivityDescription, onRenderComments = this._onRenderComments, onRenderTimeStamp = this._onRenderTimeStamp, - styles: customStyles, animateBeaconSignal, isCompact } = this.props; diff --git a/packages/office-ui-fabric-react/src/components/Button/BaseButton.tsx b/packages/office-ui-fabric-react/src/components/Button/BaseButton.tsx index 7cbdaeca15f986..a08fd6c27e53ba 100644 --- a/packages/office-ui-fabric-react/src/components/Button/BaseButton.tsx +++ b/packages/office-ui-fabric-react/src/components/Button/BaseButton.tsx @@ -431,7 +431,7 @@ export class BaseButton extends BaseComponent { theme, title } = this.props; - const { isOpen, selectedIndices, focused, suggestedDisplayValue } = this.state; + const { isOpen, focused, suggestedDisplayValue } = this.state; this._currentVisibleValue = this._getVisibleValue(); const divProps = getNativeProps(this.props, divProperties); @@ -643,7 +643,6 @@ export class ComboBox extends BaseComponent { currentPendingValue, currentPendingValueValidIndex, currentOptions, - selectedIndices } = this.state; if (this.props.autoComplete === 'on') { @@ -1158,7 +1157,6 @@ export class ComboBox extends BaseComponent { currentPendingValueValidIndexOnHover, currentPendingValueValidIndex, currentPendingValue, - selectedIndices } = this.state; return ( @@ -1197,7 +1195,6 @@ export class ComboBox extends BaseComponent { const { currentPendingValueValidIndex, currentPendingValue, - selectedIndices } = this.state; if (onScrollToItem) { @@ -1299,7 +1296,6 @@ export class ComboBox extends BaseComponent { */ private _resetSelectedIndex() { const { - selectedIndices, currentOptions } = this.state; if (this._autofill.value) { @@ -1367,7 +1363,6 @@ export class ComboBox extends BaseComponent { */ private _setPendingInfoFromIndexAndDirection(index: number, searchDirection: SearchDirection) { const { - isOpen, currentOptions } = this.state; @@ -1458,8 +1453,7 @@ export class ComboBox extends BaseComponent { const { isOpen, currentOptions, - currentPendingValueValidIndexOnHover, - selectedIndices + currentPendingValueValidIndexOnHover } = this.state; if (disabled) { diff --git a/packages/office-ui-fabric-react/src/components/ComboBox/examples/ComboBox.Basic.Example.tsx b/packages/office-ui-fabric-react/src/components/ComboBox/examples/ComboBox.Basic.Example.tsx index f66f68146c860e..1237feabbdf9ad 100644 --- a/packages/office-ui-fabric-react/src/components/ComboBox/examples/ComboBox.Basic.Example.tsx +++ b/packages/office-ui-fabric-react/src/components/ComboBox/examples/ComboBox.Basic.Example.tsx @@ -13,22 +13,22 @@ import { IComboBox } from '../ComboBox.types'; import { PrimaryButton } from '../../../Button'; const INITIAL_OPTIONS = -[ - { key: 'Header', text: 'Theme Fonts', itemType: SelectableOptionMenuItemType.Header }, - { key: 'A', text: 'Arial Black', fontFamily: '"Arial Black", "Arial Black_MSFontService", sans-serif' }, - { key: 'B', text: 'Time New Roman', fontFamily: '"Times New Roman", "Times New Roman_MSFontService", serif' }, - { key: 'C', text: 'Comic Sans MS', fontFamily: '"Comic Sans MS", "Comic Sans MS_MSFontService", fantasy' }, - { key: 'C1', text: 'Calibri', fontFamily: 'Calibri, Calibri_MSFontService, sans-serif' }, - { key: 'divider_2', text: '-', itemType: SelectableOptionMenuItemType.Divider }, - { key: 'Header1', text: 'Other Options', itemType: SelectableOptionMenuItemType.Header }, - { key: 'D', text: 'Option d' }, - { key: 'E', text: 'Option e' }, - { key: 'F', text: 'Option f' }, - { key: 'G', text: 'Option g' }, - { key: 'H', text: 'Option h' }, - { key: 'I', text: 'Option i' }, - { key: 'J', text: 'Option j' } -]; + [ + { key: 'Header', text: 'Theme Fonts', itemType: SelectableOptionMenuItemType.Header }, + { key: 'A', text: 'Arial Black', fontFamily: '"Arial Black", "Arial Black_MSFontService", sans-serif' }, + { key: 'B', text: 'Time New Roman', fontFamily: '"Times New Roman", "Times New Roman_MSFontService", serif' }, + { key: 'C', text: 'Comic Sans MS', fontFamily: '"Comic Sans MS", "Comic Sans MS_MSFontService", fantasy' }, + { key: 'C1', text: 'Calibri', fontFamily: 'Calibri, Calibri_MSFontService, sans-serif' }, + { key: 'divider_2', text: '-', itemType: SelectableOptionMenuItemType.Divider }, + { key: 'Header1', text: 'Other Options', itemType: SelectableOptionMenuItemType.Header }, + { key: 'D', text: 'Option d' }, + { key: 'E', text: 'Option e' }, + { key: 'F', text: 'Option f' }, + { key: 'G', text: 'Option g' }, + { key: 'H', text: 'Option h' }, + { key: 'I', text: 'Option i' }, + { key: 'J', text: 'Option j' } + ]; export class ComboBoxBasicExample extends React.Component<{}, { // For controled single select @@ -87,7 +87,7 @@ export class ComboBoxBasicExample extends React.Component<{}, { public render() { const { options, selectedOptionKey, value } = this.state; - const { optionsMulti, selectedOptionKeys, valueMulti } = this.state; + const { optionsMulti } = this.state; return (
@@ -129,7 +129,7 @@ export class ComboBoxBasicExample extends React.Component<{}, { onFocus={ () => console.log('onFocus called') } onBlur={ () => console.log('onBlur called') } onMenuOpen={ () => console.log('ComboBox menu opened') } - // tslint:enable:jsx-no-lambda + // tslint:enable:jsx-no-lambda /> console.log('onFocus called') } onBlur={ () => console.log('onBlur called') } onMenuOpen={ () => console.log('ComboBox menu opened') } - // tslint:enable:jsx-no-lambda + // tslint:enable:jsx-no-lambda />
@@ -341,7 +341,7 @@ export class ComboBoxBasicExample extends React.Component<{}, { this.setState({ optionsMulti: INITIAL_OPTIONS, - selectedOptionKeys: [ 'C1' ], + selectedOptionKeys: ['C1'], valueMulti: undefined }); diff --git a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenuItem.tsx b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenuItem.tsx index 667d14bae15407..de8867093431f8 100644 --- a/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenuItem.tsx +++ b/packages/office-ui-fabric-react/src/components/ContextualMenu/ContextualMenuItem.tsx @@ -1,7 +1,5 @@ import * as React from 'react'; import { hasSubmenu, getIsChecked } from '../../utilities/contextualMenu/index'; -import { IContextualMenuItem } from './ContextualMenu.types'; -import { IMenuItemClassNames } from './ContextualMenu.classNames'; import { getRTL } from '../../Utilities'; import { Icon } from '../../Icon'; import { IContextualMenuItemProps } from './ContextualMenuItem.types'; diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.test.tsx b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.test.tsx index 472d33546005ed..8c1d070f629bf0 100644 --- a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.test.tsx +++ b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.test.tsx @@ -39,7 +39,6 @@ describe('DetailsHeader', () => { ): { size: number; index: number; } => lastResize = { size, index }; const headerRef = createRef(); - const columns = []; const wrapper = mount( { /> ); - const rootElement = wrapper.getDOMNode(); const sizerElement = wrapper.find('[data-sizer-index=0]').getDOMNode(); const header: any = headerRef.value; diff --git a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsListPage.tsx b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsListPage.tsx index 0f78bf6e5b5b2b..5a336f5651adf5 100644 --- a/packages/office-ui-fabric-react/src/components/DetailsList/DetailsListPage.tsx +++ b/packages/office-ui-fabric-react/src/components/DetailsList/DetailsListPage.tsx @@ -1,5 +1,4 @@ import * as React from 'react'; -import { Link } from 'office-ui-fabric-react/lib/Link'; import { ExampleCard, IComponentDemoPageProps, diff --git a/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardStatus.tsx b/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardStatus.tsx index 127222419f41fe..d229db9f39b09b 100644 --- a/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardStatus.tsx +++ b/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardStatus.tsx @@ -4,7 +4,6 @@ import * as React from 'react'; import { BaseComponent, - autobind, css } from '../../Utilities'; import { IDocumentCardStatusProps } from './DocumentCard.types'; diff --git a/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardTitle.test.tsx b/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardTitle.test.tsx index 3aac5f51d60d99..8117005e9a70fd 100644 --- a/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardTitle.test.tsx +++ b/packages/office-ui-fabric-react/src/components/DocumentCard/DocumentCardTitle.test.tsx @@ -1,10 +1,6 @@ import * as React from 'react'; import { mount } from 'enzyme'; - -import { DocumentCard } from './DocumentCard'; import { DocumentCardTitle } from './DocumentCardTitle'; -import { DocumentCardPreview } from './DocumentCardPreview'; -import { DocumentCardActivity } from './DocumentCardActivity'; const veryLongTitle = 'This is obviously a very very very very very very very very very very loooooooooooooooooooooooooooooooooooooooooooooooong title that will need to be truncated'; diff --git a/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx b/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx index 6590c9d0054559..1998193d3c869d 100644 --- a/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx +++ b/packages/office-ui-fabric-react/src/components/Fabric/Fabric.tsx @@ -4,12 +4,8 @@ import { customizable, getNativeProps, divProperties, - createRef, classNamesFunction } from '../../Utilities'; -import { - ITheme, -} from '../../Styling'; import { getStyles } from './Fabric.styles'; import { IFabricProps, IFabricStyleProps, IFabricStyles } from './Fabric.types'; diff --git a/packages/office-ui-fabric-react/src/components/Facepile/FacepilePage.tsx b/packages/office-ui-fabric-react/src/components/Facepile/FacepilePage.tsx index 32ac5930d7640e..92f2c7af48c1ed 100644 --- a/packages/office-ui-fabric-react/src/components/Facepile/FacepilePage.tsx +++ b/packages/office-ui-fabric-react/src/components/Facepile/FacepilePage.tsx @@ -9,7 +9,6 @@ import { import { FacepileAddFaceExample } from './examples/Facepile.AddFace.Example'; import { FacepileBasicExample } from './examples/Facepile.Basic.Example'; import { FacepileOverflowExample } from './examples/Facepile.Overflow.Example'; -import { FontClassNames } from '../../Styling'; import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus'; import { FacepileStatus } from './Facepile.checklist'; diff --git a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZonePage.tsx b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZonePage.tsx index 849002054b65db..d0e571e4749f1c 100644 --- a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZonePage.tsx +++ b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZonePage.tsx @@ -1,7 +1,4 @@ import * as React from 'react'; -import { - Link -} from 'office-ui-fabric-react/lib/Link'; import { ExampleCard, IComponentDemoPageProps, diff --git a/packages/office-ui-fabric-react/src/components/FocusZone/examples/FocusZone.Tabbable.Example.tsx b/packages/office-ui-fabric-react/src/components/FocusZone/examples/FocusZone.Tabbable.Example.tsx index 2fb2a8a02e843f..1810dc9a2b8cfb 100644 --- a/packages/office-ui-fabric-react/src/components/FocusZone/examples/FocusZone.Tabbable.Example.tsx +++ b/packages/office-ui-fabric-react/src/components/FocusZone/examples/FocusZone.Tabbable.Example.tsx @@ -1,8 +1,5 @@ -/* tslint:disable:no-unused-variable */ import * as React from 'react'; -/* tslint:enable:no-unused-variable */ - -import { DefaultButton, BaseButton } from 'office-ui-fabric-react/lib/Button'; +import { DefaultButton } from 'office-ui-fabric-react/lib/Button'; import { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from 'office-ui-fabric-react/lib/FocusZone'; import { TextField } from 'office-ui-fabric-react/lib/TextField'; import './FocusZone.Tabbable.Example.scss'; diff --git a/packages/office-ui-fabric-react/src/components/Layer/LayerPage.tsx b/packages/office-ui-fabric-react/src/components/Layer/LayerPage.tsx index 7d9ce8a6502ad9..f6420ca3f217d5 100644 --- a/packages/office-ui-fabric-react/src/components/Layer/LayerPage.tsx +++ b/packages/office-ui-fabric-react/src/components/Layer/LayerPage.tsx @@ -32,7 +32,7 @@ export class LayerPage extends React.Component { - + diff --git a/packages/office-ui-fabric-react/src/components/Modal/ModalPage.tsx b/packages/office-ui-fabric-react/src/components/Modal/ModalPage.tsx index c30d1cf9098486..dbd5357b29de0c 100644 --- a/packages/office-ui-fabric-react/src/components/Modal/ModalPage.tsx +++ b/packages/office-ui-fabric-react/src/components/Modal/ModalPage.tsx @@ -6,7 +6,6 @@ import { PageMarkdown, PropertiesTableSet } from '@uifabric/example-app-base'; -import { Link } from 'office-ui-fabric-react/lib/Link'; import { ModalBasicExample } from './examples/Modal.Basic.Example'; import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus'; import { ModalStatus } from './Modal.checklist'; diff --git a/packages/office-ui-fabric-react/src/components/OverflowSet/OverflowSet.tsx b/packages/office-ui-fabric-react/src/components/OverflowSet/OverflowSet.tsx index ea1d653ad93d8f..a934914477cd36 100644 --- a/packages/office-ui-fabric-react/src/components/OverflowSet/OverflowSet.tsx +++ b/packages/office-ui-fabric-react/src/components/OverflowSet/OverflowSet.tsx @@ -6,7 +6,6 @@ import { getNativeProps, divProperties, focusFirstChild, - getFirstFocusable, elementContains } from '../../Utilities'; import { mergeStyles } from '../../Styling'; diff --git a/packages/office-ui-fabric-react/src/components/Panel/PanelPage.tsx b/packages/office-ui-fabric-react/src/components/Panel/PanelPage.tsx index 890cab45b5ac21..e6d948cfb3b925 100644 --- a/packages/office-ui-fabric-react/src/components/Panel/PanelPage.tsx +++ b/packages/office-ui-fabric-react/src/components/Panel/PanelPage.tsx @@ -19,7 +19,6 @@ import { PanelLightDismissExample } from './examples/Panel.LightDismiss.Example' import { PanelLightDismissCustomExample } from './examples/Panel.LightDismissCustom.Example'; import { PanelNonModalExample } from './examples/Panel.NonModal.Example'; import { PanelFooterExample } from './examples/Panel.Footer.Example'; -import { FontClassNames } from '../../Styling'; import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus'; import { PanelStatus } from './Panel.checklist'; diff --git a/packages/office-ui-fabric-react/src/components/Persona/Persona.types.ts b/packages/office-ui-fabric-react/src/components/Persona/Persona.types.ts index e473b6d5967245..6d6de2f2bc90dd 100644 --- a/packages/office-ui-fabric-react/src/components/Persona/Persona.types.ts +++ b/packages/office-ui-fabric-react/src/components/Persona/Persona.types.ts @@ -1,8 +1,6 @@ import * as React from 'react'; import { IRenderFunction } from '../../Utilities'; import { PersonaBase } from './Persona.base'; -import { PersonaCoinBase } from './PersonaCoin/index'; -import { PersonaPresenceBase } from './PersonaPresence/index'; import { ImageLoadState } from '../../Image'; import { IStyle, ITheme } from '../../Styling'; import { IStyleFunction } from '../../Utilities'; diff --git a/packages/office-ui-fabric-react/src/components/Persona/PersonaConsts.tsx b/packages/office-ui-fabric-react/src/components/Persona/PersonaConsts.tsx index 19b2042deccb02..b8c491b9226433 100644 --- a/packages/office-ui-fabric-react/src/components/Persona/PersonaConsts.tsx +++ b/packages/office-ui-fabric-react/src/components/Persona/PersonaConsts.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { PersonaPresence, PersonaSize, diff --git a/packages/office-ui-fabric-react/src/components/Persona/PersonaPresence/PersonaPresence.styles.ts b/packages/office-ui-fabric-react/src/components/Persona/PersonaPresence/PersonaPresence.styles.ts index 1c042712ee459f..4322c5dd53f9e0 100644 --- a/packages/office-ui-fabric-react/src/components/Persona/PersonaPresence/PersonaPresence.styles.ts +++ b/packages/office-ui-fabric-react/src/components/Persona/PersonaPresence/PersonaPresence.styles.ts @@ -17,11 +17,7 @@ import { export const getStyles = ( props: IPersonaPresenceStyleProps ): IPersonaPresenceStyles => { - const { - className, - theme, - } = props; - + const { theme } = props; const { semanticColors } = theme; const size = sizeBoolean(props.size as PersonaSize); diff --git a/packages/office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicator.styles.ts b/packages/office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicator.styles.ts index 14ccfb155facc9..5a326f92ce5a60 100644 --- a/packages/office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicator.styles.ts +++ b/packages/office-ui-fabric-react/src/components/ProgressIndicator/ProgressIndicator.styles.ts @@ -4,14 +4,7 @@ import { IProgressIndicatorStyleProps, IProgressIndicatorStyles } from './Progre export const getStyles = ( props: IProgressIndicatorStyleProps ): IProgressIndicatorStyles => { - const { - className, - theme, - indeterminate, - smoothTransition, - } = props; - - const { palette, semanticColors } = theme; + const { className } = props; return ({ root: [ diff --git a/packages/office-ui-fabric-react/src/components/SearchBox/SearchBoxPage.tsx b/packages/office-ui-fabric-react/src/components/SearchBox/SearchBoxPage.tsx index 1003d0eaaead2d..36e69d6cbbd269 100644 --- a/packages/office-ui-fabric-react/src/components/SearchBox/SearchBoxPage.tsx +++ b/packages/office-ui-fabric-react/src/components/SearchBox/SearchBoxPage.tsx @@ -10,7 +10,6 @@ import { SearchBoxFullSizeExample } from './examples/SearchBox.FullSize.Example' import { SearchBoxUnderlinedExample } from './examples/SearchBox.Underlined.Example'; import { SearchBoxDisabledExample } from './examples/SearchBox.Disabled.Example'; import { SearchBoxSmallExample } from './examples/SearchBox.Small.Example'; -import { FontClassNames } from '../../Styling'; import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus'; import { SearchBoxStatus } from './SearchBox.checklist'; diff --git a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.styles.tsx b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.styles.tsx index 7a3474e498d411..67338c38eec272 100644 --- a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.styles.tsx +++ b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.styles.tsx @@ -1,5 +1,5 @@ -import { ISpinnerStyleProps, ISpinnerStyles, SpinnerSize, SpinnerType } from './Spinner.types'; -import { IRawStyle, hiddenContentStyle, keyframes, HighContrastSelector } from '../../Styling'; +import { ISpinnerStyleProps, ISpinnerStyles, SpinnerSize } from './Spinner.types'; +import { hiddenContentStyle, keyframes, HighContrastSelector } from '../../Styling'; const spinAnimation: string = keyframes({ '0%': { diff --git a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.tsx b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.tsx index 8061900cebccc2..965bd1f78dcfc0 100644 --- a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.tsx +++ b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.tsx @@ -1,7 +1,8 @@ import { styled } from '../../Utilities'; import { SpinnerBase } from './Spinner.base'; -import { ISpinnerProps } from './Spinner.types'; import { getStyles } from './Spinner.styles'; +// tslint:disable-next-line:no-unused-variable +import { ISpinnerProps } from './Spinner.types'; export const Spinner = styled( SpinnerBase, diff --git a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.types.ts b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.types.ts index 109022603e717a..09b662b913ec18 100644 --- a/packages/office-ui-fabric-react/src/components/Spinner/Spinner.types.ts +++ b/packages/office-ui-fabric-react/src/components/Spinner/Spinner.types.ts @@ -1,6 +1,5 @@ import * as React from 'react'; -import { Spinner } from './Spinner'; -import { ITheme, IStyle, IRawStyle } from '../../Styling'; +import { ITheme, IStyle } from '../../Styling'; import { IStyleFunction } from '../../Utilities'; export interface ISpinner { diff --git a/packages/office-ui-fabric-react/src/components/Theme/ThemePage.tsx b/packages/office-ui-fabric-react/src/components/Theme/ThemePage.tsx index 70009969c39495..90467005c88cf8 100644 --- a/packages/office-ui-fabric-react/src/components/Theme/ThemePage.tsx +++ b/packages/office-ui-fabric-react/src/components/Theme/ThemePage.tsx @@ -1,22 +1,16 @@ import * as React from 'react'; +import { classNamesFunction } from '../../Utilities'; import { - classNamesFunction, - customizable, -} from '../../Utilities'; -import { - FontClassNames, IPalette, ISemanticColors, loadTheme, } from '../../Styling'; import { ComponentPage, - Highlight, IComponentDemoPageProps, PageMarkdown, } from '@uifabric/example-app-base'; import { - IThemePagePalette, IThemePageStyleProps, IThemePageStyles, IThemePageState, @@ -34,8 +28,6 @@ import { ColorPicker } from '../ColorPicker'; const getClassNames = classNamesFunction(); export class ThemePage extends React.Component { - private _list: DetailsList; - constructor(props: IComponentDemoPageProps) { super(props); @@ -82,7 +74,6 @@ export class ThemePage extends React.Component { - this._list = component; - } - private _onSwatchClicked(item: any, index: number, list: string, ev: React.MouseEvent) { this.setState({ colorPickerProps: { diff --git a/packages/office-ui-fabric-react/src/components/Theme/ThemePage.types.ts b/packages/office-ui-fabric-react/src/components/Theme/ThemePage.types.ts index 34dc99bc5230ef..bae1bf0d85c9f5 100644 --- a/packages/office-ui-fabric-react/src/components/Theme/ThemePage.types.ts +++ b/packages/office-ui-fabric-react/src/components/Theme/ThemePage.types.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; + import { IStyle } from '../../Styling'; export type IThemePagePalette = { diff --git a/packages/office-ui-fabric-react/src/components/Toggle/TogglePage.tsx b/packages/office-ui-fabric-react/src/components/Toggle/TogglePage.tsx index 85f916823701c7..b78c4407d57710 100644 --- a/packages/office-ui-fabric-react/src/components/Toggle/TogglePage.tsx +++ b/packages/office-ui-fabric-react/src/components/Toggle/TogglePage.tsx @@ -8,7 +8,6 @@ import { } from '@uifabric/example-app-base'; import { ToggleBasicExample } from './examples/Toggle.Basic.Example'; import { ToggleAriaLabelExample } from './examples/Toggle.AriaLabel.Example'; -import { FontClassNames } from '../../Styling'; import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus'; import { ToggleStatus } from './Toggle.checklist'; diff --git a/packages/office-ui-fabric-react/src/components/Tooltip/TooltipHost.tsx b/packages/office-ui-fabric-react/src/components/Tooltip/TooltipHost.tsx index 0f2d029f8e6f00..ed7d4466707926 100644 --- a/packages/office-ui-fabric-react/src/components/Tooltip/TooltipHost.tsx +++ b/packages/office-ui-fabric-react/src/components/Tooltip/TooltipHost.tsx @@ -54,7 +54,6 @@ export class TooltipHost extends BaseComponent { public render() { diff --git a/packages/office-ui-fabric-react/tslint.json b/packages/office-ui-fabric-react/tslint.json index 7d6cf89d5c8c04..9dcefdf589368e 100644 --- a/packages/office-ui-fabric-react/tslint.json +++ b/packages/office-ui-fabric-react/tslint.json @@ -8,10 +8,9 @@ false, 140 ], - "no-unused-variable": false, "no-any": false, "typedef": [ false ] } -} +} \ No newline at end of file From 1d59cfa85022395d2f82c21d1219584e1b75e2d1 Mon Sep 17 00:00:00 2001 From: Mark Polak Date: Thu, 19 Apr 2018 00:52:31 +0200 Subject: [PATCH 2/2] Add change file --- ...apol-remove-unused-variables_2018-04-18-22-52.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/office-ui-fabric-react/mapol-remove-unused-variables_2018-04-18-22-52.json diff --git a/common/changes/office-ui-fabric-react/mapol-remove-unused-variables_2018-04-18-22-52.json b/common/changes/office-ui-fabric-react/mapol-remove-unused-variables_2018-04-18-22-52.json new file mode 100644 index 00000000000000..f9fc52aa1213a0 --- /dev/null +++ b/common/changes/office-ui-fabric-react/mapol-remove-unused-variables_2018-04-18-22-52.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Remove unused variables and re-enable no-unused-variable for office-ui-fabric-react", + "type": "patch" + } + ], + "packageName": "office-ui-fabric-react", + "email": "mark@thedutchies.com" +} \ No newline at end of file