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

348 361 npm install and eslint fail #362

Merged
merged 3 commits into from
May 3, 2016
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
4 changes: 2 additions & 2 deletions app/scripts/pages/bitswap.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ default class Bitswap extends Component {
<Row>
<Col sm={10} smOffset={1}>
<h3>{i18n.t('Bitswap')}</h3>
<br/>
<br />
<div>
<h4>
<strong>{i18n.t('Wantlist')}</strong>&nbsp;
Expand All @@ -50,7 +50,7 @@ default class Bitswap extends Component {
<FileList className='panel-inner' files={wantlist} namesHidden />
</Panel>
</div>
<br/>
<br />
</Col>
</Row>
)
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/pages/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ default class Logs extends Component {
<Col sm={10} smOffset={1} className={'webui-logs'}>
<h3>{i18n.t('Event Log')}</h3>
<div className='actions'>{buttons}</div>
<br/>
<br />
<div className='textarea-panel panel panel-default padded'>
{this.state.log.map((event) => (
<pre key={event.time}>
Expand All @@ -103,7 +103,7 @@ default class Logs extends Component {
))}
</div>
<div className='pull-right'>{buttons}</div>
<br/>
<br />
</Col>
</Row>
)
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/pages/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ default class Objects extends React.Component {
onChange={(event) => this.setState({pathInput: event.target.value.trim()})}
onKeyPress={this._update}
value={this.state.pathInput}
placeholder={i18n.t('Enter hash or path: /ipfs/QmBpath...')}/>
placeholder={i18n.t('Enter hash or path: /ipfs/QmBpath...')} />
</Col>
<Col xs={2}>
<Button bsStyle={'primary'} className={'go'}
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/pages/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ default class Routing extends Component {
return (
<Row>
<Col sm={10} smOffset={1}>
<DHTGraph peers={this.state.peers}/>
<DHTGraph peers={this.state.peers} />
</Col>
</Row>
)
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import NotFoundPage from './pages/notfound'
export
default (
<Route component={Page} path='/'>
<IndexRoute component={HomePage}/>
<IndexRoute component={HomePage} />
<Route path='home' component={HomePage} />

<Route path='connections' component={ConnectionsPage} />
Expand Down
6 changes: 3 additions & 3 deletions app/scripts/views/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ default class ConfigView extends Component {
<i className='fa fa-recycle'></i>&nbsp;
{i18n.t('Reset')}
</button>
<div className='clear'/>
<div className='clear' />
</div>
)

Expand All @@ -107,7 +107,7 @@ default class ConfigView extends Component {
return (
<div className='webui-config'>
<h3>{i18n.t('Config')}</h3>
<br/>
<br />
{error}
{buttons}
<div className='textarea-panel panel panel-default padded'>
Expand All @@ -123,7 +123,7 @@ default class ConfigView extends Component {
{error}
{buttons}
<div style={{height: '50px'}} />
<br/>
<br />
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/views/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ default class Connection extends Component {
<li className={'webui-connection list-group-item ' + (this.state.open ? 'active' : '')}>
<button className='btn btn-link' onClick={this._handleClick}>
<strong>{this.props.ID}</strong>
<br/>
<br />
<span>{this.props.Address}</span>
<i className='icon fa fa-lg fa-angle-down'></i>
</button>
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/views/dhtgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ default class DHTGraph extends Component {

render () {
if (this.state.initialized) this.update()
return <div className='dht-graph centered'/>
return <div className='dht-graph centered' />
}
}
2 changes: 1 addition & 1 deletion app/scripts/views/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ default class Icon extends Component {
const className = classNames('icon', 'fa', `fa-${this.props.glyph}`, {
'fa-lg': this.props.large
})
return <span className={className} aria-hidden='true'/>
return <span className={className} aria-hidden='true' />
}
}
2 changes: 1 addition & 1 deletion app/scripts/views/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ default class Nav extends Component {
<NavItem
title={title}
url={url}
icon={tab.icon}/>
icon={tab.icon} />
</li>
)
})
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/views/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ default class ObjectView extends Component {
<div className='row'>
<h4>{i18n.t('Object')}</h4>
<LinkButtons gateway={gateway} path={path} />
<br/>
<br />
<div className='panel panel-default'>
<ul className='list-group'>
<Links path={path} links={object.Links} />
<DisplayData data={object.Data}/>
<DisplayData data={object.Data} />
</ul>
</div>
<PermaLink url={permalink} />
Expand Down
10 changes: 5 additions & 5 deletions app/scripts/views/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ default class Page extends React.Component {
<div className='row'>
<div className='navbar-header'>
<Link className='navbar-brand col-xs-12' to='/'>
<img src={require('../../img/logo.png')} alt='IPFS' className='img-responsive logo'/>
<img src={require('../../img/logo.png')} alt='IPFS' className='img-responsive logo' />
<span className='sr-only'>{i18n.t('IPFS')}</span>
</Link>
</div>
Expand All @@ -105,19 +105,19 @@ default class Page extends React.Component {
<ul className='nav navbar-nav navbar-right collapse navbar-collapse'>
<li>
<a href='http://ipfs.io' target='_blank' data-toggle='tooltip' data-placement='bottom' title={i18n.t('About IPFS')}>
<img src={require('../../img/help.png')} alt='Help' className='img-responsive icon'/>
<img src={require('../../img/help.png')} alt='Help' className='img-responsive icon' />
<span className='sr-only'>{i18n.t('Help')}</span>
</a>
</li>
<li>
<a href='https://github.com/ipfs/webui' target='_blank' data-toggle='tooltip' data-placement='bottom' title={i18n.t('Github Repository')}>
<img src={require('../../img/git.png')} alt='Github' className='img-responsive icon'/>
<img src={require('../../img/git.png')} alt='Github' className='img-responsive icon' />
<span className='sr-only'>{i18n.t('Github')}</span>
</a>
</li>
<li>
<a href='https://github.com/ipfs/webui/issues/new' target='_blank' data-toggle='tooltip' data-placement='bottom' title={i18n.t('Report Bugs')}>
<img src={require('../../img/bug.png')} alt='Report a bug' className='img-responsive icon'/>
<img src={require('../../img/bug.png')} alt='Report a bug' className='img-responsive icon' />
<span className='sr-only'>{i18n.t('Report a bug')}</span>
</a>
</li>
Expand All @@ -131,7 +131,7 @@ default class Page extends React.Component {
<div className='row'>
<div className='navbar-collapse collapse in' id='bs4'>
<div className='col-sm-2 sidebar'>
<Nav/>
<Nav />
</div>{/* end row */}
</div>{/* end navbar collapse */}
<div className='col-sm-10 col-sm-push-2'>
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"i18next-localstorage-cache": "^0.2.2",
"i18next-sprintf-postprocessor": "^0.2.2",
"i18next-xhr-backend": "^0.5.3",
"ipfs-api": "github:ipfs/js-ipfs-api#feat/files-api",
"ipfs-api": "^3.0.2",
"ipfs-geoip": "^2.0.0",
"lodash": "^4.2.0",
"react": "^0.14.7",
Expand Down Expand Up @@ -42,7 +42,7 @@
"css-loader": "^0.23.0",
"debug": "^2.2.0",
"enzyme": "^2.1.0",
"eslint": "2.2.0",
"eslint": "^2.9.0",
"eslint-config-standard": "^5.1.0",
"eslint-config-standard-react": "^2.3.0",
"eslint-plugin-promise": "^1.1.0",
Expand All @@ -51,7 +51,6 @@
"file-loader": "^0.8.5",
"hjs-webpack": "^7.0.0",
"https-browserify": "0.0.1",
"ipfs-api": "^2.10.1",
"json-loader": "^0.5.4",
"karma": "^0.13.19",
"karma-chrome-launcher": "^0.2.2",
Expand Down
2 changes: 1 addition & 1 deletion test/views/config.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ConfigView from '../../app/scripts/views/config'
describe('ConfigView', () => {
it('renders the given config', () => {
const config = {a: true, b: {c: 'hello'}}
const el = shallow(<ConfigView config={config}/>)
const el = shallow(<ConfigView config={config} />)

expect(el.find('textarea')).to.have.prop('value', JSON.stringify(config, null, 2))
})
Expand Down
4 changes: 2 additions & 2 deletions test/views/icon.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import Icon from '../../app/scripts/views/icon'

describe('Icon', () => {
it('renders the given glyph', () => {
const el = shallow(<Icon glyph='list'/>)
const el = shallow(<Icon glyph='list' />)
expect(el).to.have.className('icon fa fa-list')
})

it('renders the given glyph with a large option', () => {
const el = shallow(<Icon glyph='list' large/>)
const el = shallow(<Icon glyph='list' large />)
expect(el).to.have.className('icon fa fa-list fa-lg')
})
})
2 changes: 1 addition & 1 deletion test/views/nav-item.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import NavItem from '../../app/scripts/views/nav-item'

describe('NavItem', () => {
it('renders', () => {
const el = shallow(<NavItem title='List' url='/list' icon='list'/>)
const el = shallow(<NavItem title='List' url='/list' icon='list' />)

expect(el).to.have.prop('to', '/list')
expect(el.find('Icon')).to.be.present()
Expand Down
4 changes: 2 additions & 2 deletions test/views/object/object-link.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ObjectLink from '../../../app/scripts/views/object/object-link'
describe('ObjectLink', () => {
it('renders the given link', () => {
const path = parse('/ipfs/hello/world')
const el = shallow(<ObjectLink path={path} link={{Name: 'hi', Hash: '12', Size: 2}}/>)
const el = shallow(<ObjectLink path={path} link={{Name: 'hi', Hash: '12', Size: 2}} />)

expect(el.find('Link')).to.have.length(2)
expect(el.find('Link').at(0)).to.have.prop('to', 'objects/\\ipfs\\hello\\world\\hi')
Expand All @@ -17,7 +17,7 @@ describe('ObjectLink', () => {

it('renders links without a name', () => {
const path = parse('/ipfs/hello/world')
const el = shallow(<ObjectLink path={path} link={{Hash: 'Qm', Size: 2}}/>)
const el = shallow(<ObjectLink path={path} link={{Hash: 'Qm', Size: 2}} />)

expect(el.find('Link').at(0)).to.have.prop('to', 'objects/\\ipfs\\Qm')
})
Expand Down
2 changes: 1 addition & 1 deletion test/views/object/object-links.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('ObjectLinks', () => {
Hash: 'Qp',
Size: 3
}]
const el = shallow(<ObjectLinks path={path} links={links}/>)
const el = shallow(<ObjectLinks path={path} links={links} />)

expect(el.find('strong')).to.have.text('Object links')
expect(el.find('th').first()).to.have.text('Name')
Expand Down
2 changes: 1 addition & 1 deletion test/views/object/parent-link.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ParentLink from '../../../app/scripts/views/object/parent-link'
describe('ParentLink', () => {
it('renders with a url', () => {
const path = parse('/ipfs/hi/hello/world')
const el = shallow(<ParentLink parent={path}/>)
const el = shallow(<ParentLink parent={path} />)

expect(el.find('LinkContainer')).to.have.prop('to', '/objects/\\ipfs\\hi\\hello\\world')
})
Expand Down
6 changes: 3 additions & 3 deletions test/views/object/raw-data.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import RawData from '../../../app/scripts/views/object/raw-data'

describe('RawData', () => {
it('renders the given data', () => {
const el = shallow(<RawData data='Hello World'/>)
const el = shallow(<RawData data='Hello World' />)
const buf = new Buffer('Hello World', 'utf-8')
const dataString = `data:text/plain;charset=utf8;base64,${buf.toString('base64')}`

Expand All @@ -15,15 +15,15 @@ describe('RawData', () => {

it('limits the data to 10000 characters by default', () => {
const data = Array(15000).fill('a').join('')
const el = shallow(<RawData data={data}/>)
const el = shallow(<RawData data={data} />)
const buf = new Buffer(data.substr(0, 10000), 'utf-8')
const dataString = `data:text/plain;charset=utf8;base64,${buf.toString('base64')}`
expect(el.find('iframe')).to.have.attr('src', dataString)
})

it('uses a custom limit', () => {
const data = 'Hello World'
const el = shallow(<RawData data={data} limit={2}/>)
const el = shallow(<RawData data={data} limit={2} />)
const buf = new Buffer('He', 'utf-8')
const dataString = `data:text/plain;charset=utf8;base64,${buf.toString('base64')}`

Expand Down
2 changes: 1 addition & 1 deletion test/views/table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('TableView', () => {
it('renders a table with multiple rows and children', () => {
const table = [1, 2, 3]
const children = [<span key='1'>foo</span>]
const el = shallow(<TableView table={table} children={children}/>)
const el = shallow(<TableView table={table} children={children} />)

expect(el.find('tr').length).to.equal(3)
expect(el.find('span').length).to.equal(1)
Expand Down