Skip to content

Commit

Permalink
lint server
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainlap committed Feb 22, 2016
1 parent 122893c commit 42ebc7d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "cross-env NODE_ENV=production webpack --config webpack.config.prod.js && npm run minify",
"clean": "rimraf static/dist",
"slate": "rimraf node_modules && npm install",
"lint": "eslint shared client"
"lint": "eslint client server shared"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ const config = {
port: process.env.PORT || 8000,
};

export default config;
export default config;
2 changes: 1 addition & 1 deletion server/dummyData.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function () {
const post1 = new Post({ name: 'Admin', title: 'Hello MERN', slug: 'hello-mern', cuid: 'cikqgkv4q01ck7453ualdn3hd', content: content1 });
const post2 = new Post({ name: 'Admin', title: 'Lorem Ipsum', slug: 'lorem-ipsum', cuid: 'cikqgkv4q01ck7453ualdn3hf', content: content2 });

Post.create([post1, post2], (error, saved) => {
Post.create([post1, post2], (error) => {
if (!error) {
// console.log('ready to go....');
}
Expand Down
2 changes: 1 addition & 1 deletion server/models/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const postSchema = new Schema({
dateAdded: { type: 'Date', default: Date.now, required: true },
});

export default mongoose.model('Post', postSchema);
export default mongoose.model('Post', postSchema);
4 changes: 2 additions & 2 deletions server/routes/post.routes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Express from 'express';
import * as PostController from '../controllers/post.controller';
const router = Express.Router();
const router = Express.Router(); // eslint-disable-line new-cap

// Get all Posts
router.route('/getPosts').get(PostController.getPosts);
Expand All @@ -14,4 +14,4 @@ router.route('/addPost').post(PostController.addPost);
// Delete a Post
router.route('/deletePost').post(PostController.deletePost);

export default router;
export default router;
4 changes: 2 additions & 2 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import dummyData from './dummyData';
import serverConfig from './config';

// MongoDB Connection
mongoose.connect(serverConfig.mongoURL, (error, connection) => {
mongoose.connect(serverConfig.mongoURL, (error) => {
if (error) {
console.error('Please make sure Mongodb is installed and running!')
console.error('Please make sure Mongodb is installed and running!'); // eslint-disable-line no-console
throw error;
}

Expand Down

0 comments on commit 42ebc7d

Please sign in to comment.