Merge pull request #2208 from mattermost/client-upgrades

Updating some client deps + eslint
Этот коммит содержится в:
Harrison Healey
2016-02-22 10:54:42 -05:00
родитель 51680a7cd8 4c92a1c1e3
Коммит 32ae72d91d
90 изменённых файлов: 449 добавлений и 406 удалений

Просмотреть файл

@@ -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
}
}

226
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
}
}

Просмотреть файл

@@ -4,10 +4,6 @@
import {FormattedMessage} from 'mm-intl';
export default class StatisticCount extends React.Component {
constructor(props) {
super(props);
}
render() {
let loading = (
<FormattedMessage

Просмотреть файл

@@ -112,9 +112,6 @@ export default class UserList extends React.Component {
this.getTeamProfiles(newProps.team.id);
}
componentWillUnmount() {
}
render() {
var serverError = '';
if (this.state.serverError) {

Просмотреть файл

@@ -207,9 +207,6 @@ const holders = defineMessages({
});
class AuditTable extends React.Component {
constructor(props) {
super(props);
}
render() {
var accessList = [];

Просмотреть файл

@@ -27,7 +27,9 @@ export default class Authorize extends React.Component {
window.location.replace(data.redirect);
}
},
() => {}
() => {
//Do nothing on error
}
);
}
handleDeny() {

Просмотреть файл

@@ -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 (
<div className='container-fluid'>

Просмотреть файл

@@ -245,7 +245,9 @@ class FileAttachment extends React.Component {
this.setState({fileSize: parseInt(data.size, 10), mime: data.mime});
}
}.bind(this),
function error() {}
function error() {
// Do nothing
}
);
} else {
fileSizeString = utils.fileSizeToString(this.state.fileSize);

Просмотреть файл

@@ -47,3 +47,10 @@ export default function FileInfoPreview({filename, fileUrl, fileInfo, formatMess
</div>
);
}
FileInfoPreview.propTypes = {
filename: React.PropTypes.string.isRequired,
fileUrl: React.PropTypes.string.isRequired,
fileInfo: React.PropTypes.object.isRequired,
formatMessage: React.PropTypes.func.isRequired
};

Просмотреть файл

@@ -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 = [];

Просмотреть файл

@@ -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) => {

Просмотреть файл

@@ -46,6 +46,7 @@ export default class PostAttachmentOEmbed extends React.Component {
}
});
}
return null;
}
render() {

Просмотреть файл

@@ -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) {

Просмотреть файл

@@ -557,6 +557,11 @@ function FloatingTimestamp({isScrolling, post}) {
);
}
FloatingTimestamp.propTypes = {
isScrolling: React.PropTypes.bool.isRequired,
post: React.PropTypes.object
};
function ScrollToBottomArrows({isScrolling, atBottom, onClick}) {
// only show on mobile
if ($(window).width() > 768) {
@@ -577,3 +582,9 @@ function ScrollToBottomArrows({isScrolling, atBottom, onClick}) {
</div>
);
}
ScrollToBottomArrows.propTypes = {
isScrolling: React.PropTypes.bool.isRequired,
atBottom: React.PropTypes.bool.isRequired,
onClick: React.PropTypes.func.isRequired
};

Просмотреть файл

@@ -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}

Просмотреть файл

@@ -87,6 +87,7 @@ export default class SidebarRight extends React.Component {
$('.sidebar__overlay').remove();
});
}, 500);*/
return null;
}
componentDidUpdate() {
this.doStrangeThings();

Просмотреть файл

@@ -157,6 +157,8 @@ export default class TeamSignUp extends React.Component {
</div>
);
}
return null;
}
}

Просмотреть файл

@@ -4,10 +4,6 @@
import {FormattedMessage, FormattedHTMLMessage} from 'mm-intl';
export default class SignupTeamConfirm extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className='signup-team__container'>

Просмотреть файл

