From f4045ba3d962105ae4a7c0ee785a83c678ca2f8a Mon Sep 17 00:00:00 2001 From: Zac Anger Date: Sat, 15 Apr 2017 05:27:27 -0600 Subject: Add eslint-plugin-jsx-a11y (#1651) * Add eslint-plugin-jsx-a11y. * Fix npm script. * Adjust npm scripts so test also runs lint. * Fix existing lint errors. * Don't break on a11y issues. * Add role and tabIndex. * Add vim and Mac files to .gitignore and .dockerignore. * Handle htmlFor (partially), a that's actually a button. * Fix missing tabIndex. * Add cursor:pointer to load-more * Revert change to load_more. * Fixes based on review. * Update yarn.lock. * Don't try to install fsevents on Linux (hides warning noise). --- .../javascripts/components/reducers/alerts.jsx | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'app/assets/javascripts/components/reducers/alerts.jsx') diff --git a/app/assets/javascripts/components/reducers/alerts.jsx b/app/assets/javascripts/components/reducers/alerts.jsx index 42987f649..dc0145824 100644 --- a/app/assets/javascripts/components/reducers/alerts.jsx +++ b/app/assets/javascripts/components/reducers/alerts.jsx @@ -9,17 +9,17 @@ const initialState = Immutable.List([]); export default function alerts(state = initialState, action) { switch(action.type) { - case ALERT_SHOW: - return state.push(Immutable.Map({ - key: state.size > 0 ? state.last().get('key') + 1 : 0, - title: action.title, - message: action.message - })); - case ALERT_DISMISS: - return state.filterNot(item => item.get('key') === action.alert.key); - case ALERT_CLEAR: - return state.clear(); - default: - return state; + case ALERT_SHOW: + return state.push(Immutable.Map({ + key: state.size > 0 ? state.last().get('key') + 1 : 0, + title: action.title, + message: action.message + })); + case ALERT_DISMISS: + return state.filterNot(item => item.get('key') === action.alert.key); + case ALERT_CLEAR: + return state.clear(); + default: + return state; } }; -- cgit