Skip to content

Add code quality flow recomendations to DDD skils and developer agent #64

@LeoVS09

Description

@LeoVS09

Add rules how to follow immutable and top of control principles, for example:

Bad code

const result = {}
if(featureEnabled)
  applyNewFeature(result)

Bad code

let result = {}
if(featureEnabled)
  result = applyNewFeature(result)

Good code

const result = featureEnabled ? applyNewFeature(result) : {}

Bad code

const result = performProcess(param)
logResult(result)

Good code

const result = performProcess(param)
logger.log('Result of execution', formatResult(result))

Bad code

const result = performProcess(param)
validateResult(result) // -> throws Error(...)

Good Code

const result = performProcess(param)
if(!isValid(result))
  throw SomeError(result)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions