Skip to content

How can i run tests before commit using lint-staged and react-scripts? #2336

Closed
@romankurakin

Description

@romankurakin

Curently have

  "devDependencies": {
    "husky": "^0.13.3",
    "lint-staged": "^3.4.2",
    "prettier": "^1.3.1",
    "react-scripts": "1.0.5"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "precommit": "lint-staged"
  },
  "lint-staged": {
    "src/**/*.js": [
      "prettier",
      "git add"
    ]
  }
}

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