InsidersByte/honeymoon-gift-list

View on GitHub

Showing 276 of 276 total issues

Similar blocks of code found in 14 locations. Consider refactoring.
Open

        <TextField
          name="newPassword"
          type="password"
          floatingLabelText="New Password"
          value={newPassword}
Severity: Major
Found in public/components/ProfileForm.jsx and 13 other locations - About 1 hr to fix
public/components/GiverDetailsForm.jsx on lines 85..95
public/components/LoginForm.jsx on lines 43..53
public/components/LoginForm.jsx on lines 55..65
public/components/ProfileForm.jsx on lines 42..52
public/components/ProfileForm.jsx on lines 66..76
public/components/ResetPasswordForm.jsx on lines 42..52
public/components/ResetPasswordForm.jsx on lines 54..64
public/components/SetupForm.jsx on lines 48..58
public/components/SetupForm.jsx on lines 60..70
public/components/SetupForm.jsx on lines 72..82
public/components/SignUpForm.jsx on lines 53..63
public/components/SignUpForm.jsx on lines 65..75
public/components/WeddingProfileForm.jsx on lines 129..139

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function exports has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = ({ express, secure }) => {
  const router = new express.Router();

  router
    .route('/')
Severity: Minor
Found in server/routes/api/weddingPartyMember.js - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

        <TextField
          name="password"
          type="password"
          floatingLabelText="Password"
          value={password}
Severity: Major
Found in public/components/SignUpForm.jsx and 13 other locations - About 1 hr to fix
public/components/GiverDetailsForm.jsx on lines 85..95
public/components/LoginForm.jsx on lines 43..53
public/components/LoginForm.jsx on lines 55..65
public/components/ProfileForm.jsx on lines 42..52
public/components/ProfileForm.jsx on lines 54..64
public/components/ProfileForm.jsx on lines 66..76
public/components/ResetPasswordForm.jsx on lines 42..52
public/components/ResetPasswordForm.jsx on lines 54..64
public/components/SetupForm.jsx on lines 48..58
public/components/SetupForm.jsx on lines 60..70
public/components/SetupForm.jsx on lines 72..82
public/components/SignUpForm.jsx on lines 65..75
public/components/WeddingProfileForm.jsx on lines 129..139

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

        <TextField
          name="password"
          type="password"
          floatingLabelText="Password"
          value={password}
Severity: Major
Found in public/components/ResetPasswordForm.jsx and 13 other locations - About 1 hr to fix
public/components/GiverDetailsForm.jsx on lines 85..95
public/components/LoginForm.jsx on lines 43..53
public/components/LoginForm.jsx on lines 55..65
public/components/ProfileForm.jsx on lines 42..52
public/components/ProfileForm.jsx on lines 54..64
public/components/ProfileForm.jsx on lines 66..76
public/components/ResetPasswordForm.jsx on lines 54..64
public/components/SetupForm.jsx on lines 48..58
public/components/SetupForm.jsx on lines 60..70
public/components/SetupForm.jsx on lines 72..82
public/components/SignUpForm.jsx on lines 53..63
public/components/SignUpForm.jsx on lines 65..75
public/components/WeddingProfileForm.jsx on lines 129..139

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

          <TextField
            name="coverImageUrl"
            type="url"
            floatingLabelText="Cover Image Url"
            value={coverImageUrl}
Severity: Major
Found in public/components/WeddingProfileForm.jsx and 13 other locations - About 1 hr to fix
public/components/GiverDetailsForm.jsx on lines 85..95
public/components/LoginForm.jsx on lines 43..53
public/components/LoginForm.jsx on lines 55..65
public/components/ProfileForm.jsx on lines 42..52
public/components/ProfileForm.jsx on lines 54..64
public/components/ProfileForm.jsx on lines 66..76
public/components/ResetPasswordForm.jsx on lines 42..52
public/components/ResetPasswordForm.jsx on lines 54..64
public/components/SetupForm.jsx on lines 48..58
public/components/SetupForm.jsx on lines 60..70
public/components/SetupForm.jsx on lines 72..82
public/components/SignUpForm.jsx on lines 53..63
public/components/SignUpForm.jsx on lines 65..75

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  it('should render a <UserList /> component', () => {
    const wrapper = shallow(<UsersPage {...props} />);

    expect(wrapper.find('UserList').length).toBe(1);
  });
Severity: Major
Found in public/containers/UsersPage/index.test.jsx and 2 other locations - About 1 hr to fix
public/components/BasketSummary/index.test.jsx on lines 50..54
public/containers/UsersPage/index.test.jsx on lines 81..85

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  onDelete = () => {
    if (!confirm('Are you sure you want to delete this gift set?')) {
      return;
    }

Severity: Major
Found in public/containers/GiftSetPage.jsx and 2 other locations - About 1 hr to fix
public/containers/GiftSetPage.jsx on lines 102..109
public/containers/GiftSetPage.jsx on lines 111..118

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

const isLoading = (state: boolean = false, action: ActionType) => {
  switch (action.type) {
    case LOAD_USERS_REQUEST:
      return true;
    case LOAD_USERS_SUCCESS:
Severity: Major
Found in public/redux/users.js and 2 other locations - About 1 hr to fix
public/redux/users.js on lines 47..57
public/redux/users.js on lines 59..69

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  render() {
    const { isAuthenticated, user, children, width } = this.props;
    const { navDrawerOpen } = this.state;
    let docked = false;

Severity: Minor
Found in public/containers/AdminLoggedIn.jsx - About 1 hr to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            <TextField
              name="title"
              floatingLabelText="Title"
              value={weddingPartyMember.title}
              onChange={onChange}
    Severity: Major
    Found in public/components/WeddingPartyMemberForm.jsx and 1 other location - About 1 hr to fix
    public/components/WeddingPartyMemberForm.jsx on lines 48..57

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    if (process.env.NODE_ENV === 'production') {
      module.exports = require('./configureStore.prod'); // eslint-disable-line global-require
    } else {
      module.exports = require('./configureStore.dev'); // eslint-disable-line global-require
    }
    Severity: Major
    Found in public/store/configureStore.js and 1 other location - About 1 hr to fix
    public/containers/Root/index.jsx on lines 3..7

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      onMarkAsDetailsSent = () => {
        if (!confirm('Are you sure you want to mark this gift set as details sent?')) {
          return;
        }
    
    
    Severity: Major
    Found in public/containers/GiftSetPage.jsx and 2 other locations - About 1 hr to fix
    public/containers/GiftSetPage.jsx on lines 111..118
    public/containers/GiftSetPage.jsx on lines 120..127

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      onMarkAsPaid = () => {
        if (!confirm('Are you sure you want to mark this gift as paid?')) {
          return;
        }
    
    
    Severity: Major
    Found in public/containers/GiftSetPage.jsx and 2 other locations - About 1 hr to fix
    public/containers/GiftSetPage.jsx on lines 102..109
    public/containers/GiftSetPage.jsx on lines 120..127

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    const isDeleting = (state: boolean = false, action: ActionType) => {
      switch (action.type) {
        case DELETE_USER_REQUEST:
          return true;
        case DELETE_USER_SUCCESS:
    Severity: Major
    Found in public/redux/users.js and 2 other locations - About 1 hr to fix
    public/redux/users.js on lines 35..45
    public/redux/users.js on lines 47..57

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            <TextField
              name="name"
              floatingLabelText="Name"
              value={weddingPartyMember.name}
              onChange={onChange}
    Severity: Major
    Found in public/components/WeddingPartyMemberForm.jsx and 1 other location - About 1 hr to fix
    public/components/WeddingPartyMemberForm.jsx on lines 59..68

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    if (process.env.NODE_ENV === 'production') {
      module.exports = require('./index.prod'); // eslint-disable-line global-require
    } else {
      module.exports = require('./index.dev'); // eslint-disable-line global-require
    }
    Severity: Major
    Found in public/containers/Root/index.jsx and 1 other location - About 1 hr to fix
    public/store/configureStore.js on lines 3..7

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    const isSaving = (state: boolean = false, action: ActionType) => {
      switch (action.type) {
        case CREATE_USER_REQUEST:
          return true;
        case CREATE_USER_SUCCESS:
    Severity: Major
    Found in public/redux/users.js and 2 other locations - About 1 hr to fix
    public/redux/users.js on lines 35..45
    public/redux/users.js on lines 59..69

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

          wrap(function* createGiftSet(req, res) {
            req.checkBody('giver').notEmpty();
            req.checkBody('giver.forename').notEmpty();
            req.checkBody('giver.surname').notEmpty();
            req.checkBody('giver.email').isEmail();
    Severity: Minor
    Found in server/routes/api/giftSet.js - About 1 hr to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      export function loadGiftSet(id) {
        return {
          [CALL_API]: {
            endpoint: `giftSet/${id}`,
            method: HTTP_METHODS.GET,
      Severity: Major
      Found in public/actions/giftSet.js and 1 other location - About 1 hr to fix
      public/actions/signUp.js on lines 8..16

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 58.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          query: ((query: QueryConfig | string, callback?: QueryCallback) => Query) & ((text: string, values: Array<any>, callback?: QueryCallback) => Query),
      Severity: Major
      Found in flow-typed/npm/pg_v6.x.x.js and 1 other location - About 1 hr to fix
      flow-typed/npm/pg_v6.x.x.js on lines 238..238

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 58.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language