From 4c92a1c1e35402730f74cf24a0c71729f4d0a676 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 22 Feb 2016 08:31:10 -0500 Subject: Updating some client deps + eslint --- web/react/.eslintrc | 204 ------------------- web/react/.eslintrc.json | 226 +++++++++++++++++++++ web/react/components/access_history_modal.jsx | 2 +- web/react/components/activity_log_modal.jsx | 4 +- .../components/admin_console/admin_controller.jsx | 36 ++-- .../components/admin_console/admin_sidebar.jsx | 2 +- .../admin_console/admin_sidebar_header.jsx | 2 +- web/react/components/admin_console/audits.jsx | 2 +- web/react/components/admin_console/logs.jsx | 4 +- .../components/admin_console/statistic_count.jsx | 4 - web/react/components/admin_console/team_users.jsx | 5 +- web/react/components/audit_table.jsx | 3 - web/react/components/authorize.jsx | 4 +- web/react/components/center_panel.jsx | 10 +- web/react/components/channel_header.jsx | 4 +- web/react/components/channel_invite_modal.jsx | 2 +- web/react/components/channel_members_modal.jsx | 2 +- .../components/channel_notifications_modal.jsx | 20 +- web/react/components/channel_view.jsx | 5 +- web/react/components/create_post.jsx | 2 +- web/react/components/delete_post_modal.jsx | 4 +- web/react/components/edit_post_modal.jsx | 4 +- web/react/components/email_verify.jsx | 2 +- web/react/components/file_attachment.jsx | 6 +- web/react/components/file_info_preview.jsx | 9 +- web/react/components/file_upload.jsx | 2 +- web/react/components/get_link_modal.jsx | 4 +- web/react/components/invite_member_modal.jsx | 2 +- web/react/components/login.jsx | 6 +- web/react/components/member_list.jsx | 4 - web/react/components/member_list_item.jsx | 2 +- web/react/components/more_channels.jsx | 2 +- web/react/components/navbar.jsx | 6 +- web/react/components/post_attachment_list.jsx | 4 - web/react/components/post_attachment_oembed.jsx | 1 + .../components/post_body_additional_content.jsx | 2 +- web/react/components/post_header.jsx | 2 +- web/react/components/posts_view.jsx | 23 ++- web/react/components/posts_view_container.jsx | 4 +- web/react/components/rhs_comment.jsx | 2 +- web/react/components/rhs_root_post.jsx | 2 +- web/react/components/rhs_thread.jsx | 4 +- web/react/components/search_bar.jsx | 2 +- web/react/components/search_results.jsx | 4 +- web/react/components/search_results_item.jsx | 4 +- web/react/components/setting_item_max.jsx | 2 +- web/react/components/settings_sidebar.jsx | 2 +- web/react/components/sidebar_right.jsx | 3 +- web/react/components/signup_team.jsx | 8 +- web/react/components/signup_team_confirm.jsx | 4 - web/react/components/signup_user_complete.jsx | 4 +- .../components/suggestion/at_mention_provider.jsx | 4 +- web/react/components/suggestion/suggestion_box.jsx | 2 +- web/react/components/team_export_tab.jsx | 6 +- web/react/components/team_import_tab.jsx | 4 +- web/react/components/team_members_modal.jsx | 2 +- web/react/components/team_settings.jsx | 2 +- web/react/components/team_signup_choose_auth.jsx | 6 +- .../components/team_signup_send_invites_page.jsx | 2 +- web/react/components/team_signup_welcome_page.jsx | 4 +- web/react/components/time_since.jsx | 5 +- web/react/components/toggle_modal_button.jsx | 2 +- .../components/tutorial/tutorial_intro_screens.jsx | 1 + web/react/components/unread_channel_indicator.jsx | 3 - .../user_settings/user_settings_integrations.jsx | 6 +- .../user_settings/user_settings_modal.jsx | 10 +- .../user_settings/user_settings_notifications.jsx | 4 +- web/react/components/view_image.jsx | 18 +- web/react/components/view_image_popover_bar.jsx | 3 - web/react/components/youtube_video.jsx | 1 + web/react/package.json | 24 +-- web/react/pages/admin_console.jsx | 4 +- web/react/pages/authorize.jsx | 3 +- web/react/pages/channel.jsx | 25 ++- web/react/pages/claim_account.jsx | 2 +- web/react/pages/docs.jsx | 4 +- web/react/pages/find_team.jsx | 4 +- web/react/pages/login.jsx | 2 +- web/react/pages/password_reset.jsx | 2 +- web/react/pages/signup_team.jsx | 2 +- web/react/pages/signup_team_complete.jsx | 2 +- web/react/pages/signup_team_confirm.jsx | 2 +- web/react/pages/signup_user_complete.jsx | 2 +- web/react/pages/verify.jsx | 2 +- web/react/stores/modal_store.jsx | 2 +- web/react/stores/suggestion_store.jsx | 2 +- web/react/utils/channel_intro_messages.jsx | 3 +- web/react/utils/client.jsx | 2 +- web/react/utils/emoticons.jsx | 2 +- web/react/utils/utils.jsx | 6 +- 90 files changed, 449 insertions(+), 406 deletions(-) delete mode 100644 web/react/.eslintrc create mode 100644 web/react/.eslintrc.json (limited to 'web/react') diff --git a/web/react/.eslintrc b/web/react/.eslintrc deleted file mode 100644 index 013175567..000000000 --- a/web/react/.eslintrc +++ /dev/null @@ -1,204 +0,0 @@ -{ - "extends": "eslint:recommended", - "ecmaFeatures": { - "jsx": true, - "blockBindings": true, - "modules": true, - "classes": true, - "arrowFunctions": true, - "defaultParams": true - }, - "parser": "babel-eslint", - "plugins": [ - "react" - ], - "env": { - "browser": true, - "node": true, - "jquery": true, - "es6": true - }, - "globals": { - "React": false, - "ReactDOM": false, - "ReactBootstrap": false, - "ReactIntl": false, - "ReactIntlLocaleData": false, - "Chart": false, - "katex": false - }, - "rules": { - "comma-dangle": [2, "never"], - "no-arrow-condition": 2, - "no-case-declarations": 2, - "no-cond-assign": [2, "except-parens"], - "no-console": 2, - "no-constant-condition": 2, - "no-debugger": 2, - "no-dupe-args": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty": 2, - "no-empty-pattern": 2, - "no-ex-assign": 2, - "no-extra-semi": 2, - "no-fallthrough": 2, - "no-func-assign": 2, - "no-inner-declarations": 0, - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-unexpected-multiline": 2, - "no-unreachable": 2, - "no-magic-numbers": [1, { "ignore": [-1, 0, 1, 2], "enforceConst": true, "detectObjects": true } ], - "valid-typeof": 2, - - "block-scoped-var": 2, - "complexity": [0, 8], - "consistent-return": 2, - "curly": [2, "all"], - "dot-location": [2, "object"], - "dot-notation": 2, - "eqeqeq": [2, "smart"], - "global-require": 2, - "guard-for-in": 2, - "no-alert": 2, - "no-array-constructor": 2, - "no-caller": 2, - "no-div-regex": 2, - "no-else-return": 2, - "no-eval": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-floating-decimal": 2, - "no-implied-eval": 2, - "no-iterator": 2, - "no-labels": 2, - "no-lone-blocks": 2, - "no-loop-func": 2, - "no-multi-spaces": [2, { "exceptions": { "Property": false } }], - "no-multi-str": 0, - "no-native-reassign": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-wrappers": 2, - "no-octal-escape": 2, - "no-param-reassign": 2, - "no-process-env": 2, - "no-process-exit": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-return-assign": [2, "always"], - "no-script-url": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-throw-literal": 2, - "no-undef-init": 2, - "no-unused-expressions": 2, - "no-useless-concat": 1, - "no-void": 2, - "no-warning-comments": 1, - "no-with": 2, - "radix": 2, - "vars-on-top": 0, - "wrap-iife": [2, "outside"], - "yoda": [2, "never", {"exceptRange": false, "onlyEquality": false}], - - "no-undefined": 2, - "no-shadow": [2, {"hoist": "functions"}], - "no-shadow-restricted-names": 2, - "no-unused-vars": [2, {"vars": "all", "args": "after-used"}], - "no-use-before-define": [2, "nofunc"], - - // Style - "array-bracket-spacing": [2, "never"], - "brace-style": [2, "1tbs", { "allowSingleLine": false }], - "camelcase": [2, {"properties": "never"}], - "comma-spacing": [2, {"before": false, "after": true}], - "comma-style": [2, "last"], - "computed-property-spacing": [2, "never"], - "consistent-this": [2, "self"], - "func-names": 2, - "func-style": [2, "declaration"], - "indent": [2, 4, {"SwitchCase": 0}], - "jsx-quotes": [2, "prefer-single"], - "key-spacing": [2, {"beforeColon": false, "afterColon": true}], - "linebreak-style": 2, - "lines-around-comment": [2, { "beforeBlockComment": true, "beforeLineComment": true, "allowBlockStart": true, "allowBlockEnd": true }], - "new-cap": 2, - "new-parens": 2, - "no-lonely-if": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multiple-empty-lines": [2, {"max": 1}], - "no-negated-condition": 2, - "no-nested-ternary": 2, - "no-spaced-func": 2, - "no-ternary": 0, - "no-trailing-spaces": [2, { "skipBlankLines": false }], - "no-underscore-dangle": 2, - "no-unneeded-ternary": [2, {"defaultAssignment": false}], - "object-curly-spacing": [2, "never"], - "one-var": [2, "never"], - "operator-linebreak": [2, "after"], - "padded-blocks": [2, "never"], - "quote-props": [2, "as-needed"], - "quotes": [2, "single", "avoid-escape"], - "semi": [2, "always"], - "semi-spacing": [2, {"before": false, "after": true}], - "space-after-keywords": [2, "always"], - "space-before-blocks": [2, "always"], - "space-before-function-paren": [2, "never"], - "space-before-keywords": [2, "always"], - "space-in-parens": [2, "never"], - "space-infix-ops": 2, - "space-return-throw-case": 2, - "space-unary-ops": [2, { "words": true, "nonwords": false }], - "wrap-regex": 2, - - // ES6 stuff - "arrow-parens": [2, "always"], - "arrow-body-style": 0, - "arrow-spacing": [2, { "before": true, "after": true }], - "constructor-super": 2, - "generator-star-spacing": [2, {"before": false, "after": true}], - "no-class-assign": 2, - "no-const-assign": 2, - "no-dupe-class-members": 2, - "no-this-before-super": 2, - "no-var": 0, - "object-shorthand": [1, "always"], - "prefer-arrow-callback": 1, - "prefer-const": 1, - "prefer-spread": 2, - "prefer-reflect": 1, - "prefer-template": 0, - "require-yield": 2, - - // React Specific - "react/display-name": [2, { "acceptTranspilerName": true }], - "react/jsx-boolean-value": [2, "always"], - "react/jsx-closing-bracket-location": [2, { "location": "tag-aligned" }], - "react/jsx-curly-spacing": [2, "never"], - "react/jsx-indent-props": [2, 4], - "react/jsx-key": 2, - "react/jsx-max-props-per-line": [2, { "maximum": 1 }], - "react/jsx-no-bind": 1, - "react/jsx-no-duplicate-props": [2, { "ignoreCase": false }], - "react/jsx-no-literals": 1, - "react/jsx-no-undef": 2, - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, - "react/no-danger": 0, - "react/no-did-mount-set-state": 2, - "react/no-did-update-set-state": 2, - "react/no-direct-mutation-state": 2, - "react/no-multi-comp": [2, { "ignoreStateless": true }], - "react/no-set-state": 0, - "react/no-unknown-property": 2, - "react/prefer-es6-class": 2, - "react/prop-types": 2, - "react/self-closing-comp": 2, - "react/sort-comp": 0, - "react/wrap-multilines": 2 - } -} diff --git a/web/react/.eslintrc.json b/web/react/.eslintrc.json new file mode 100644 index 000000000..51345113b --- /dev/null +++ b/web/react/.eslintrc.json @@ -0,0 +1,226 @@ +{ + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true, + "impliedStrict": true, + "modules": true + } + }, + "parser": "babel-eslint", + "plugins": [ + "react" + ], + "env": { + "browser": true, + "node": true, + "jquery": true, + "es6": true + }, + "globals": { + "React": false, + "ReactDOM": false, + "ReactBootstrap": false, + "ReactIntl": false, + "ReactIntlLocaleData": false, + "Chart": false, + "katex": false + }, + "rules": { + "comma-dangle": [2, "never"], + "array-callback-return": 2, + "prefer-rest-params": 2, + "no-unmodified-loop-condition": 2, + "sort-imports": 0, + "no-new-symbol": 2, + "no-empty-function": 2, + "no-whitespace-before-property": 2, + "no-useless-constructor": 2, + "id-blacklist": 0, + "one-var-declaration-per-line": 0, + "no-extra-label": 2, + "template-curly-spacing": [2, "never"], + "no-self-assign": 2, + "newline-per-chained-call": 0, + "no-confusing-arrow": 2, + "no-case-declarations": 2, + "no-cond-assign": [2, "except-parens"], + "no-console": 2, + "no-constant-condition": 2, + "no-debugger": 2, + "no-dupe-args": 2, + "no-dupe-keys": 2, + "no-duplicate-case": 2, + "no-empty": 2, + "no-empty-pattern": 2, + "no-ex-assign": 2, + "no-extra-semi": 2, + "no-fallthrough": 2, + "no-func-assign": 2, + "no-inner-declarations": 0, + "no-invalid-regexp": 2, + "no-irregular-whitespace": 2, + "no-unexpected-multiline": 2, + "no-unreachable": 2, + "no-magic-numbers": [1, { "ignore": [-1, 0, 1, 2], "enforceConst": true, "detectObjects": true } ], + "valid-typeof": 2, + + "block-scoped-var": 2, + "complexity": [0, 8], + "consistent-return": 2, + "curly": [2, "all"], + "dot-location": [2, "object"], + "dot-notation": 2, + "eqeqeq": [2, "smart"], + "global-require": 2, + "guard-for-in": 2, + "no-alert": 2, + "no-array-constructor": 2, + "no-caller": 2, + "no-div-regex": 2, + "no-else-return": 2, + "no-eval": 2, + "no-extend-native": 2, + "no-extra-bind": 2, + "no-floating-decimal": 2, + "no-implied-eval": 2, + "no-implicit-globals": 0, + "no-iterator": 2, + "no-labels": 2, + "no-lone-blocks": 2, + "no-loop-func": 2, + "no-multi-spaces": [2, { "exceptions": { "Property": false } }], + "no-multi-str": 0, + "no-native-reassign": 2, + "no-new": 2, + "no-new-func": 2, + "no-new-object": 2, + "no-new-wrappers": 2, + "no-octal-escape": 2, + "no-param-reassign": 2, + "no-process-env": 2, + "no-process-exit": 2, + "no-proto": 2, + "no-redeclare": 2, + "no-return-assign": [2, "always"], + "no-script-url": 2, + "no-self-compare": 2, + "no-sequences": 2, + "no-throw-literal": 2, + "no-undef-init": 2, + "no-unused-expressions": 2, + "no-useless-concat": 1, + "no-void": 2, + "no-warning-comments": 1, + "no-with": 2, + "radix": 2, + "vars-on-top": 0, + "wrap-iife": [2, "outside"], + "yoda": [2, "never", {"exceptRange": false, "onlyEquality": false}], + + "no-undefined": 2, + "no-shadow": [2, {"hoist": "functions"}], + "no-shadow-restricted-names": 2, + "no-unused-vars": [2, {"vars": "all", "args": "after-used"}], + "no-use-before-define": [2, "nofunc"], + + // Style + "array-bracket-spacing": [2, "never"], + "brace-style": [2, "1tbs", { "allowSingleLine": false }], + "camelcase": [2, {"properties": "never"}], + "comma-spacing": [2, {"before": false, "after": true}], + "comma-style": [2, "last"], + "computed-property-spacing": [2, "never"], + "consistent-this": [2, "self"], + "func-names": 2, + "func-style": [2, "declaration"], + "indent": [2, 4, {"SwitchCase": 0}], + "jsx-quotes": [2, "prefer-single"], + "key-spacing": [2, {"beforeColon": false, "afterColon": true}], + "linebreak-style": 2, + "lines-around-comment": [2, { "beforeBlockComment": true, "beforeLineComment": true, "allowBlockStart": true, "allowBlockEnd": true }], + "new-cap": 2, + "new-parens": 2, + "no-lonely-if": 2, + "no-mixed-spaces-and-tabs": 2, + "no-multiple-empty-lines": [2, {"max": 1}], + "no-negated-condition": 2, + "no-nested-ternary": 2, + "no-spaced-func": 2, + "no-ternary": 0, + "no-trailing-spaces": [2, { "skipBlankLines": false }], + "no-underscore-dangle": 2, + "no-unneeded-ternary": [2, {"defaultAssignment": false}], + "object-curly-spacing": [2, "never"], + "one-var": [2, "never"], + "operator-linebreak": [2, "after"], + "padded-blocks": [2, "never"], + "quote-props": [2, "as-needed"], + "quotes": [2, "single", "avoid-escape"], + "semi": [2, "always"], + "semi-spacing": [2, {"before": false, "after": true}], + "keyword-spacing": [2, {"before": true, "after": true, "overrides": {}}], + "space-before-blocks": [2, "always"], + "space-before-function-paren": [2, "never"], + "space-in-parens": [2, "never"], + "space-infix-ops": 2, + "space-unary-ops": [2, { "words": true, "nonwords": false }], + "wrap-regex": 2, + + // ES6 stuff + "arrow-parens": [2, "always"], + "arrow-body-style": 0, + "arrow-spacing": [2, { "before": true, "after": true }], + "constructor-super": 2, + "generator-star-spacing": [2, {"before": false, "after": true}], + "no-class-assign": 2, + "no-const-assign": 2, + "no-dupe-class-members": 2, + "no-this-before-super": 2, + "no-var": 0, + "object-shorthand": [1, "always"], + "prefer-arrow-callback": 1, + "prefer-const": 1, + "prefer-spread": 2, + "prefer-reflect": 1, + "prefer-template": 0, + "require-yield": 2, + + // React Specific + "react/display-name": [2, { "ignoreTranspilerName": false }], + "react/no-deprecated": 2, + "react/no-is-mounted": 2, + "react/no-string-refs": 1, + "react/jsx-pascal-case": 2, + "react/jsx-indent": [1, 4], + "react/jsx-equals-spacing": [2, "never"], + "react/jsx-handler-names": 0, + "react/jsx-boolean-value": [2, "always"], + "react/jsx-closing-bracket-location": [2, { "location": "tag-aligned" }], + "react/jsx-curly-spacing": [2, "never"], + "react/jsx-indent-props": [2, 4], + "react/jsx-key": 2, + "react/jsx-max-props-per-line": [2, { "maximum": 1 }], + "react/jsx-no-bind": 1, + "react/jsx-space-before-closing": [2, "never"], + "react/jsx-no-duplicate-props": [2, { "ignoreCase": false }], + "react/jsx-no-literals": 1, + "react/jsx-no-undef": 2, + "react/jsx-uses-react": 2, + "react/jsx-uses-vars": 2, + "react/no-danger": 0, + "react/no-did-mount-set-state": 2, + "react/no-did-update-set-state": 2, + "react/no-direct-mutation-state": 2, + "react/no-multi-comp": [2, { "ignoreStateless": true }], + "react/no-set-state": 0, + "react/no-unknown-property": 2, + "react/prefer-es6-class": 2, + "react/prop-types": 2, + "react/self-closing-comp": 2, + "react/sort-comp": 0, + "react/wrap-multilines": 2 + } +} diff --git a/web/react/components/access_history_modal.jsx b/web/react/components/access_history_modal.jsx index af4d3fb0f..cd1db32ec 100644 --- a/web/react/components/access_history_modal.jsx +++ b/web/react/components/access_history_modal.jsx @@ -68,7 +68,7 @@ class AccessHistoryModal extends React.Component { render() { var content; if (this.state.audits.loading) { - content = (); + content = (); } else { content = (
-
{devicePlatform}
+
{devicePlatform}
; + content = ; } else { content =
{activityList}
; } diff --git a/web/react/components/admin_console/admin_controller.jsx b/web/react/components/admin_console/admin_controller.jsx index 695e2083a..de0b085bc 100644 --- a/web/react/components/admin_console/admin_controller.jsx +++ b/web/react/components/admin_console/admin_controller.jsx @@ -130,47 +130,47 @@ export default class AdminController extends React.Component { } render() { - var tab = ; + var tab = ; if (this.state.config != null) { if (this.state.selected === 'email_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'log_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'logs') { - tab = ; + tab = ; } else if (this.state.selected === 'audits') { - tab = ; + tab = ; } else if (this.state.selected === 'image_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'privacy_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'rate_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'gitlab_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'sql_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'team_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'service_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'legal_and_support_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'ldap_settings') { - tab = ; + tab = ; } else if (this.state.selected === 'license') { - tab = ; + tab = ; } else if (this.state.selected === 'team_users') { if (this.state.teams) { - tab = ; + tab = ; } } else if (this.state.selected === 'team_analytics') { if (this.state.teams) { - tab = ; + tab = ; } } else if (this.state.selected === 'system_analytics') { - tab = ; + tab = ; } } diff --git a/web/react/components/admin_console/admin_sidebar.jsx b/web/react/components/admin_console/admin_sidebar.jsx index 795b19eec..6621e5743 100644 --- a/web/react/components/admin_console/admin_sidebar.jsx +++ b/web/react/components/admin_console/admin_sidebar.jsx @@ -236,7 +236,7 @@ export default class AdminSidebar extends React.Component { return (
- +
  • diff --git a/web/react/components/admin_console/admin_sidebar_header.jsx b/web/react/components/admin_console/admin_sidebar_header.jsx index db499265e..8c9f74934 100644 --- a/web/react/components/admin_console/admin_sidebar_header.jsx +++ b/web/react/components/admin_console/admin_sidebar_header.jsx @@ -61,7 +61,7 @@ export default class SidebarHeader extends React.Component {
- +
); } diff --git a/web/react/components/admin_console/audits.jsx b/web/react/components/admin_console/audits.jsx index 173e63b45..c519e0a23 100644 --- a/web/react/components/admin_console/audits.jsx +++ b/web/react/components/admin_console/audits.jsx @@ -54,7 +54,7 @@ export default class Audits extends React.Component { } if (this.state.audits === null) { - content = ; + content = ; } else { content = (
diff --git a/web/react/components/admin_console/logs.jsx b/web/react/components/admin_console/logs.jsx index 71a4a5d8c..8457999f5 100644 --- a/web/react/components/admin_console/logs.jsx +++ b/web/react/components/admin_console/logs.jsx @@ -47,7 +47,7 @@ export default class Logs extends React.Component { var content = null; if (this.state.logs === null) { - content = ; + content = ; } else { content = []; @@ -61,7 +61,7 @@ export default class Logs extends React.Component { style.color = 'red'; } - content.push(
); + content.push(
); content.push( {serverError} - +
); } diff --git a/web/react/components/audit_table.jsx b/web/react/components/audit_table.jsx index 31d04f19b..47eee6d3f 100644 --- a/web/react/components/audit_table.jsx +++ b/web/react/components/audit_table.jsx @@ -207,9 +207,6 @@ const holders = defineMessages({ }); class AuditTable extends React.Component { - constructor(props) { - super(props); - } render() { var accessList = []; diff --git a/web/react/components/authorize.jsx b/web/react/components/authorize.jsx index 4a4985268..35ad7ac10 100644 --- a/web/react/components/authorize.jsx +++ b/web/react/components/authorize.jsx @@ -27,7 +27,9 @@ export default class Authorize extends React.Component { window.location.replace(data.redirect); } }, - () => {} + () => { + //Do nothing on error + } ); } handleDeny() { diff --git a/web/react/components/center_panel.jsx b/web/react/components/center_panel.jsx index 7d2be04d6..6cb749075 100644 --- a/web/react/components/center_panel.jsx +++ b/web/react/components/center_panel.jsx @@ -55,10 +55,10 @@ export default class CenterPanel extends React.Component { let postsContainer; let createPost; if (this.state.showTutorialScreens) { - postsContainer = ; + postsContainer = ; createPost = null; } else if (this.state.showPostFocus) { - postsContainer = ; + postsContainer = ; handleClick = function clickHandler(e) { e.preventDefault(); @@ -80,13 +80,13 @@ export default class CenterPanel extends React.Component {
); } else { - postsContainer = ; + postsContainer = ; createPost = (
- +
); } @@ -108,7 +108,7 @@ export default class CenterPanel extends React.Component { className='app__content' >
- +
{postsContainer} {createPost} diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx index a827cbcc6..b5eb546cf 100644 --- a/web/react/components/channel_header.jsx +++ b/web/react/components/channel_header.jsx @@ -408,7 +408,7 @@ export default class ChannelHeader extends React.Component { aria-expanded='true' > {channelTitle} - +
    - +
    ); + content = (); } else { content = ( ); + content = (); } else { content = (
    diff --git a/web/react/components/channel_notifications_modal.jsx b/web/react/components/channel_notifications_modal.jsx index 59ef8966e..6591de687 100644 --- a/web/react/components/channel_notifications_modal.jsx +++ b/web/react/components/channel_notifications_modal.jsx @@ -168,7 +168,7 @@ export default class ChannelNotificationsModal extends React.Component { checked={notifyActive[1]} onChange={this.handleUpdateNotifyLevel.bind(this, 'all')} /> - +
    @@ -179,7 +179,7 @@ export default class ChannelNotificationsModal extends React.Component { checked={notifyActive[2]} onChange={this.handleUpdateNotifyLevel.bind(this, 'mention')} /> - +
    @@ -190,7 +190,7 @@ export default class ChannelNotificationsModal extends React.Component { checked={notifyActive[3]} onChange={this.handleUpdateNotifyLevel.bind(this, 'none')} /> - +
@@ -234,11 +234,11 @@ export default class ChannelNotificationsModal extends React.Component { /> ); } else if (this.state.notifyLevel === 'mention') { - describe = (); + describe = (); } else if (this.state.notifyLevel === 'all') { - describe = (); + describe = (); } else { - describe = (); + describe = (); } handleUpdateSection = function updateSection(e) { @@ -311,7 +311,7 @@ export default class ChannelNotificationsModal extends React.Component { defaultMessage='For all unread messages' /> -
+
-
+
)]; @@ -363,7 +363,7 @@ export default class ChannelNotificationsModal extends React.Component { /> ); } else { - describe = (); + describe = (); } const handleUpdateSection = function handleUpdateSection(e) { diff --git a/web/react/components/channel_view.jsx b/web/react/components/channel_view.jsx index 7cbb638a0..9c4131292 100644 --- a/web/react/components/channel_view.jsx +++ b/web/react/components/channel_view.jsx @@ -7,9 +7,6 @@ import SidebarRight from '../components/sidebar_right.jsx'; import SidebarRightMenu from '../components/sidebar_right_menu.jsx'; export default class ChannelView extends React.Component { - constructor(props) { - super(props); - } render() { return (
@@ -31,7 +28,7 @@ export default class ChannelView extends React.Component { >
- + ); } diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx index 48b6594a1..9d7a19554 100644 --- a/web/react/components/create_post.jsx +++ b/web/react/components/create_post.jsx @@ -477,7 +477,7 @@ class CreatePost extends React.Component { className='send-button theme' onClick={this.handleSubmit} > - + {tutorialTip} diff --git a/web/react/components/delete_post_modal.jsx b/web/react/components/delete_post_modal.jsx index 95b2e58a8..773d0b420 100644 --- a/web/react/components/delete_post_modal.jsx +++ b/web/react/components/delete_post_modal.jsx @@ -178,8 +178,8 @@ export default class DeletePostModal extends React.Component { term: (postTerm) }} /> -
-
+
+
{commentWarning} {error} diff --git a/web/react/components/edit_post_modal.jsx b/web/react/components/edit_post_modal.jsx index e54b7d9b8..380ca7bde 100644 --- a/web/react/components/edit_post_modal.jsx +++ b/web/react/components/edit_post_modal.jsx @@ -135,9 +135,9 @@ class EditPostModal extends React.Component { PreferenceStore.removeChangeListener(this.onPreferenceChange); } render() { - var error = (

); + var error = (

); if (this.state.error) { - error = (

); + error = (

); } return ( diff --git a/web/react/components/email_verify.jsx b/web/react/components/email_verify.jsx index ef1a62130..702a20eba 100644 --- a/web/react/components/email_verify.jsx +++ b/web/react/components/email_verify.jsx @@ -70,7 +70,7 @@ export default class EmailVerify extends React.Component { ); if (this.props.resendSuccess) { resendConfirm = ( -

+


- +

@@ -47,3 +47,10 @@ export default function FileInfoPreview({filename, fileUrl, fileInfo, formatMess
); } + +FileInfoPreview.propTypes = { + filename: React.PropTypes.string.isRequired, + fileUrl: React.PropTypes.string.isRequired, + fileInfo: React.PropTypes.object.isRequired, + formatMessage: React.PropTypes.func.isRequired +}; diff --git a/web/react/components/file_upload.jsx b/web/react/components/file_upload.jsx index 0454fe510..cb8ede51b 100644 --- a/web/react/components/file_upload.jsx +++ b/web/react/components/file_upload.jsx @@ -305,7 +305,7 @@ class FileUpload extends React.Component { className='btn btn-file' > - + {this.props.helpText} -
-
+
+

); } diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx index f2a0a7565..0c0330c40 100644 --- a/web/react/components/invite_member_modal.jsx +++ b/web/react/components/invite_member_modal.jsx @@ -376,7 +376,7 @@ class InviteMemberModal extends React.Component { ); if (this.state.isSendingEmails) { sendButtonLabel = ( - + - + - + - + {msg}
); diff --git a/web/react/components/member_list.jsx b/web/react/components/member_list.jsx index 8c6dc4209..e6737087b 100644 --- a/web/react/components/member_list.jsx +++ b/web/react/components/member_list.jsx @@ -4,10 +4,6 @@ import MemberListItem from './member_list_item.jsx'; export default class MemberList extends React.Component { - constructor(props) { - super(props); - } - render() { var members = []; diff --git a/web/react/components/member_list_item.jsx b/web/react/components/member_list_item.jsx index 41ea58eeb..88b98738d 100644 --- a/web/react/components/member_list_item.jsx +++ b/web/react/components/member_list_item.jsx @@ -112,7 +112,7 @@ export default class MemberListItem extends React.Component {
); } else { - invite = (
{member.roles || }
); + invite = (
{member.roles || }
); } return ( diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index d800f93d8..db61e5f49 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -82,7 +82,7 @@ export default class MoreChannels extends React.Component { if (this.state.channels != null) { var channels = this.state.channels; if (channels.loading) { - moreChannels = ; + moreChannels = ; } else if (channels.length) { moreChannels = ( diff --git a/web/react/components/navbar.jsx b/web/react/components/navbar.jsx index 835298635..a06fb449b 100644 --- a/web/react/components/navbar.jsx +++ b/web/react/components/navbar.jsx @@ -380,7 +380,7 @@ export default class Navbar extends React.Component { - + ); @@ -393,7 +393,7 @@ export default class Navbar extends React.Component { data-target='#sidebar-nav' onClick={this.toggleRightSidebar} > - + ); } @@ -502,7 +502,7 @@ export default class Navbar extends React.Component { className='navbar-toggle pull-right' onClick={this.showSearch} > - + ); diff --git a/web/react/components/post_attachment_list.jsx b/web/react/components/post_attachment_list.jsx index 9c6700e2d..ae03e15d3 100644 --- a/web/react/components/post_attachment_list.jsx +++ b/web/react/components/post_attachment_list.jsx @@ -4,10 +4,6 @@ import PostAttachment from './post_attachment.jsx'; export default class PostAttachmentList extends React.Component { - constructor(props) { - super(props); - } - render() { let content = []; this.props.attachments.forEach((attachment, i) => { diff --git a/web/react/components/post_attachment_oembed.jsx b/web/react/components/post_attachment_oembed.jsx index 4b12ee95e..d76e5f02e 100644 --- a/web/react/components/post_attachment_oembed.jsx +++ b/web/react/components/post_attachment_oembed.jsx @@ -46,6 +46,7 @@ export default class PostAttachmentOEmbed extends React.Component { } }); } + return null; } render() { diff --git a/web/react/components/post_body_additional_content.jsx b/web/react/components/post_body_additional_content.jsx index 7e6f3f037..4871eea4f 100644 --- a/web/react/components/post_body_additional_content.jsx +++ b/web/react/components/post_body_additional_content.jsx @@ -52,7 +52,7 @@ export default class PostBodyAdditionalContent extends React.Component { render() { let content = []; - if (Boolean(this.props.post.type)) { + if (this.props.post.type) { const component = this.getComponent(); if (component) { diff --git a/web/react/components/post_header.jsx b/web/react/components/post_header.jsx index 037b48096..c52391daa 100644 --- a/web/react/components/post_header.jsx +++ b/web/react/components/post_header.jsx @@ -15,7 +15,7 @@ export default class PostHeader extends React.Component { render() { var post = this.props.post; - let userProfile = ; + let userProfile = ; let botIndicator; if (post.props && post.props.from_webhook) { diff --git a/web/react/components/posts_view.jsx b/web/react/components/posts_view.jsx index 19ab7d5aa..15810d9cf 100644 --- a/web/react/components/posts_view.jsx +++ b/web/react/components/posts_view.jsx @@ -252,7 +252,7 @@ export default class PostsView extends React.Component { key={currentPostDay.toDateString()} className='date-separator' > -
+
- + ); } else { @@ -528,11 +528,11 @@ PostsView.propTypes = { function FloatingTimestamp({isScrolling, post}) { // only show on mobile if ($(window).width() > 768) { - return
); } + +ScrollToBottomArrows.propTypes = { + isScrolling: React.PropTypes.bool.isRequired, + atBottom: React.PropTypes.bool.isRequired, + onClick: React.PropTypes.func.isRequired +}; diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx index 631bd1872..972342021 100644 --- a/web/react/components/posts_view_container.jsx +++ b/web/react/components/posts_view_container.jsx @@ -173,7 +173,9 @@ export default class PostsViewContainer extends React.Component { scrollPostId={this.state.scrollPost} postViewScrolled={this.handlePostsViewScroll} loadMorePostsTopClicked={this.loadMorePostsTop} - loadMorePostsBottomClicked={() => {}} + loadMorePostsBottomClicked={() => { + // Do Nothing + }} showMoreMessagesTop={!this.state.atTop[this.state.currentChannelIndex]} showMoreMessagesBottom={false} introText={channel ? createChannelIntroMessage(channel) : null} diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx index 201a4c569..2ebca9b8d 100644 --- a/web/react/components/rhs_comment.jsx +++ b/web/react/components/rhs_comment.jsx @@ -246,7 +246,7 @@ class RhsComment extends React.Component {
  • - +