mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 19:18:55 -07:00
Add ESLint & Run it against the system (#4470)
This commit is contained in:
parent
43eee6b32e
commit
f789e02096
106 changed files with 1235 additions and 20242 deletions
|
|
@ -1,53 +1,53 @@
|
|||
// eslint-disable-next-line
|
||||
import React, { Component } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import * as _ from "lodash";
|
||||
import { connect } from 'react-redux';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import Table from "@material-ui/core/Table";
|
||||
import TableBody from "@material-ui/core/TableBody";
|
||||
import TableCell from "@material-ui/core/TableCell";
|
||||
import TableHead from "@material-ui/core/TableHead";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import TableSortLabel from "@material-ui/core/TableSortLabel";
|
||||
import Tooltip from "@material-ui/core/Tooltip";
|
||||
import Table from '@material-ui/core/Table';
|
||||
import TableBody from '@material-ui/core/TableBody';
|
||||
import TableCell from '@material-ui/core/TableCell';
|
||||
import TableHead from '@material-ui/core/TableHead';
|
||||
import TableRow from '@material-ui/core/TableRow';
|
||||
import TableSortLabel from '@material-ui/core/TableSortLabel';
|
||||
import Tooltip from '@material-ui/core/Tooltip';
|
||||
|
||||
// import { RoomsService } from "AppShell/common/services";
|
||||
|
||||
import { SortUtil, RoomsDispatch, RoomsSelectors } from "store";
|
||||
import { UserDisplay } from "components";
|
||||
import { SortUtil, RoomsDispatch, RoomsSelectors } from 'store';
|
||||
import { UserDisplay } from 'components';
|
||||
|
||||
import "./Games.css";
|
||||
import './Games.css';
|
||||
|
||||
// @TODO run interval to update timeSinceCreated
|
||||
class Games extends Component<GamesProps> {
|
||||
private headerCells = [
|
||||
{
|
||||
label: "Age",
|
||||
field: "startTime"
|
||||
label: 'Age',
|
||||
field: 'startTime'
|
||||
},
|
||||
{
|
||||
label: "Description",
|
||||
field: "description"
|
||||
label: 'Description',
|
||||
field: 'description'
|
||||
},
|
||||
{
|
||||
label: "Creator",
|
||||
field: "creatorInfo.name"
|
||||
label: 'Creator',
|
||||
field: 'creatorInfo.name'
|
||||
},
|
||||
{
|
||||
label: "Type",
|
||||
field: "gameType"
|
||||
label: 'Type',
|
||||
field: 'gameType'
|
||||
},
|
||||
{
|
||||
label: "Restrictions",
|
||||
label: 'Restrictions',
|
||||
// field: "?"
|
||||
},
|
||||
{
|
||||
label: "Players",
|
||||
label: 'Players',
|
||||
// field: ["maxPlayers", "playerCount"]
|
||||
},
|
||||
{
|
||||
label: "Spectators",
|
||||
field: "spectatorsCount"
|
||||
label: 'Spectators',
|
||||
field: 'spectatorsCount'
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import React from "react";
|
|||
|
||||
import { Message } from 'components';
|
||||
|
||||
import "./Messages.css";
|
||||
import './Messages.css';
|
||||
|
||||
const Messages = ({ messages }) => (
|
||||
<div className="messages">
|
||||
|
|
@ -12,7 +12,7 @@ const Messages = ({ messages }) => (
|
|||
<div className="message-wrapper" key={message.timeReceived}>
|
||||
<Message message={message} />
|
||||
</div>
|
||||
) )
|
||||
))
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,53 +1,53 @@
|
|||
// eslint-disable-next-line
|
||||
import React, { Component } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import * as _ from "lodash";
|
||||
import { connect } from 'react-redux';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import Table from "@material-ui/core/Table";
|
||||
import TableBody from "@material-ui/core/TableBody";
|
||||
import TableCell from "@material-ui/core/TableCell";
|
||||
import TableHead from "@material-ui/core/TableHead";
|
||||
import TableRow from "@material-ui/core/TableRow";
|
||||
import TableSortLabel from "@material-ui/core/TableSortLabel";
|
||||
import Tooltip from "@material-ui/core/Tooltip";
|
||||
import Table from '@material-ui/core/Table';
|
||||
import TableBody from '@material-ui/core/TableBody';
|
||||
import TableCell from '@material-ui/core/TableCell';
|
||||
import TableHead from '@material-ui/core/TableHead';
|
||||
import TableRow from '@material-ui/core/TableRow';
|
||||
import TableSortLabel from '@material-ui/core/TableSortLabel';
|
||||
import Tooltip from '@material-ui/core/Tooltip';
|
||||
|
||||
// import { RoomsService } from "AppShell/common/services";
|
||||
|
||||
import { SortUtil, RoomsDispatch, RoomsSelectors } from "store";
|
||||
import { UserDisplay } from "components";
|
||||
import { SortUtil, RoomsDispatch, RoomsSelectors } from 'store';
|
||||
import { UserDisplay } from 'components';
|
||||
|
||||
import "./OpenGames.css";
|
||||
import './OpenGames.css';
|
||||
|
||||
// @TODO run interval to update timeSinceCreated
|
||||
class OpenGames extends Component<OpenGamesProps> {
|
||||
private headerCells = [
|
||||
{
|
||||
label: "Age",
|
||||
field: "startTime"
|
||||
label: 'Age',
|
||||
field: 'startTime'
|
||||
},
|
||||
{
|
||||
label: "Description",
|
||||
field: "description"
|
||||
label: 'Description',
|
||||
field: 'description'
|
||||
},
|
||||
{
|
||||
label: "Creator",
|
||||
field: "creatorInfo.name"
|
||||
label: 'Creator',
|
||||
field: 'creatorInfo.name'
|
||||
},
|
||||
{
|
||||
label: "Type",
|
||||
field: "gameType"
|
||||
label: 'Type',
|
||||
field: 'gameType'
|
||||
},
|
||||
{
|
||||
label: "Restrictions",
|
||||
label: 'Restrictions',
|
||||
// field: "?"
|
||||
},
|
||||
{
|
||||
label: "Players",
|
||||
label: 'Players',
|
||||
// field: ["maxPlayers", "playerCount"]
|
||||
},
|
||||
{
|
||||
label: "Spectators",
|
||||
field: "spectatorsCount"
|
||||
label: 'Spectators',
|
||||
field: 'spectatorsCount'
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
// eslint-disable-next-line
|
||||
import React, { Component } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { withRouter /*, RouteComponentProps */, generatePath } from "react-router-dom";
|
||||
import { connect } from 'react-redux';
|
||||
import { withRouter, generatePath } from 'react-router-dom';
|
||||
|
||||
import ListItem from "@material-ui/core/ListItem";
|
||||
import Paper from "@material-ui/core/Paper";
|
||||
import ListItem from '@material-ui/core/ListItem';
|
||||
import Paper from '@material-ui/core/Paper';
|
||||
|
||||
import { RoomsService } from "api";
|
||||
import { ScrollToBottomOnChanges, ThreePaneLayout, UserDisplay, VirtualList, AuthGuard} from "components";
|
||||
import { RoomsStateMessages, RoomsStateRooms, JoinedRooms, RoomsSelectors } from "store";
|
||||
import { RouteEnum } from "types";
|
||||
import { RoomsService } from 'api';
|
||||
import { ScrollToBottomOnChanges, ThreePaneLayout, UserDisplay, VirtualList, AuthGuard } from 'components';
|
||||
import { RoomsStateMessages, RoomsStateRooms, JoinedRooms, RoomsSelectors } from 'store';
|
||||
import { RouteEnum } from 'types';
|
||||
|
||||
import OpenGames from "./OpenGames";
|
||||
import Messages from "./Messages";
|
||||
import SayMessage from "./SayMessage";
|
||||
import OpenGames from './OpenGames';
|
||||
import Messages from './Messages';
|
||||
import SayMessage from './SayMessage';
|
||||
|
||||
import "./Room.css";
|
||||
import './Room.css';
|
||||
|
||||
// @TODO (3)
|
||||
class Room extends Component<any> {
|
||||
|
|
@ -25,7 +25,7 @@ class Room extends Component<any> {
|
|||
|
||||
roomId = parseInt(roomId, 0);
|
||||
|
||||
if (!joined.find(({roomId: id}) => id === roomId)) {
|
||||
if (!joined.find(({ roomId: id }) => id === roomId)) {
|
||||
history.push(generatePath(RouteEnum.SERVER));
|
||||
}
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ class Room extends Component<any> {
|
|||
top={(
|
||||
<Paper className="room-view__games overflow-scroll">
|
||||
<OpenGames room={room} />
|
||||
</Paper>
|
||||
</Paper>
|
||||
)}
|
||||
|
||||
bottom={(
|
||||
|
|
@ -89,7 +89,7 @@ class Room extends Component<any> {
|
|||
<ListItem button className="room-view__side-list__item">
|
||||
<UserDisplay user={user} />
|
||||
</ListItem>
|
||||
) ) }
|
||||
)) }
|
||||
/>
|
||||
</Paper>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// eslint-disable-next-line
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Form, reduxForm } from "redux-form"
|
||||
import { connect } from 'react-redux';
|
||||
import { Form, reduxForm } from 'redux-form'
|
||||
|
||||
import { InputAction } from 'components';
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ const SayMessage = ({ handleSubmit }) => (
|
|||
);
|
||||
|
||||
const propsMap = {
|
||||
form: "sayMessage"
|
||||
form: 'sayMessage'
|
||||
};
|
||||
|
||||
export default connect()(reduxForm(propsMap)(SayMessage));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue