diff --git a/.eslintrc.js b/.eslintrc.js index 429aa249930..fd4d1da631f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -33,6 +33,8 @@ module.exports = { // This just uses the react plugin to help eslint known when // variables have been used in JSX "react/jsx-uses-vars": "error", + // Don't mark React as unused if we're using JSX + "react/jsx-uses-react": "error", // bind or arrow function in props causes performance issues "react/jsx-no-bind": ["error", { diff --git a/src/UserSettingsStore.js b/src/UserSettingsStore.js index ce39939bc09..34f9a28d574 100644 --- a/src/UserSettingsStore.js +++ b/src/UserSettingsStore.js @@ -26,10 +26,6 @@ import SdkConfig from './SdkConfig'; */ const FEATURES = [ - { - id: 'feature_groups', - name: _td("Communities"), - }, { id: 'feature_pinning', name: _td("Message Pinning"), diff --git a/src/components/views/elements/Flair.js b/src/components/views/elements/Flair.js index 17d37d593cf..4a34dac0de8 100644 --- a/src/components/views/elements/Flair.js +++ b/src/components/views/elements/Flair.js @@ -19,7 +19,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import {MatrixClient} from 'matrix-js-sdk'; -import UserSettingsStore from '../../../UserSettingsStore'; import FlairStore from '../../../stores/FlairStore'; import dis from '../../../dispatcher'; @@ -83,9 +82,7 @@ export default class Flair extends React.Component { componentWillMount() { this._unmounted = false; - if (UserSettingsStore.isFeatureEnabled('feature_groups') && FlairStore.groupSupport()) { - this._generateAvatars(); - } + this._generateAvatars(); this.context.matrixClient.on('RoomState.events', this.onRoomStateEvents); } diff --git a/src/components/views/elements/GroupsButton.js b/src/components/views/elements/GroupsButton.js index 9e803c87db2..75dfe4e9add 100644 --- a/src/components/views/elements/GroupsButton.js +++ b/src/components/views/elements/GroupsButton.js @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +import React from 'react'; import sdk from '../../../index'; import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js index 2f46a9308e7..c7e839ab402 100644 --- a/src/components/views/rooms/RoomSettings.js +++ b/src/components/views/rooms/RoomSettings.js @@ -671,13 +671,11 @@ module.exports = React.createClass({ const self = this; - let relatedGroupsSection; - if (UserSettingsStore.isFeatureEnabled('feature_groups')) { - relatedGroupsSection = ; - } + const relatedGroupsSection = ; let userLevelsSection; if (Object.keys(user_levels).length) {