glitch-soc/mastodon

View on GitHub

Showing 1,278 of 4,906 total issues

Function handleClick has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleClick = useCallback(() => {
    if (partOfList) {
      void apiRemoveAccountFromList(listId, accountId);
      onToggle(accountId);
    } else {
Severity: Minor
Found in app/javascript/mastodon/features/lists/members.tsx - About 1 hr to fix

    Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render () {
        const { poll, intl } = this.props;
        const { revealed, expired } = this.state;
    
        if (!poll) {
    Severity: Minor
    Found in app/javascript/flavours/glitch/components/poll.jsx - About 1 hr to fix

      Function getDerivedStateFromProps has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        static getDerivedStateFromProps(nextProps, prevState) {
          let update = {};
          let updated = false;
      
          // Make sure the state mirrors props we track…
      Severity: Minor
      Found in app/javascript/flavours/glitch/components/status.jsx - About 1 hr to fix

        Function dropOrientationIfNeeded has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const dropOrientationIfNeeded = (orientation) => new Promise(resolve => {
          switch (_browser_quirks['image-orientation-automatic']) {
          case true:
            resolve(1);
            break;
        Severity: Minor
        Found in app/javascript/flavours/glitch/utils/resize_image.js - About 1 hr to fix

          Function checkDeprecatedLocalSettings has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function checkDeprecatedLocalSettings() {
            return (dispatch, getState) => {
              const local_auto_unfold = getState().getIn(['local_settings', 'content_warnings', 'auto_unfold']);
              const local_swipe_to_change_columns = getState().getIn(['local_settings', 'swipe_to_change_columns']);
              let changed_settings = [];
          Severity: Minor
          Found in app/javascript/flavours/glitch/actions/local_settings.js - About 1 hr to fix

            Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render () {
                const { intl, hasMore, accountIds, multiColumn, isLoading } = this.props;
            
                if (!accountIds) {
                  return (
            Severity: Minor
            Found in app/javascript/flavours/glitch/features/mutes/index.jsx - About 1 hr to fix

              Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render () {
                  const { status, checked } = this.props;
              
                  if (status.get('reblog')) {
                    return null;

                Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  render () {
                    const { emoji, emojiMap, hovered } = this.props;
                
                    if (unicodeMapping[emoji]) {
                      const { filename, shortCode } = unicodeMapping[this.props.emoji];

                  Function _updateLinks has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    _updateLinks () {
                      const node = this.node;
                  
                      if (!node) {
                        return;

                    Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      render () {
                        const { intl, hidden, report, account } = this.props;
                    
                        if (!report) {
                          return null;

                      Function server has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function server(state = initialState, action) {
                        switch (action.type) {
                        case SERVER_FETCH_REQUEST:
                          return state.setIn(['server', 'isLoading'], true);
                        case SERVER_FETCH_SUCCESS:
                      Severity: Minor
                      Found in app/javascript/flavours/glitch/reducers/server.js - About 1 hr to fix

                        Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render () {
                            const { poll, intl } = this.props;
                            const { revealed, expired } = this.state;
                        
                            if (!poll) {
                        Severity: Minor
                        Found in app/javascript/mastodon/components/poll.jsx - About 1 hr to fix

                          Function server has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function server(state = initialState, action) {
                            switch (action.type) {
                            case SERVER_FETCH_REQUEST:
                              return state.setIn(['server', 'isLoading'], true);
                            case SERVER_FETCH_SUCCESS:
                          Severity: Minor
                          Found in app/javascript/mastodon/reducers/server.js - About 1 hr to fix

                            Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              render () {
                                const { emoji, emojiMap, hovered } = this.props;
                            
                                if (unicodeMapping[emoji]) {
                                  const { filename, shortCode } = unicodeMapping[this.props.emoji];

                              Function _updateLinks has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                _updateLinks () {
                                  const node = this.node;
                              
                                  if (!node) {
                                    return;

                                Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  render () {
                                    const { intl, hidden, report, account } = this.props;
                                
                                    if (!report) {
                                      return null;

                                  Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    render () {
                                      const { media, status, onClose } = this.props;
                                      const options = this.props.options || {};
                                      const language = status.getIn(['translation', 'language']) || status.get('language');
                                      const description = media.getIn(['translation', 'description']) || media.get('description');
                                  Severity: Minor
                                  Found in app/javascript/mastodon/features/ui/components/video_modal.jsx - About 1 hr to fix

                                    Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      render () {
                                        const { intl, hasMore, accountIds, multiColumn, isLoading } = this.props;
                                    
                                        if (!accountIds) {
                                          return (
                                    Severity: Minor
                                    Found in app/javascript/mastodon/features/mutes/index.jsx - About 1 hr to fix

                                      Function renderStatus has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        renderStatus (notification, link) {
                                          const { intl, unread, status } = this.props;
                                      
                                          if (!status) {
                                            return null;

                                        Function renderUpdate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          renderUpdate (notification, link) {
                                            const { intl, unread, status } = this.props;
                                        
                                            if (!status) {
                                              return null;
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language