-
Notifications
You must be signed in to change notification settings - Fork 78
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
fix: eslint no unused vars #205
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
657231c
Enabled no-unused-vars lint rule and fixed lint errors
greg-a-smith 95c442e
solve coPilotShell no used var issue
chrismanciero be83198
update files for eslint failure
chrismanciero b29a3c4
Merge branch 'master' into fix/eslint-no-unused-vars
chrismanciero 708e2b8
Merge changes from master
greg-a-smith 302b739
Merge changes
greg-a-smith b59af2d
Merge branch 'master' into fix/eslint-no-unused-vars
greg-a-smith File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,127 @@ | ||
import React, { Component } from 'react'; | ||
import { DocsTile, DocsText, Separator, Header, Description, Import, Properties } from '../'; | ||
import { | ||
DocsTile, | ||
DocsText, | ||
Separator, | ||
Header, | ||
Description, | ||
Import, | ||
Properties | ||
} from '../'; | ||
import { MultiInput } from '../'; | ||
|
||
export class MultiInputComponent extends Component { | ||
data = [ | ||
'Apple', | ||
'Apricot', | ||
'Acai', | ||
'African Moringa', | ||
'Bearberry', | ||
'Bilberry', | ||
'Blood orange', | ||
'Barbadine', | ||
'Barbados cherry', | ||
'Balsam Apple', | ||
'Chokeberry', | ||
'Cranberry', | ||
'Cupuacu' | ||
]; | ||
data = [ | ||
'Apple', | ||
'Apricot', | ||
'Acai', | ||
'African Moringa', | ||
'Bearberry', | ||
'Bilberry', | ||
'Blood orange', | ||
'Barbadine', | ||
'Barbados cherry', | ||
'Balsam Apple', | ||
'Chokeberry', | ||
'Cranberry', | ||
'Cupuacu' | ||
]; | ||
|
||
constructor(props) { | ||
super(props); | ||
constructor(props) { | ||
super(props); | ||
|
||
this.state = { | ||
data: [] | ||
}; | ||
} | ||
|
||
performTagsUpdate = aTags => { | ||
// console.log(aTags); | ||
this.state = { | ||
data: [] | ||
}; | ||
} | ||
|
||
performTagsUpdate = aTags => { | ||
alert(aTags); | ||
}; | ||
|
||
multiInputCode = `<MultiInput | ||
multiInputCode = `<MultiInput | ||
data={this.data} | ||
onTagsUpdate={this.performTagsUpdate} | ||
placeHolder="Select a Fruit" | ||
/>`; | ||
|
||
multiInputCompactCode = `<MultiInput | ||
multiInputCompactCode = `<MultiInput | ||
data={this.data} | ||
onTagsUpdate={this.performTagsUpdate} | ||
placeHolder="Select a Fruit" | ||
compact={true} | ||
/>`; | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Header>Multi Input</Header> | ||
<Description /> | ||
<Import module='MultiInput' path='/fundamental-react/src/' /> | ||
render() { | ||
return ( | ||
<div> | ||
<Header>Multi Input</Header> | ||
<Description /> | ||
<Import module='MultiInput' path='/fundamental-react/src/' /> | ||
|
||
<Separator /> | ||
<Separator /> | ||
|
||
<Properties | ||
type='Inputs' | ||
properties={[ | ||
{ | ||
name: 'data', | ||
description: 'array (Required) - Collection of items to display in the list.' | ||
}, | ||
{ | ||
name: 'placeHolder', | ||
description: 'string - The text to use as placeholder when no text is entered.' | ||
}, | ||
{ | ||
name: 'onTagsUpdate', | ||
description: | ||
'func - Method to fire on add or remove of tag. Component returns array of tags selected.' | ||
}, | ||
{ | ||
name: 'compact', | ||
description: 'bool - true: display compact style, false: default style' | ||
} | ||
]} /> | ||
<Properties | ||
type='Inputs' | ||
properties={[ | ||
{ | ||
name: 'data', | ||
description: | ||
'array (Required) - Collection of items to display in the list.' | ||
}, | ||
{ | ||
name: 'placeHolder', | ||
description: | ||
'string - The text to use as placeholder when no text is entered.' | ||
}, | ||
{ | ||
name: 'onTagsUpdate', | ||
description: | ||
'func - Method to fire on add or remove of tag. Component returns array of tags selected.' | ||
}, | ||
{ | ||
name: 'compact', | ||
description: | ||
'bool - true: display compact style, false: default style' | ||
} | ||
]} /> | ||
|
||
<Separator /> | ||
<Separator /> | ||
|
||
<h2>Default</h2> | ||
<Description>A text input when on focus will show list of items to select.</Description> | ||
<DocsTile> | ||
<div> | ||
<MultiInput | ||
data={this.data} | ||
onTagsUpdate={this.performTagsUpdate} | ||
placeHolder='Select a Fruit' /> | ||
</div> | ||
</DocsTile> | ||
<DocsText>{this.multiInputCode}</DocsText> | ||
<h2>Default</h2> | ||
<Description> | ||
A text input when on focus will show list of items to select. | ||
</Description> | ||
<DocsTile> | ||
<div> | ||
<MultiInput | ||
data={this.data} | ||
onTagsUpdate={this.performTagsUpdate} | ||
placeHolder='Select a Fruit' /> | ||
</div> | ||
</DocsTile> | ||
<DocsText>{this.multiInputCode}</DocsText> | ||
|
||
<Separator /> | ||
<Separator /> | ||
|
||
<h2>Compact Style</h2> | ||
<Description> | ||
A text input when on focus will show list of items to select, but with a compact input box. | ||
</Description> | ||
<DocsTile> | ||
<div> | ||
<MultiInput | ||
data={this.data} | ||
onTagsUpdate={this.performTagsUpdate} | ||
placeHolder='Select a Fruit' | ||
compact /> | ||
</div> | ||
</DocsTile> | ||
<DocsText>{this.multiInputCompactCode}</DocsText> | ||
<h2>Compact Style</h2> | ||
<Description> | ||
A text input when on focus will show list of items to select, but with | ||
a compact input box. | ||
</Description> | ||
<DocsTile> | ||
<div> | ||
<MultiInput | ||
data={this.data} | ||
onTagsUpdate={this.performTagsUpdate} | ||
placeHolder='Select a Fruit' | ||
compact /> | ||
</div> | ||
</DocsTile> | ||
<DocsText>{this.multiInputCompactCode}</DocsText> | ||
|
||
<Separator /> | ||
</div> | ||
); | ||
} | ||
<Separator /> | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greg-a-smith: why are these test being
x
-ed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a to-do comment stating why snapshots were failing and the assertion was commented out causing the
no-unused-vars
lint error. To resolve all of the lint errors, the entire test ended up being commented out so I decided to uncomment everything and justx
the tests until the to-do comments are resolved.