Skip to content

What is the best practice to use rustywind with jest ? #41

@puneetmakkar

Description

@puneetmakkar

Hi @praveenperera ,

Thanks for the great package.

We are using lint-staged and husky for pre-commit hooks.

rustywind changes the class order on changed files on commit and later jest test fails as snapshots have not been updated.
test failure causes the rustywind changes to be reverted.

any idea on how can we resolve the issue ?

"lint-staged": {
  "*.{js,jsx,ts,tsx}": [
    "rustywind --write",
    "cross-env CI=true react-scripts test --findRelatedTests"
  ]
},
"husky": {
  "hooks": {
    "pre-commit": "lint-staged",
    "post-commit": "git update-index -g"
  }
}

Thanks.

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