Skip to content

Commit 9bd38a8

Browse files
committed
resolve merge conflicts and linting errors
1 parent 6783b9b commit 9bd38a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+8098
-2125
lines changed

.eslintrc.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true,
6+
"jest/globals": true
7+
},
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:react/recommended",
11+
"plugin:prettier/recommended",
12+
"prettier/react",
13+
"prettier/standard"
14+
],
15+
"globals": {
16+
"Atomics": "readonly",
17+
"SharedArrayBuffer": "readonly"
18+
},
19+
"parser": "babel-eslint",
20+
"parserOptions": {
21+
"ecmaFeatures": {
22+
"jsx": true
23+
},
24+
"ecmaVersion": 6,
25+
"sourceType": "module"
26+
},
27+
"plugins": ["react", "prettier", "jest"],
28+
"settings": {
29+
"react": {
30+
"version": "detect"
31+
}
32+
},
33+
"rules": {
34+
"prettier/prettier": "error",
35+
"react/prop-types": "warn",
36+
"react/no-unescaped-entities": 0
37+
}
38+
}

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# https://forums.meteor.com/t/integrating-with-travis-ci/2608
2+
# https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#meteor-apps
3+
4+
language: node_js
5+
node_js:
6+
- "8"
7+
before_script:
8+
# Install meteor
9+
- curl https://install.meteor.com | /bin/sh
10+
# Add meteor to path (instead of asking for sudo in the Travis container)
11+
# We can then use the faster container infrastructure - http://docs.travis-ci.com/user/workers/container-based-infrastructure/
12+
- export PATH=$HOME/.meteor:$PATH
13+
# Install all the dependencies!
14+
- npm install
15+
script:
16+
- npm run lint
17+
services:
18+
- mongodb
19+
cache:
20+
directories:
21+
- node_modules

babel.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
// Allows Jest to use ES6 syntax and read JSX
3+
presets: ['@babel/preset-env', '@babel/react'],
4+
plugins: [
5+
// Allows for class properties in React Components to be transpiled
6+
['@babel/plugin-proposal-class-properties'],
7+
8+
// Defines file paths to make import statements shorter;
9+
// Avoids things like `import from ../../../`
10+
[
11+
'module-resolver',
12+
{
13+
root: './',
14+
alias: {
15+
lib: './lib',
16+
components: './imports/ui/components',
17+
},
18+
},
19+
],
20+
],
21+
};

client/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import { Meteor } from 'meteor/meteor';
32
import { render } from 'react-dom';
43
import { renderRoutes } from './routes.jsx';

client/routes.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
2+
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
33
import Login from '../imports/ui/components/login.jsx';
44
import Landing from '../imports/ui/components/landing.jsx';
55
import Navbar from '../imports/ui/components/navbar.jsx';
@@ -9,7 +9,6 @@ import Apply from '../imports/ui/components/apply.jsx';
99
import ForgotPassword from '../imports/ui/components/forgot_password.jsx';
1010
import SetPassword from '../imports/ui/components/set_password.jsx';
1111
import Moderator from '../imports/ui/components/moderator.jsx';
12-
import Dashboard from '../imports/ui/components/dashboard/dashboard';
1312
import Profile from '../imports/ui/components/dashboard/profile';
1413
import AuthenticatedRoute from '../imports/ui/components/hoc/AuthenticatedRoute';
1514
import { AuthProvider } from '../imports/ui/components/hoc/AuthProvider';

imports/api/entries/entries.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Meteor } from 'meteor/meteor';
21
import { Mongo } from 'meteor/mongo';
32
const Entries = new Mongo.Collection('entries');
43
import SimpleSchema from 'simpl-schema';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
/* eslint-disable no-unused-vars */
12
import { Meteor } from 'meteor/meteor';
23
import Entries from '/imports/api/entries/entries.js';
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
import { Meteor } from 'meteor/meteor';
12
import Entries from '/imports/api/entries/entries.js';
23

