Showing 90 of 251 total issues

Function snippets has 212 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const snippets = (state = initialState, action) => {
  switch (action.type) {
    case AT.GET_SNIPPETS.SUCCESS: {
      const lastUpdated = state.lastUpdated === null ? toISOString() : state.lastUpdated;

Severity: Major
Found in src/reducers/snippets.js - About 1 day to fix

    File SnippetHeader.js has 516 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    import PropTypes from 'prop-types';
    import { connect } from 'react-redux';
    import { drop, get, isEmpty, map, size, toString, isArray } from 'lodash/fp';
    import styled from 'styled-components';
    Severity: Major
    Found in src/components/layout/headers/SnippetHeader.js - About 1 day to fix

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

        render() {
          const snippetUrl = getSnippetUrl('/gist');
          const { snippets, match, editSnippet, comments } = this.props;
          const snippet = get(match.params.id, snippets);
          const snippetId = get('id', snippet);
      Severity: Major
      Found in src/components/layout/headers/SnippetHeader.js - About 5 hrs to fix

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

          render() {
            return (
              <section className="whiter boxes inner">
                <div className="w-container">
                  <p className="txt-grey txt-center">
        Severity: Major
        Found in docs/src/components/Downloads.js - About 5 hrs to fix

          File NewSnippet.js has 397 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React from 'react';
          import PropTypes from 'prop-types';
          import { connect } from 'react-redux';
          import styled from 'styled-components';
          import {
          Severity: Minor
          Found in src/components/layout/content/NewSnippet.js - About 5 hrs to fix

            File DashBoard.js has 385 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React from 'react';
            import PropTypes from 'prop-types';
            import { connect } from 'react-redux';
            import styled, { css } from 'styled-components';
            import { size, filter, map, flow, isEmpty, get } from 'lodash/fp';
            Severity: Minor
            Found in src/components/layout/content/DashBoard.js - About 5 hrs to fix

              File snippets.spec.js has 368 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import * as AT from 'constants/actionTypes';
              import { snippets as reducer } from 'reducers/snippets';
              
              import { rawSnippets, snippet, snippets } from '../../__mocks__/snippets';
              import { filter, head, keyBy, map, merge } from 'lodash/fp';
              Severity: Minor
              Found in __tests__/reduceres/snippets.spec.js - About 4 hrs to fix

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

                  render() {
                    const { theme, tags } = this.props;
                    const languageFromSettings = getSetting('setings-default-new-snippet-language', 'Text');
                
                    return (
                Severity: Major
                Found in src/components/layout/content/NewSnippet.js - About 4 hrs to fix

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

                    render() {
                      if (isElectron) {
                        const { ipcRenderer } = require('electron');
                  
                        ipcRenderer.on('token', (event, token) => {
                  Severity: Major
                  Found in src/components/LogIn.js - About 4 hrs to fix

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

                      render() {
                        const {
                          snippets,
                          privateSnippets,
                          starred,
                    Severity: Major
                    Found in src/components/layout/content/DashBoard.js - About 4 hrs to fix

                      File LogIn.js has 340 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import React from 'react';
                      import PropTypes from 'prop-types';
                      import { connect } from 'react-redux';
                      import { get, isEmpty } from 'lodash/fp';
                      import styled from 'styled-components';
                      Severity: Minor
                      Found in src/components/LogIn.js - About 4 hrs to fix

                        Function buildMenu has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function buildMenu(mainWindow) {
                          const template = [];
                          const name = app.getName();
                        
                          template.unshift(
                        Severity: Major
                        Found in src/electron/main/helpers.js - About 4 hrs to fix

                          File editor.ts has 337 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          export const syntaxMap = {
                            ABAP: 'abap',
                            ActionScript: 'actionscript',
                            Ada: 'ada',
                            Agda: 'text',
                          Severity: Minor
                          Found in src/constants/editor.ts - About 4 hrs to fix

                            Function componentDidMount has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              componentDidMount() {
                                if (isElectron) {
                                  const { ipcRenderer } = require('electron');
                                  const { app } = require('electron').remote;
                                  const isMacOS = process.platform === 'darwin';
                            Severity: Major
                            Found in src/components/layout/Updater.js - About 3 hrs to fix

                              File gitHubAPI.js has 296 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /* eslint consistent-return: 0 */
                              
                              import * as superagent from 'superagent';
                              import * as AT from 'constants/actionTypes';
                              import { responseHandler } from 'middlewares/responseHandler';
                              Severity: Minor
                              Found in src/middlewares/gitHubAPI.js - About 3 hrs to fix

                                Function HTML has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const HTML = (props) => {
                                  return (
                                    <html { ...props.htmlAttributes }>
                                      <head>
                                        <meta charSet="utf-8"/>
                                Severity: Major
                                Found in docs/src/html.js - About 3 hrs to fix

                                  File Editor.js has 288 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import React from 'react';
                                  import { connect } from 'react-redux';
                                  import PropTypes from 'prop-types';
                                  import styled from 'styled-components';
                                  
                                  
                                  Severity: Minor
                                  Found in src/components/layout/content/settings/Editor.js - About 2 hrs to fix

                                    File helpers.js has 287 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    /* eslint no-console: 0 */
                                    const { shell, app, Menu, ipcMain } = require('electron');
                                    const { autoUpdater } = require('electron-updater');
                                    const log = require('electron-log');
                                    const { init } = require('@sentry/electron');
                                    Severity: Minor
                                    Found in src/electron/main/helpers.js - About 2 hrs to fix

                                      Function ui has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const ui = (state = initialState, action) => {
                                        switch (action.type) {
                                          case AT.GET_SNIPPETS.PENDING:
                                          case AT.GET_SNIPPET.PENDING:
                                          case AT.SET_STAR.PENDING:
                                      Severity: Major
                                      Found in src/reducers/ui.js - About 2 hrs to fix

                                        File snippetsActions.spec.js has 277 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import * as AT from 'constants/actionTypes';
                                        import * as snippetsActions from 'actions/snippets';
                                        
                                        const files = {
                                          'hi.txt': {
                                        Severity: Minor
                                        Found in __tests__/actions/snippetsActions.spec.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language