diff --git a/client/.eslintrc.yml b/client/.eslintrc.yml
index 2ca9c8510..168f7cd68 100644
--- a/client/.eslintrc.yml
+++ b/client/.eslintrc.yml
@@ -17,10 +17,13 @@ env:
rules:
import/extensions: [2, { js: "never", jsx: "never" }]
+ function-paren-newline: ["error", "consistent"]
# Good idea, but let's go to flow before fixing all these
react/forbid-prop-types: 0
- jsx-a11y/href-no-hash: 0
+ jsx-a11y/href-no-hash: 0
+
+ jsx-a11y/anchor-is-valid: off
# arrow-parens:
# - 0
diff --git a/client/app/bundles/comments/components/CommentBox/CommentBox.jsx b/client/app/bundles/comments/components/CommentBox/CommentBox.jsx
index edcb4cd14..7eb98ae36 100644
--- a/client/app/bundles/comments/components/CommentBox/CommentBox.jsx
+++ b/client/app/bundles/comments/components/CommentBox/CommentBox.jsx
@@ -92,9 +92,9 @@ class CommentBox extends BaseComponent {
-
{ (data.get('isFetching') &&
) ||
-
+
+
}
- {formatMessage(defaultMessages.descriptionSupportMarkdown)}
diff --git a/client/app/bundles/comments/components/CommentBox/CommentBox.scss b/client/app/bundles/comments/components/CommentBox/CommentBox.scss
index 8cfd2d069..e2cbaf676 100644
--- a/client/app/bundles/comments/components/CommentBox/CommentBox.scss
+++ b/client/app/bundles/comments/components/CommentBox/CommentBox.scss
@@ -15,3 +15,15 @@
transition: opacity 0.5s ease-in;
}
}
+
+.anchorButton {
+ color: #337ab7;
+ border: 0px;
+ background-color: transparent;
+ padding: 0;
+ cursor: pointer;
+}
+
+.anchorButton:hover {
+ text-decoration: underline;
+}
diff --git a/client/app/bundles/comments/components/CommentBox/CommentForm/CommentForm.jsx b/client/app/bundles/comments/components/CommentBox/CommentForm/CommentForm.jsx
index 12dd88dab..c79245b68 100644
--- a/client/app/bundles/comments/components/CommentBox/CommentForm/CommentForm.jsx
+++ b/client/app/bundles/comments/components/CommentBox/CommentForm/CommentForm.jsx
@@ -283,7 +283,7 @@ class CommentForm extends BaseComponent {
}
errorWarning() {
- const error = this.props.error;
+ const { error } = this.props;
// If there is no error, there is nothing to add to the DOM
if (!error) return null;
diff --git a/client/app/bundles/comments/components/CommentBox/CommentList/CommentList.jsx b/client/app/bundles/comments/components/CommentBox/CommentList/CommentList.jsx
index 399328c2f..904d4a083 100644
--- a/client/app/bundles/comments/components/CommentBox/CommentList/CommentList.jsx
+++ b/client/app/bundles/comments/components/CommentBox/CommentList/CommentList.jsx
@@ -45,8 +45,7 @@ export default class CommentList extends BaseComponent {
key={$$comment.get('id') || index}
author={$$comment.get('author')}
text={$$comment.get('text')}
- />),
- );
+ />));
// For animation with ReactCSSTransitionGroup
// https://facebook.github.io/react/docs/animation.html
diff --git a/client/app/bundles/comments/components/NavigationBar/NavigationBar.jsx b/client/app/bundles/comments/components/NavigationBar/NavigationBar.jsx
index 4e22ed33b..f42880e69 100644
--- a/client/app/bundles/comments/components/NavigationBar/NavigationBar.jsx
+++ b/client/app/bundles/comments/components/NavigationBar/NavigationBar.jsx
@@ -55,11 +55,7 @@ const NavigationBar = (props) => {
-
- Forum
+ Forum
{_.isNumber(commentsCount) && CommentsCount({ commentsCount })}
diff --git a/client/app/bundles/comments/reducers/commentsReducer.js b/client/app/bundles/comments/reducers/commentsReducer.js
index 0f1d6ec9d..221ca0acd 100644
--- a/client/app/bundles/comments/reducers/commentsReducer.js
+++ b/client/app/bundles/comments/reducers/commentsReducer.js
@@ -14,7 +14,9 @@ export const $$initialState = Immutable.fromJS({
});
export default function commentsReducer($$state = $$initialState, action = null) {
- const { type, comment, comments, error, locale } = action;
+ const {
+ type, comment, comments, error, locale,
+ } = action;
switch (type) {
case actionTypes.FETCH_COMMENTS_SUCCESS: {
diff --git a/client/package.json b/client/package.json
index 966505f67..b53ed402d 100644
--- a/client/package.json
+++ b/client/package.json
@@ -105,10 +105,10 @@
"chai": "^4.1.2",
"chai-immutable": "^1.6.0",
"eslint": "^4.11.0",
- "eslint-config-shakacode": "^15.0.0",
+ "eslint-config-shakacode": "^16.0.0",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-import": "^2.8.0",
- "eslint-plugin-jsx-a11y": "^5.1.1",
+ "eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.5.1",
"estraverse-fb": "^1.3.2",
"express": "^4.16.2",
diff --git a/client/server-express.js b/client/server-express.js
index 16b573eea..eda987d72 100644
--- a/client/server-express.js
+++ b/client/server-express.js
@@ -35,7 +35,7 @@ server.app.get('/comments.json', (_req, res) => {
});
server.app.post('/comments.json', (req, res) => {
- const comment = req.body.comment;
+ const { comment } = req.body;
comment.id = uuid.v4();
console.log('Processing comment: %j', comment);
diff --git a/client/yarn.lock b/client/yarn.lock
index 898ce97ea..55e732f2f 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -404,6 +404,14 @@ babel-cli@^6.26.0:
optionalDependencies:
chokidar "^1.6.1"
+babel-code-frame@7.0.0-beta.0:
+ version "7.0.0-beta.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-7.0.0-beta.0.tgz#418a7b5f3f7dc9a4670e61b1158b4c5661bec98d"
+ dependencies:
+ chalk "^2.0.0"
+ esutils "^2.0.2"
+ js-tokens "^3.0.0"
+
babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
@@ -436,14 +444,14 @@ babel-core@^6.26.0:
slash "^1.0.0"
source-map "^0.5.6"
-babel-eslint@^7.1.1:
- version "7.2.3"
- resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827"
+babel-eslint@8.0.1:
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.1.tgz#5d718be7a328625d006022eb293ed3008cbd6346"
dependencies:
- babel-code-frame "^6.22.0"
- babel-traverse "^6.23.1"
- babel-types "^6.23.0"
- babylon "^6.17.0"
+ babel-code-frame "7.0.0-beta.0"
+ babel-traverse "7.0.0-beta.0"
+ babel-types "7.0.0-beta.0"
+ babylon "7.0.0-beta.22"
babel-eslint@^8.0.2:
version "8.0.2"
@@ -526,6 +534,15 @@ babel-helper-explode-class@^6.24.1:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
+babel-helper-function-name@7.0.0-beta.0:
+ version "7.0.0-beta.0"
+ resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-7.0.0-beta.0.tgz#d1b6779b647e5c5c31ebeb05e13b998e4d352d56"
+ dependencies:
+ babel-helper-get-function-arity "7.0.0-beta.0"
+ babel-template "7.0.0-beta.0"
+ babel-traverse "7.0.0-beta.0"
+ babel-types "7.0.0-beta.0"
+
babel-helper-function-name@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
@@ -536,6 +553,12 @@ babel-helper-function-name@^6.24.1:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
+babel-helper-get-function-arity@7.0.0-beta.0:
+ version "7.0.0-beta.0"
+ resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-7.0.0-beta.0.tgz#9d1ab7213bb5efe1ef1638a8ea1489969b5a8b6e"
+ dependencies:
+ babel-types "7.0.0-beta.0"
+
babel-helper-get-function-arity@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d"
@@ -601,6 +624,10 @@ babel-loader@^7.1.2:
loader-utils "^1.0.2"
mkdirp "^0.5.1"
+babel-messages@7.0.0-beta.0:
+ version "7.0.0-beta.0"
+ resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-7.0.0-beta.0.tgz#6df01296e49fc8fbd0637394326a167f36da817b"
+
babel-messages@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
@@ -1017,6 +1044,15 @@ babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runti
core-js "^2.4.0"
regenerator-runtime "^0.11.0"
+babel-template@7.0.0-beta.0:
+ version "7.0.0-beta.0"
+ resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-7.0.0-beta.0.tgz#85083cf9e4395d5e48bf5154d7a8d6991cafecfb"
+ dependencies:
+ babel-traverse "7.0.0-beta.0"
+ babel-types "7.0.0-beta.0"
+ babylon "7.0.0-beta.22"
+ lodash "^4.2.0"
+
babel-template@^6.24.1, babel-template@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
@@ -1027,7 +1063,21 @@ babel-template@^6.24.1, babel-template@^6.26.0:
babylon "^6.18.0"
lodash "^4.17.4"
-babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.26.0:
+babel-traverse@7.0.0-beta.0:
+ version "7.0.0-beta.0"
+ resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-7.0.0-beta.0.tgz#da14be9b762f62a2f060db464eaafdd8cd072a41"
+ dependencies:
+ babel-code-frame "7.0.0-beta.0"
+ babel-helper-function-name "7.0.0-beta.0"
+ babel-messages "7.0.0-beta.0"
+ babel-types "7.0.0-beta.0"
+ babylon "7.0.0-beta.22"
+ debug "^3.0.1"
+ globals "^10.0.0"
+ invariant "^2.2.0"
+ lodash "^4.2.0"
+
+babel-traverse@^6.24.1, babel-traverse@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
dependencies:
@@ -1041,7 +1091,15 @@ babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.26.0:
invariant "^2.2.2"
lodash "^4.17.4"
-babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26.0:
+babel-types@7.0.0-beta.0:
+ version "7.0.0-beta.0"
+ resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-7.0.0-beta.0.tgz#eb8b6e556470e6dcc4aef982d79ad229469b5169"
+ dependencies:
+ esutils "^2.0.2"
+ lodash "^4.2.0"
+ to-fast-properties "^2.0.0"
+
+babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
dependencies:
@@ -1050,11 +1108,15 @@ babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26
lodash "^4.17.4"
to-fast-properties "^1.0.3"
+babylon@7.0.0-beta.22:
+ version "7.0.0-beta.22"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.22.tgz#74f0ad82ed7c7c3cfeab74cf684f815104161b65"
+
babylon@7.0.0-beta.32, babylon@^7.0.0-beta.31:
version "7.0.0-beta.32"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.32.tgz#e9033cb077f64d6895f4125968b37dc0a8c3bc6e"
-babylon@^6.17.0, babylon@^6.18.0:
+babylon@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
@@ -1329,12 +1391,12 @@ caniuse-api@^1.5.2:
lodash.uniq "^4.5.0"
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
- version "1.0.30000772"
- resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000772.tgz#51aae891768286eade4a3d8319ea76d6a01b512b"
+ version "1.0.30000775"
+ resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000775.tgz#04bccdd0214edf25b97f61a096609f7ad6904333"
caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000770:
- version "1.0.30000772"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000772.tgz#78129622cabfed7af1ff38b64ab680a6a0865420"
+ version "1.0.30000775"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000775.tgz#74d27feddc47f3c84cfbcb130c3092a35ebc2de2"
caseless@~0.11.0:
version "0.11.0"
@@ -1551,8 +1613,8 @@ commander@2.8.x:
graceful-readlink ">= 1.0.0"
commander@^2.11.0, commander@^2.9.0:
- version "2.12.1"
- resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.1.tgz#468635c4168d06145b9323356d1da84d14ac4a7a"
+ version "2.12.2"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555"
commondir@^1.0.1:
version "1.0.1"
@@ -2216,24 +2278,24 @@ escope@^3.6.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"
-eslint-config-airbnb-base@^11.3.0:
- version "11.3.2"
- resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.2.tgz#8703b11abe3c88ac7ec2b745b7fdf52e00ae680a"
+eslint-config-airbnb-base@^12.1.0:
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-12.1.0.tgz#386441e54a12ccd957b0a92564a4bafebd747944"
dependencies:
eslint-restricted-globals "^0.1.1"
-eslint-config-airbnb@^15.0.1:
- version "15.1.0"
- resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.1.0.tgz#fd432965a906e30139001ba830f58f73aeddae8e"
+eslint-config-airbnb@16.1.0:
+ version "16.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-16.1.0.tgz#2546bfb02cc9fe92284bf1723ccf2e87bc45ca46"
dependencies:
- eslint-config-airbnb-base "^11.3.0"
+ eslint-config-airbnb-base "^12.1.0"
-eslint-config-shakacode@^15.0.0:
- version "15.0.0"
- resolved "https://registry.yarnpkg.com/eslint-config-shakacode/-/eslint-config-shakacode-15.0.0.tgz#186a6dd3b4e103aa5faaec8e771f865a10a6e55a"
+eslint-config-shakacode@^16.0.0:
+ version "16.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-shakacode/-/eslint-config-shakacode-16.0.0.tgz#6d2ab616dfa0a0427ef8c99944a33bbd6f647fb3"
dependencies:
- babel-eslint "^7.1.1"
- eslint-config-airbnb "^15.0.1"
+ babel-eslint "8.0.1"
+ eslint-config-airbnb "16.1.0"
eslint-import-resolver-node@^0.3.1:
version "0.3.1"
@@ -2280,9 +2342,9 @@ eslint-plugin-import@^2.8.0:
minimatch "^3.0.3"
read-pkg-up "^2.0.0"
-eslint-plugin-jsx-a11y@^5.1.1:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz#5c96bb5186ca14e94db1095ff59b3e2bd94069b1"
+eslint-plugin-jsx-a11y@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.2.tgz#659277a758b036c305a7e4a13057c301cd3be73f"
dependencies:
aria-query "^0.7.0"
array-includes "^3.0.3"
@@ -2313,8 +2375,8 @@ eslint-scope@^3.7.1:
estraverse "^4.1.1"
eslint@^4.11.0:
- version "4.12.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.12.0.tgz#a7ce78eba8cc8f2443acfbbc870cc31a65135884"
+ version "4.12.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.12.1.tgz#5ec1973822b4a066b353770c3c6d69a2a188e880"
dependencies:
ajv "^5.3.0"
babel-code-frame "^6.22.0"
@@ -3237,8 +3299,8 @@ internal-ip@1.2.0:
meow "^3.3.0"
interpret@^1.0.0:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0"
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
intl-format-cache@^2.0.5:
version "2.1.0"
@@ -5215,8 +5277,8 @@ react-deep-force-update@^1.0.0:
resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.1.tgz#bcd31478027b64b3339f108921ab520b4313dc2c"
react-dom@^16.1.1:
- version "16.1.1"
- resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.1.1.tgz#b2e331b6d752faf1a2d31399969399a41d8d45f8"
+ version "16.2.0"
+ resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.2.0.tgz#69003178601c0ca19b709b33a83369fe6124c044"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
@@ -5309,8 +5371,8 @@ react-transition-group@^1.2.0:
warning "^3.0.0"
react@^16.1.1:
- version "16.1.1"
- resolved "https://registry.yarnpkg.com/react/-/react-16.1.1.tgz#d5c4ef795507e3012282dd51261ff9c0e824fe1f"
+ version "16.2.0"
+ resolved "https://registry.yarnpkg.com/react/-/react-16.2.0.tgz#a31bd2dab89bff65d42134fa187f24d054c273ba"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
@@ -6135,8 +6197,8 @@ svgo@^0.7.0:
whet.extend "~0.9.9"
symbol-observable@^1.0.3:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.1.0.tgz#5c68fd8d54115d9dfb72a84720549222e8db9b32"
symbol-tree@^3.2.1:
version "3.2.2"