weareopensource/Vue

View on GitHub

Showing 12 of 37 total issues

Function actions has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const actions = (app) => {
  const config = app.config.globalProperties.config;
  const api = `${config.api.protocol}://${config.api.host}:${config.api.port}/${config.api.base}`;
  return {
    getTeam: async ({ commit }) => {
Severity: Major
Found in src/modules/home/stores/home.store.js - About 2 hrs to fix

    Function actions has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const actions = (app) => {
      const config = app.config.globalProperties.config;
      const api = `${config.api.protocol}://${config.api.host}:${config.api.port}/${config.api.base}`;
      return {
        signin: async ({ commit, dispatch }, params) => {
    Severity: Major
    Found in src/modules/auth/stores/auth.store.js - About 2 hrs to fix

      Function actions has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

      const actions = (app) => {
        return {
          refreshNav: ({ commit, rootGetters }) => {
            const userRoles = localStorage.getItem(`${config.cookie.prefix}UserRoles`)
              ? localStorage.getItem(`${config.cookie.prefix}UserRoles`).split(',')
      Severity: Minor
      Found in src/modules/core/stores/core.store.js - About 2 hrs 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

      Function style has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

      export const style = (kind, object) => {
        const style = {};
        if (object && object.style && object.style[kind]) {
          // background
          if (object.style[kind].background) {
      Severity: Minor
      Found in src/lib/helpers/theme.js - About 2 hrs 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

      Function actions has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const actions = (app) => {
        const config = app.config.globalProperties.config;
        const api = `${config.api.protocol}://${config.api.host}:${config.api.port}/${config.api.base}`;
      
        return {
      Severity: Minor
      Found in src/modules/tasks/stores/tasks.store.js - About 1 hr to fix

        Function install has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          install: (app) => {
            app.component('v-gravatar', {
              props: {
                email: {
                  type: String,
        Severity: Minor
        Found in src/lib/plugins/gravatar.js - About 1 hr to fix

          Function actions has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const actions = (app) => {
            const config = app.config.globalProperties.config;
            const api = `${config.api.protocol}://${config.api.host}:${config.api.port}/${config.api.base}`;
            return {
              getUsers: async ({ commit }, params) => {
          Severity: Minor
          Found in src/modules/users/stores/users.store.js - About 1 hr to fix

            Function actions has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

            const actions = (app) => {
              const config = app.config.globalProperties.config;
              const api = `${config.api.protocol}://${config.api.host}:${config.api.port}/${config.api.base}`;
            
              return {
            Severity: Minor
            Found in src/modules/tasks/stores/tasks.store.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

            Function actions has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

            const actions = (app) => {
              const config = app.config.globalProperties.config;
              const api = `${config.api.protocol}://${config.api.host}:${config.api.port}/${config.api.base}`;
              return {
                signin: async ({ commit, dispatch }, params) => {
            Severity: Minor
            Found in src/modules/auth/stores/auth.store.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

            Function actions has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

            const actions = (app) => {
              const config = app.config.globalProperties.config;
              const api = `${config.api.protocol}://${config.api.host}:${config.api.port}/${config.api.base}`;
              return {
                getTeam: async ({ commit }) => {
            Severity: Minor
            Found in src/modules/home/stores/home.store.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

            Function actions has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

            const actions = (app) => {
              const config = app.config.globalProperties.config;
              const api = `${config.api.protocol}://${config.api.host}:${config.api.port}/${config.api.base}`;
              return {
                getUsers: async ({ commit }, params) => {
            Severity: Minor
            Found in src/modules/users/stores/users.store.js - About 45 mins 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

            Function install has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

              install: (app) => {
                app.config.globalProperties.setImages = (api, file, size, operation) => {
                  const base = file.split('.');
                  if (base.length !== 2) return file;
                  let [name] = base;
            Severity: Minor
            Found in src/lib/plugins/images.js - About 25 mins 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

            Severity
            Category
            Status
            Source
            Language