championswimmer/vuex-module-decorators

View on GitHub
src/action.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function actionDecoratorFactory has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function actionDecoratorFactory<T>(params?: ActionDecoratorParams): MethodDecorator {
  const { commit = undefined, rawError = !!config.rawError, root = false } = params || {}
  return function (target: Object, key: string | symbol, descriptor: TypedPropertyDescriptor<any>) {
    const module = target.constructor as Mod<T, any>
    if (!module.hasOwnProperty('actions')) {
Severity: Minor
Found in src/action.ts - About 1 hr to fix

    Function action has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        const action: Act<typeof target, any> = async function (
          context: ActionContext<typeof target, any>,
          payload: Payload
        ) {
          try {
    Severity: Minor
    Found in src/action.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status