ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit 9127774301ad560e9f67f90f05f02c4e0c8997ee
parent db8831cc34859ff5de1a0e91b70c3b6a6848b9a2
Author: Vladimir Kutepov <frenzzy.man@gmail.com>
Date:   Thu, 26 Nov 2015 18:42:08 +0300

Fix ESLint warnings

- Update ESLint version to fix `Unexpected space before function parentheses`
- Add brackets around `await` to it `Missing space before keyword "await"`
- Remove second blank lines to fix `Too many blank lines at the end of file. Max of 1 allowed`

Diffstat:
Mpackage.json | 8++++----
Msrc/api/content.js | 5++---
Mtools/build.js | 1-
3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/package.json b/package.json @@ -27,17 +27,17 @@ "assets-webpack-plugin": "^3.2.0", "autoprefixer": "^6.1.0", "babel": "^5.8.34", - "babel-eslint": "^4.1.4", + "babel-eslint": "^4.1.6", "babel-loader": "^5.3.3", "babel-plugin-react-transform": "^1.1.1", "browser-sync": "^2.9.12", "css-loader": "^0.23.0", "csscomb": "^3.1.8", "del": "^2.0.2", - "eslint": "^1.8.0", - "eslint-config-airbnb": "1.0.0", + "eslint": "^1.10.1", + "eslint-config-airbnb": "^1.0.2", "eslint-loader": "^1.1.1", - "eslint-plugin-react": "^3.7.1", + "eslint-plugin-react": "^3.10.0", "file-loader": "^0.8.4", "gaze": "^0.5.2", "git-repository": "^0.1.1", diff --git a/src/api/content.js b/src/api/content.js @@ -34,11 +34,11 @@ router.get('/', async (req, res, next) => { } let fileName = join(CONTENT_DIR, (path === '/' ? '/index' : path) + '.jade'); - if (!await fileExists(fileName)) { + if (!(await fileExists(fileName))) { fileName = join(CONTENT_DIR, path + '/index.jade'); } - if (!await fileExists(fileName)) { + if (!(await fileExists(fileName))) { res.status(404).send({error: `The page '${path}' is not found.`}); } else { const source = await readFile(fileName, { encoding: 'utf8' }); @@ -51,4 +51,3 @@ router.get('/', async (req, res, next) => { }); export default router; - diff --git a/tools/build.js b/tools/build.js @@ -20,4 +20,3 @@ async function build() { } export default build; -