Skip to content

Commit

Permalink
adds eslint ignore to all files
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav-anshul committed Apr 28, 2020
1 parent 23f8f42 commit 4dca25d
Show file tree
Hide file tree
Showing 41 changed files with 138 additions and 57 deletions.
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
],
"react/jsx-fragments": 0,
"react/jsx-key": 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/rules-of-hooks": "warn",
"react-hooks/exhaustive-deps": "warn",
"linebreak-style": ["error", "unix"]
"linebreak-style": ["off", "windows"]
}
}
8 changes: 8 additions & 0 deletions debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[0428/044950.598:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0428/044950.600:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0428/050534.751:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0428/050534.754:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0428/053220.975:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0428/053220.977:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0428/054524.246:ERROR:crash_report_database_win.cc(469)] failed to stat report
[0428/054524.248:ERROR:crash_report_database_win.cc(469)] failed to stat report
10 changes: 6 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { BrowserRouter, Redirect, Route, Switch } from 'react-router-dom'
import { Main } from '@aragon/ui'
Expand All @@ -16,11 +18,11 @@ function App() {
<BrowserRouter>
<Main layout={false} theme={theme}>
<MainView>
<Redirect from="/" to="/dashboard" />
<Redirect from='/' to='/dashboard' />
<Switch>
<Route path="/dashboard" component={Dashboard} />
<Route exact path="/tasks" component={Tasks} />
<Route exact path="/disputes" component={Disputes} />
<Route path='/dashboard' component={Dashboard} />
<Route exact path='/tasks' component={Tasks} />
<Route exact path='/disputes' component={Disputes} />
<Route component={ErrorPage} />
</Switch>
</MainView>
Expand Down
2 changes: 2 additions & 0 deletions src/ErrorPage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'

function ErrorPage() {
Expand Down
2 changes: 2 additions & 0 deletions src/Header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'

function Header() {
Expand Down
1 change: 1 addition & 0 deletions src/MainView.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
import React from 'react'
import { GU, Layout, useViewport } from '@aragon/ui'
import NavBar from './NavBar'
Expand Down
10 changes: 6 additions & 4 deletions src/NavBar.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { useHistory, useRouteMatch } from 'react-router-dom'
import { ButtonBase, GU, useTheme, textStyle } from '@aragon/ui'
Expand Down Expand Up @@ -30,9 +32,9 @@ function NavBar() {
Menu
</h2>

<NavItem to="/dashboard" icon={menuIcon} label="Dashboard" />
<NavItem to="/tasks" icon={menuIcon} label="Tasks" />
<NavItem to="/disputes" icon={menuIcon} label="Disputes" />
<NavItem to='/dashboard' icon={menuIcon} label='Dashboard' />
<NavItem to='/tasks' icon={menuIcon} label='Tasks' />
<NavItem to='/disputes' icon={menuIcon} label='Disputes' />
</nav>
)
}
Expand Down Expand Up @@ -75,7 +77,7 @@ function NavItem({ to, icon, label }) {
`}
/>

<img src={icon} alt="" />
<img src={icon} alt='' />
<span
css={`
margin-left: ${1 * GU}px;
Expand Down
2 changes: 2 additions & 0 deletions src/components/Dashboard/Balance.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'

import { GU, textStyle, useTheme } from '@aragon/ui'
Expand Down
2 changes: 2 additions & 0 deletions src/components/Dashboard/Balances.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { Button, textStyle, GU, useTheme } from '@aragon/ui'

Expand Down
6 changes: 4 additions & 2 deletions src/components/Dashboard/CourtStats.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { Box, Distribution } from '@aragon/ui'

const CourtStats = () => {
return (
<Box heading="Court Stats">
<Box heading='Court Stats'>
<Distribution
heading="Disputes"
heading='Disputes'
items={[
{ item: 'New', percentage: 37 },
{ item: 'Adjudicated', percentage: 22 },
Expand Down
6 changes: 4 additions & 2 deletions src/components/Dashboard/Dashboard.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { Button, Header, Split } from '@aragon/ui'

Expand All @@ -14,8 +16,8 @@ function Dashboard() {
return (
<React.Fragment>
<Header
primary="Dashboard"
secondary={<Button label="Buy ANJ" mode="strong" />}
primary='Dashboard'
secondary={<Button label='Buy ANJ' mode='strong' />}
/>
<ProfileHeader active />
<Split
Expand Down
2 changes: 2 additions & 0 deletions src/components/Dashboard/DashboardStats.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import LatestActivity from './LatestActivity'
import CourtStats from './CourtStats'
Expand Down
4 changes: 3 additions & 1 deletion src/components/Dashboard/LatestActivity.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { Box, GU, IdentityBadge, textStyle, useTheme } from '@aragon/ui'

Expand All @@ -10,7 +12,7 @@ function LatestActivity() {
const theme = useTheme()

return (
<Box heading="latest activity" padding={0}>
<Box heading='latest activity' padding={0}>
<Stepper
lineColor={theme.accent.alpha(0.2)}
lineExtraHeight={10}
Expand Down
1 change: 1 addition & 0 deletions src/components/Dashboard/ProfileHeader.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
import React from 'react'

import { Box, Button, GU, textStyle, useTheme, useViewport } from '@aragon/ui'
Expand Down
6 changes: 4 additions & 2 deletions src/components/Dashboard/TaskTable.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React, { useMemo, useState } from 'react'
import {
ContextMenu,
Expand Down Expand Up @@ -36,7 +38,7 @@ const TaskTable = ({ tasks, connectedAccount }) => {
const { below } = useViewport()
const compactMode = below('medium')

const handleSelectedDateRangeChange = range => {
const handleSelectedDateRangeChange = (range) => {
setPage(0)
setSelectedDateRange(range)
}
Expand Down Expand Up @@ -85,7 +87,7 @@ const TaskTable = ({ tasks, connectedAccount }) => {
</div>

{!compactMode && (
<div css="text-align: right;">
<div css='text-align: right;'>
<DateRangePicker
startDate={selectedDateRange.start}
endDate={selectedDateRange.end}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Disputes/DisputeCard.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import styled from 'styled-components'

Expand Down
6 changes: 4 additions & 2 deletions src/components/Disputes/DisputeDetail.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { BackButton, Bar, Box, Split } from '@aragon/ui'

Expand All @@ -23,8 +25,8 @@ function DisputeDetail({ dispute, onBack }) {
}
secondary={
<React.Fragment>
<Box heading="Voting results">Results</Box>
<Box heading="Dispute timeline" padding={0}>
<Box heading='Voting results'>Results</Box>
<Box heading='Dispute timeline' padding={0}>
<DisputeTimeline />
</Box>
</React.Fragment>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Disputes/DisputeEvidences.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { Accordion, GU, IconFolder, useTheme } from '@aragon/ui'

Expand Down
4 changes: 3 additions & 1 deletion src/components/Disputes/DisputeInfo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import {
Box,
Expand Down Expand Up @@ -218,7 +220,7 @@ const DisputeInfo = ({ dispute }) => {
</div>
<Button
mode="strong"
onClick={() => {}}
onClick={() => { }}
wide
css={`
background: ${theme.surfaceContentSecondary};
Expand Down
18 changes: 10 additions & 8 deletions src/components/Disputes/DisputeList.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import {
Bar,
Expand Down Expand Up @@ -29,8 +31,8 @@ function DisputeList({ disputes, selectDispute }) {
`}
>
<DropDown
header="Disputes"
placeholder="Disputes"
header='Disputes'
placeholder='Disputes'
// selected={disputeStatusFilter}
// onChange={handleDisputeStatusFilterChange}
items={[
Expand All @@ -47,22 +49,22 @@ function DisputeList({ disputes, selectDispute }) {
${textStyle('label3')};
`}
>
<Tag limitDigits={4} label={disputes.length} size="small" />
<Tag limitDigits={4} label={disputes.length} size='small' />
</span>
</div>,
'Open',
'Appeal',
'Closed',
]}
width="128px"
width='128px'
/>
<DropDown
header="Status"
placeholder="Status"
header='Status'
placeholder='Status'
// selected={disputeStatusFilter}
// onChange={handleDisputeStatusFilterChange}
items={[]}
width="128px"
width='128px'
/>
<DateRangePicker
// startDate={disputeDateRangeFilter.start}
Expand All @@ -73,7 +75,7 @@ function DisputeList({ disputes, selectDispute }) {
</div>
</Bar>
<CardLayout columnWidthMin={30 * GU} rowHeight={307}>
{disputes.map(dispute => {
{disputes.map((dispute) => {
return (
<DisputeCard
key={dispute.id}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Disputes/DisputeStatus.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { useTheme } from '@aragon/ui'

Expand Down
2 changes: 2 additions & 0 deletions src/components/Disputes/DisputeText.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import PropTypes from 'prop-types'

Expand Down
2 changes: 2 additions & 0 deletions src/components/Disputes/DisputeTimeline.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import { GU, textStyle, useTheme } from '@aragon/ui'

Expand Down
12 changes: 7 additions & 5 deletions src/components/Disputes/Disputes.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React, { useCallback, useMemo, useState } from 'react'
import { Button, Header } from '@aragon/ui'

Expand All @@ -16,8 +18,8 @@ function Disputes() {
return (
<React.Fragment>
<Header
primary="Disputes"
secondary={!selectedDispute && <Button label="Buy ANJ" />}
primary='Disputes'
secondary={!selectedDispute && <Button label='Buy ANJ' />}
/>
{selectedDispute ? (
<DisputeDetail dispute={selectedDispute} onBack={handleBack} />
Expand All @@ -38,13 +40,13 @@ function Disputes() {
)
}

const useSelectedDispute = disputes => {
const useSelectedDispute = (disputes) => {
const [selectedDisputeId, setSelectedDisputeId] = useState(-1)

const selectDispute = disputeId => setSelectedDisputeId(disputeId)
const selectDispute = (disputeId) => setSelectedDisputeId(disputeId)

const selectedDispute = useMemo(
() => disputes.find(dispute => dispute.id === selectedDisputeId) || null,
() => disputes.find((dispute) => dispute.id === selectedDisputeId) || null,
[disputes, selectedDisputeId]
)

Expand Down
10 changes: 6 additions & 4 deletions src/components/IdentityManager/IdentityManager.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React, { useCallback, useContext, useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import { Subject } from 'rxjs'
Expand All @@ -15,24 +17,24 @@ function useIdentity(address) {
IdentityContext
)

const handleNameChange = useCallback(metadata => {
const handleNameChange = useCallback((metadata) => {
setName(metadata ? metadata.name : null)
}, [])

const handleShowLocalIdentityModal = useCallback(
address => {
(address) => {
// Emit an event whenever the modal is closed (when the promise resolves)
return showLocalIdentityModal(address)
.then(() => updates$.next(address))
.catch(e => null)
.catch((e) => null)
},
[showLocalIdentityModal, updates$]
)

useEffect(() => {
resolve(address).then(handleNameChange)

const subscription = updates$.subscribe(updatedAddress => {
const subscription = updates$.subscribe((updatedAddress) => {
if (updatedAddress.toLowerCase() === address.toLowerCase()) {
// Resolve and update state when the identity have been updated
resolve(address).then(handleNameChange)
Expand Down
2 changes: 2 additions & 0 deletions src/components/Lib/dayjs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import isBetween from 'dayjs/plugin/isBetween'
import dayjs from 'dayjs'

Expand Down
2 changes: 2 additions & 0 deletions src/components/Lib/web3.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import sha3 from 'js-sha3'
const { keccak_256: keccak256 } = sha3

Expand Down
1 change: 1 addition & 0 deletions src/components/LocalIdentityBadge/LocalIdentityBadge.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
import React from 'react'
// import { useNetwork } from '@aragon/api-react'
import { IdentityBadge } from '@aragon/ui'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */

import React from 'react'
import PropTypes from 'prop-types'
import { IconLabel, GU } from '@aragon/ui'
Expand Down
Loading

0 comments on commit 4dca25d

Please sign in to comment.