From 908bbc117ff4c68bf489860fc70adeb7db590a79 Mon Sep 17 00:00:00 2001 From: Mohamed El Mahallawy Date: Thu, 20 Apr 2017 01:41:59 -0700 Subject: [PATCH] Release v3.0.2 (#757) * Add prettier (#754) * add prettier * ensure prettier works * Quick deploy changes (#755) * Center reading mode * Fixes #742 loading component * Fixes #704 contact us to zendesk * Fix sitemap * Fix overflow and default reciter --- .eslintrc | 5 + package.json | 24 ++- src/components/ComponentLoader/index.js | 2 +- src/components/Footer/index.js | 4 +- src/components/Verse/style.scss | 4 +- src/redux/actions/audioplayer.js | 2 +- src/redux/modules/options.js | 4 +- src/server.js | 67 +++--- src/server/config/sitemap.js | 9 +- yarn.lock | 270 ++++++++++++++++++++++-- 10 files changed, 316 insertions(+), 75 deletions(-) diff --git a/.eslintrc b/.eslintrc index 58b1abbaf..e9c306bef 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,8 +5,11 @@ "comma-dangle": 0, "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], "import/no-extraneous-dependencies": 0, + "import/prefer-default-export": 1, "import/extensions": 0, "import/no-unresolved": 0, + "property": 0, + "no-mixed-operators": 0, "strict": 0 }, "ecmaFeatures": { @@ -38,7 +41,9 @@ mixpanel: true, "expect": true, "browser": true, + "import": true, "FB": true, + "window": true, sinon: true }, "env": { diff --git a/package.json b/package.json index 044377b8e..283478744 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,21 @@ "build:client": "webpack --config ./webpack/prod.config.js", "validate": "npm ls", "analyze:build": "env NODE_ENV=production webpack --json --config ./webpack/prod.config.js > bundle-stats.json", - "analyze:json": "webpack-bundle-size-analyzer bundle-stats.json" + "analyze:json": "webpack-bundle-size-analyzer bundle-stats.json", + "lint:fix": "npm run test:dev:lint -- --fix", + "prettier": "prettier --single-quote --write", + "precommit": "lint-staged" + }, + "pre-commit": [ + "test:stylelint", + "precommit" + ], + "lint-staged": { + "*.js": [ + "npm run prettier", + "npm run lint:fix", + "git add" + ] }, "engines": { "node": ">= 6.3.0" @@ -158,6 +172,7 @@ "karma-sinon": "1.0.4", "karma-sourcemap-loader": "0.3.7", "karma-webpack": "1.8.0", + "lint-staged": "^3.4.0", "mocha": "2.2.5", "nodemon": "1.7.1", "path": "0.11.14", @@ -165,6 +180,7 @@ "phantomjs-polyfill": "0.0.1", "piping": "0.3.0", "pre-commit": "1.1.3", + "prettier": "^1.2.2", "react-addons-test-utils": "15.4.1", "react-transform-catch-errors": "1.0.0", "react-transform-hmr": "1.0.1", @@ -179,9 +195,5 @@ "webpack-bundle-analyzer": "2.2.1", "webpack-dev-server": "2.1.0-beta.0", "webpack-hot-middleware": "2.12.2" - }, - "pre-commit": [ - "test:dev:lint", - "test:stylelint" - ] + } } diff --git a/src/components/ComponentLoader/index.js b/src/components/ComponentLoader/index.js index f41fe4f9b..8adb23c1b 100644 --- a/src/components/ComponentLoader/index.js +++ b/src/components/ComponentLoader/index.js @@ -2,7 +2,7 @@ import React, { PropTypes } from 'react'; const ComponentLoader = ({ isLoading, error, pastDelay }) => { if (isLoading) { - return pastDelay ?
Loading...
: null; + return pastDelay ?