@@ -10,9 +10,6 @@ var Tooltip = ReactBootstrap.Tooltip;
var OverlayTrigger = ReactBootstrap.OverlayTrigger;
export default class TimeSince extends React.Component {
constructor(props) {
super(props);
}
componentDidMount() {
this.intervalId = setInterval(() => {
this.forceUpdate();

Просмотреть файл

@@ -22,7 +22,7 @@ export default class ModalToggleButton extends React.Component {
}
render() {
const {children, dialogType, dialogProps, onClick, ...props} = this.props; // eslint-disable-line no-redeclare
const {children, dialogType, dialogProps, onClick, ...props} = this.props; // eslint-disable-line no-use-before-define
// allow callers to provide an onClick which will be called before the modal is shown
let clickHandler = this.show;

Просмотреть файл

@@ -58,6 +58,7 @@ export default class TutorialIntroScreens extends React.Component {
case 2:
return this.createScreenThree();
}
return null;
}
createScreenOne() {
const circles = this.createCircles();

Просмотреть файл

@@ -4,9 +4,6 @@
// Indicator for the left sidebar which indicate if there's unread posts in a channel that is not shown
// because it is either above or below the screen
export default class UnreadChannelIndicator extends React.Component {
constructor(props) {
super(props);
}
render() {
let displayValue = 'none';
if (this.props.show) {

Просмотреть файл

@@ -111,12 +111,13 @@ class UserSettingsModal extends React.Component {
this.afterConfirm = () => this.handleHide();
this.showConfirmModal();
return false;
return;
}
this.resetTheme();
this.deactivateTab();
this.props.onModalDismissed();
return;
}
// called after the dialog is fully hidden and faded out
@@ -295,7 +296,12 @@ class UserSettingsModal extends React.Component {
closeModal={this.closeModal}
collapseModal={this.collapseModal}
setEnforceFocus={(enforceFocus) => this.setState({enforceFocus})}
setRequireConfirm={(requireConfirm) => this.requireConfirm = requireConfirm}
setRequireConfirm={
(requireConfirm) => {
this.requireConfirm = requireConfirm;
return;
}
}
/>
</div>
</div>

Просмотреть файл

@@ -203,7 +203,9 @@ class ViewImageModal extends React.Component {
window.open(serverData.public_link);
}
},
() => {}
() => {
//Do Nothing on error
}
);
}
@@ -383,6 +385,11 @@ function LoadingImagePreview({progress, loading}) {
);
}
LoadingImagePreview.propTypes = {
progress: React.PropTypes.number,
loading: React.PropTypes.string
};
function ImagePreview({filename, fileUrl, fileInfo, maxHeight}) {
let previewUrl;
if (fileInfo.has_preview_image) {
@@ -405,4 +412,11 @@ function ImagePreview({filename, fileUrl, fileInfo, maxHeight}) {
);
}
ImagePreview.propTypes = {
filename: React.PropTypes.string.isRequired,
fileUrl: React.PropTypes.string.isRequired,
fileInfo: React.PropTypes.object.isRequired,
maxHeight: React.PropTypes.number.isRequired
};
export default injectIntl(ViewImageModal);

Просмотреть файл

@@ -4,9 +4,6 @@
import {FormattedMessage} from 'mm-intl';
export default class ViewImagePopoverBar extends React.Component {
constructor(props) {
super(props);
}
render() {
var publicLink = '';
if (global.window.mm_config.EnablePublicLink === 'true') {

Просмотреть файл

@@ -94,6 +94,7 @@ export default class YoutubeVideo extends React.Component {
receivedYoutubeData: true,
title: metadata.title
});
return null;
}
play() {

Просмотреть файл

@@ -3,10 +3,10 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"autolinker": "0.22.0",
"fastclick": "^1.0.6",
"autolinker": "0.24.0",
"fastclick": "1.0.6",
"flux": "2.1.1",
"highlight.js": "8.9.1",
"highlight.js": "9.1.0",
"keymirror": "0.1.1",
"marked": "mattermost/marked#cb85e5cc81bc7937dbb73c3c53d9532b1b97e3ca",
"mm-intl": "mattermost/mm-intl#805442fd474fa40cd586ddeda404dbbe8e60626d",
@@ -14,18 +14,18 @@
"twemoji": "1.4.1"
},
"devDependencies": {
"babel-eslint": "4.1.7",
"babel-plugin-transform-runtime": "6.1.4",
"babel-preset-es2015": "6.1.18",
"babel-preset-react": "6.1.18",
"babel-preset-stage-0": "6.1.18",
"babel-eslint": "5.0.0",
"babel-plugin-transform-runtime": "6.5.2",
"babel-preset-es2015": "6.5.0",
"babel-preset-react": "6.5.0",
"babel-preset-stage-0": "6.5.0",
"babelify": "7.2.0",
"browserify": "12.0.1",
"eslint": "1.9.0",
"eslint-plugin-react": "3.9.0",
"browserify": "13.0.0",
"eslint": "2.2.0",
"eslint-plugin-react": "4.0.0",
"exorcist": "0.4.0",
"uglify-js": "2.6.1",
"watchify": "3.6.1"
"watchify": "3.7.0"
},
"scripts": {
"check": "",

Просмотреть файл

@@ -29,6 +29,7 @@ class Root extends React.Component {
translations: data,
loaded: true
});
return;
},
() => {
this.setState({

Просмотреть файл

@@ -68,7 +68,6 @@ class Root extends React.Component {
<ChannelLoader/>
<ErrorBar/>
<ChannelView/>
<GetPostLinkModal/>
<GetTeamInviteLinkModal/>
<InviteMemberModal/>

Просмотреть файл

@@ -28,7 +28,7 @@ class ModalStoreClass extends EventEmitter {
handleEventPayload(payload) {
// toggle event handlers should accept a boolean show/hide value and can accept a map of arguments
const {type, value, ...args} = payload.action; //eslint-disable-line no-redeclare
const {type, value, ...args} = payload.action; //eslint-disable-line no-use-before-define
switch (type) {
case ActionTypes.TOGGLE_IMPORT_THEME_MODAL:

Просмотреть файл

@@ -210,7 +210,7 @@ class SuggestionStore extends EventEmitter {
}
handleEventPayload(payload) {
const {type, id, ...other} = payload.action; // eslint-disable-line no-redeclare
const {type, id, ...other} = payload.action; // eslint-disable-line no-use-before-define
switch (type) {
case ActionTypes.SUGGESTION_PRETEXT_CHANGED:

Просмотреть файл

@@ -23,6 +23,7 @@ export function createChannelIntroMessage(channel) {
} else if (channel.type === 'O' || channel.type === 'P') {
return createStandardIntroMessage(channel);
}
return null;
}
export function createDMIntroMessage(channel) {

Просмотреть файл

@@ -1430,7 +1430,7 @@ export function listIncomingHooks(success, error) {
export function getAllPreferences(success, error) {
$.ajax({
url: `/api/v1/preferences/`,
url: '/api/v1/preferences/',
dataType: 'json',
type: 'GET',
success,

Просмотреть файл

@@ -157,5 +157,5 @@ export function getImagePathForEmoticon(name) {
if (name) {
return `/static/images/emoji/${name}.png`;
}
return `/static/images/emoji`;
return '/static/images/emoji';
}

Просмотреть файл

@@ -142,6 +142,7 @@ export function getCookie(name) {
if (parts.length === 2) {
return parts.pop().split(';').shift();
}
return '';
}
var requestedNotificationPermission = false;
@@ -188,7 +189,10 @@ export function ding() {
var audio = new Audio('/static/images/bing.mp3');
audio.play();
canDing = false;
setTimeout(() => canDing = true, 3000);
setTimeout(() => {
canDing = true;
return;
}, 3000);
}
}