-
Notifications
You must be signed in to change notification settings - Fork 4
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
React add books api #51
Conversation
[COMPLETED] refactor server test, travis, codeclimate and coveralls
update eslint config files
@@ -346,11 +346,12 @@ body.modal-open { | |||
background-color: rgba(255, 255, 255, 0.17); | |||
} | |||
|
|||
#bookList .book a{ | |||
#bookList .book .actions{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using id selectors
Line should be indented 0 spaces, but was indented 2 spaces
Merge rule #bookList .book .actions
with rule on line 37
Selector should have depth of applicability no greater than 2, but was 3
Selector bookList
should be written in lowercase with hyphens
Opening curly brace {
should be preceded by one space
width: 100%; | ||
font-size: 1.2em; | ||
margin-top: 37px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files should end with a trailing newline
} | ||
|
||
.rdtMilli input { | ||
width: 100%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Properties should be ordered font-size, margin-top, width
width: 48px; | ||
} | ||
|
||
.rdtMilli input { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line should be indented 0 spaces, but was indented 2 spaces
Merge rule .rdtMilli input
with rule on line 199
Selector rdtMilli
should be written in lowercase with hyphens
padding-left: 8px; | ||
width: 48px; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains trailing whitespace
user-select: none; | ||
} | ||
.rdtCounter .rdtBtn:hover { | ||
background: #eee; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Color literals like #eee
should only be used in variable declarations; they should be referred to via variable everywhere else.
-ms-user-select: none; /* Internet Explorer/Edge */ | ||
user-select: none; | ||
} | ||
.rdtCounter .rdtBtn:hover { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line should be indented 0 spaces, but was indented 2 spaces
Merge rule .rdtCounter .rdtBtn:hover
with rule on line 166
Selector rdtCounter
should be written in lowercase with hyphens
Selector rdtBtn
should be written in lowercase with hyphens
-moz-user-select: none; /* Firefox */ | ||
-ms-user-select: none; /* Internet Explorer/Edge */ | ||
user-select: none; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rule declaration should be followed by an empty line
-webkit-user-select: none; /* Chrome/Safari/Opera */ | ||
-khtml-user-select: none; /* Konqueror */ | ||
-moz-user-select: none; /* Firefox */ | ||
-ms-user-select: none; /* Internet Explorer/Edge */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid vendor prefixes.
Use //
comments everywhere
-webkit-touch-callout: none; /* iOS Safari */ | ||
-webkit-user-select: none; /* Chrome/Safari/Opera */ | ||
-khtml-user-select: none; /* Konqueror */ | ||
-moz-user-select: none; /* Firefox */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid vendor prefixes.
Use //
comments everywhere
@@ -20,6 +25,10 @@ app.use((req, res, next) => { | |||
} else { | |||
App(app); | |||
} | |||
// else if (docsPath[0] !== '') { | |||
// Docs(app); | |||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces not allowed no-trailing-spaces
@@ -1,13 +1,18 @@ | |||
import express from 'express'; | |||
import fs from 'fs'; | |||
import path from 'path'; | |||
import dotEnv from 'dotenv'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unable to resolve path to module 'dotenv' import/no-unresolved
Missing file extension for "dotenv" import/extensions
console.log('you are me', '========'); | ||
// Initialize the Swagger middleware | ||
swaggerTools.initializeMiddleware(swaggerDoc, (middleware) => { | ||
// Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 22 exceeds the maximum line length of 100 max-len
// The Swagger document (require it, build it programmatically, fetch it from a URL, ...) | ||
const spec = fs.readFileSync(path.join(__dirname, './api/swagger.yaml'), 'utf8'); | ||
const swaggerDoc = jsyaml.safeLoad(spec); | ||
console.log('you are me', '========'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement no-console
import jsyaml from 'js-yaml'; | ||
import fs from 'fs'; | ||
|
||
const serverPort = 8080; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'serverPort' is assigned a value but never used no-unused-vars
res.end(); | ||
} | ||
|
||
exports.getBorrowedBook = function(args, res, next) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected unnamed function func-names
Missing space before function parentheses space-before-function-paren
'next' is defined but never used no-unused-vars
**/ | ||
// no response value expected for this operation | ||
res.end(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon semi
@@ -0,0 +1,37 @@ | |||
'use strict'; | |||
|
|||
exports.borrowBook = function(args, res, next) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected unnamed function func-names
Missing space before function parentheses space-before-function-paren
'next' is defined but never used no-unused-vars
@@ -0,0 +1,37 @@ | |||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'use strict' is unnecessary inside of modules strict
UserBookActions.getBorrowedBook(req.swagger.params, res, next); | ||
}; | ||
|
||
module.exports.returnBorrowedBook = function returnBorrowedBook (req, res, next) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected space before function parentheses space-before-function-paren
No description provided.