summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-23 10:07:58 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-23 10:07:58 -0500
commiteebec713606de38c1c82a0e199442294c87b45d5 (patch)
treef738fe9515de8277b080fa5a36b9cc56f17fbb20
parent4b3a3941e04803539f39c057a5c0d44cd30699be (diff)
downloadchat-eebec713606de38c1c82a0e199442294c87b45d5.tar.gz
chat-eebec713606de38c1c82a0e199442294c87b45d5.tar.bz2
chat-eebec713606de38c1c82a0e199442294c87b45d5.zip
Enable no magic numbers as warning. Ignore stateless components.
-rw-r--r--web/react/.eslintrc4
-rw-r--r--web/react/utils/channel_intro_mssages.jsx6
2 files changed, 5 insertions, 5 deletions
diff --git a/web/react/.eslintrc b/web/react/.eslintrc
index 29ca97faf..935bb638a 100644
--- a/web/react/.eslintrc
+++ b/web/react/.eslintrc
@@ -47,7 +47,7 @@
"no-irregular-whitespace": 2,
"no-unexpected-multiline": 2,
"no-unreachable": 2,
- "no-magic-numbers": [0, { "enforceConst": true, "detectObjects": true } ],
+ "no-magic-numbers": [1, { "enforceConst": true, "detectObjects": true } ],
"valid-typeof": 2,
"block-scoped-var": 2,
@@ -190,7 +190,7 @@
"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,
+ "react/no-multi-comp": [2, { "ignoreStateless": true }],
"react/no-set-state": 0,
"react/no-unknown-property": 2,
"react/prefer-es6-class": 2,
diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx
index aef1593dc..0bbc7366e 100644
--- a/web/react/utils/channel_intro_mssages.jsx
+++ b/web/react/utils/channel_intro_mssages.jsx
@@ -71,7 +71,7 @@ export function createDMIntroMessage(channel) {
);
}
-export function createOffTopicIntroMessage(channel, showInviteModal) { //eslint-disable-line react/no-multi-comp
+export function createOffTopicIntroMessage(channel, showInviteModal) {
return (
<div className='channel-intro'>
<h4 className='channel-intro__title'>{'Beginning of ' + channel.display_name}</h4>
@@ -101,7 +101,7 @@ export function createOffTopicIntroMessage(channel, showInviteModal) { //eslint-
);
}
-export function createDefaultIntroMessage(channel) { //eslint-disable-line react/no-multi-comp
+export function createDefaultIntroMessage(channel) {
const team = TeamStore.getCurrent();
let inviteModalLink;
if (team.type === Constants.INVITE_TEAM) {
@@ -154,7 +154,7 @@ export function createDefaultIntroMessage(channel) { //eslint-disable-line react
);
}
-export function createStandardIntroMessage(channel, showInviteModal) { //eslint-disable-line react/no-multi-comp
+export function createStandardIntroMessage(channel, showInviteModal) {
var uiName = channel.display_name;
var creatorName = '';