3-
Meteor.publish('entries.board', function(argument) {
4+
Meteor.publish('entries.board', function() {
45
return Entries.find({}, { limit: 100 });
56
});

imports/ui/components/apply.jsx

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Apply extends React.Component {
1919
processStep: 1,
2020
formValidated: false,
2121
error: null,
22-
processing: false
22+
processing: false,
2323
};
2424
}
2525

@@ -73,15 +73,30 @@ class Apply extends React.Component {
7373
<Card.Body>
7474
<Form.Group controlId="name">
7575
<Form.Label>Hello, my name is:</Form.Label>
76-
<Form.Control type="text" required defaultValue={name} pattern="[A-Za-z0-9 ]{3,50}" data-error="Please enter" />
77-
<Form.Control.Feedback type="invalid">Your name needs to be between 3 and 50 characters long.</Form.Control.Feedback>
76+
<Form.Control
77+
type="text"
78+
required
79+
defaultValue={name}
80+
pattern="[A-Za-z0-9 ]{3,50}"
81+
data-error="Please enter"
82+
/>
83+
<Form.Control.Feedback type="invalid">
84+
Your name needs to be between 3 and 50 characters long.
85+
</Form.Control.Feedback>
7886
<Form.Text className="text-muted">Your name will be anonymous except to your match</Form.Text>
7987
</Form.Group>
8088

8189
<Form.Group controlId="oneLineIntro">
8290
<Form.Label>One-line intro of yourself:</Form.Label>
83-
<Form.Control type="text" required defaultValue={oneLineIntro} pattern="[A-Za-z0-9,!?\x27\x22\s\.]{8,140}" />
84-
<Form.Control.Feedback type="invalid">Please share an intro between 8 and 140 characters long.</Form.Control.Feedback>
91+
<Form.Control
92+
type="text"
93+
required
94+
defaultValue={oneLineIntro}
95+
pattern="[A-Za-z0-9,!?\x27\x22\s\.]{8,140}"
96+
/>
97+
<Form.Control.Feedback type="invalid">
98+
Please share an intro between 8 and 140 characters long.
99+
</Form.Control.Feedback>
85100
</Form.Group>
86101

87102
<Form.Group controlId="lookingFor">
@@ -106,7 +121,7 @@ class Apply extends React.Component {
106121

107122
getForm3() {
108123
const { email, timezone } = this._formData || {};
109-
const { formValidated, processing } = this.state;
124+
const { formValidated, processing } = this.state;
110125
return (
111126
<Form noValidate validated={formValidated} onSubmit={this.handleSubmit}>
112127
<Card>
@@ -157,18 +172,17 @@ class Apply extends React.Component {
157172
if (this.state.processStep === 3) {
158173
// TODO submit the form to backend
159174
const data = this._formData;
160-
this.setState({ 'processing' : true });
161-
Meteor.call("users.enroll", data, (error, result) => {
175+
this.setState({ processing: true });
176+
Meteor.call('users.enroll', data, (error, result) => {
162177
if (error) {
163-
this.setState({ 'error' : error.reason });
164-
this.setState({ 'processing' : false });
178+
this.setState({ error: error.reason });
179+
this.setState({ processing: false });
165180
}
166181
if (result) {
167-
this.setState({ 'processing' : false });
168-
this.props.history.push('/woohoo')
182+
this.setState({ processing: false });
183+
this.props.history.push('/woohoo');
169184
}
170185
});
171-
172186
} else {
173187
// Move to next form
174188
this.setState(state => ({ formValidated: false, processStep: state.processStep + 1 }));

imports/ui/components/board/board.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react';
2-
import { Link } from 'react-router-dom';
3-
import { Card, Collapse, Container, Row, Col } from 'react-bootstrap';
2+
import { Container } from 'react-bootstrap';
43
import Column from './column';
54
import '/imports/ui/styles/_board.scss';
65
import { categories } from '/lib/data/categories.js';
@@ -22,7 +21,6 @@ class Board extends React.Component {
2221
}
2322

2423
render() {
25-
const { loading } = this.props;
2624
// TODO - if loading is true show some nice loading animation!
2725
return <Container id="board">{this.getColumns()}</Container>;
2826
}

0 commit comments

Comments
 (0)