@s-ui/precommit

3.3.0 • Public • Published

sui-precommit

Effortless SUI precommit rules integration in your project

Installs git hooks to ensure quality rules are executed before any commit (test, linting, consistent commit, etc).

It provides:

  • Assurance that all code is compliant with Adevinta's standards.
  • Centralize precommit rule: quality rules can be improved and seemlessly inherited by all projects.

Installation

$ npm install @s-ui/precommit --save-dev

CLI

$ sui-precommit

Installs git hooks. This command is executed automatically when you install @s-ui/precommit as dependency thanks to a postinstall npm hook.

Executes 3 actions:

  1. Add commit-msg, pre-commit, and pre-push hooks to the .git/hooks folder.
  2. Add pre-commit and pre-push npm scripts to the package.json.
  3. Add lint and test npm scripts in case they're not present. Note: If scripts are already present, it doesn't overwrite them (as some packages might not need executing sui-lint sass or sui-lint js or you could have a specific config).

Your package.json might be altered like that:

{
  "scripts": {
    "lint": "sui-lint js && sui-lint sass",
    "test": "echo \"Error: no test specified\" && exit 1",
    "pre-commit": "npm run lint",
    "pre-push": "npm run test"
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @s-ui/precommit

Weekly Downloads

2,731

Version

3.3.0

License

MIT

Unpacked Size

5.56 kB

Total Files

3

Last publish

Collaborators

  • sergi.martinez.adevinta
  • arnau.guell
  • miriam-gil
  • andresin87.adevinta
  • alfredo.narvaez
  • sendami.luque.ext
  • sebastian.badea.adevinta
  • thomas.page.ext
  • victoria.pasichnyk.ext
  • daniel.perez.ext
  • albert.peiro
  • frandelacasa-adevinta
  • mariapaula.forero.ext
  • hpintos_adevinta
  • sziauberyte
  • victor.perez.adevinta
  • oscar-raig-adevinta
  • carlos.gonzalezl
  • carolina.mallo.ext
  • david.nieto
  • ferran.simon
  • sergi.quintela
  • jamile.radloff
  • xavi_ballestar
  • luz_adv
  • ignacio.rodriguez
  • carlosvillu-adevinta
  • diegomr
  • arturo.vicente
  • adria.velardos
  • emiliovz
  • dann41
  • ruben-martin
  • pol.valls
  • cristina.rodriguez.duque
  • sergio.escano
  • marc.benito
  • azahara
  • patricio.sartore
  • giovanny.sayas.ext
  • david.cuadrado.ext
  • alex.castells
  • beatrizip
  • pablo.rey-adevinta
  • sergiocollado
  • cristhianb
  • alisa_bayanova
  • davidmartin2108
  • ferrangbtw
  • estefania_garcia
  • belen.santos
  • alfredo.arronte
  • joanleon-adv
  • luis-garrido
  • aitor.rodriguez
  • jordi.munoz
  • oscar_ramirez
  • ignacio_navarro
  • a.ferrer
  • gfabregoadv
  • izeller
  • salvador.juan
  • ivanmlaborda
  • alejandro.ferrante
  • pa.chruscinski.ext
  • isabelgomez87
  • jenifer.lopez
  • pablogs
  • javier.miguel
  • oscar.gomez
  • marian.lucaci
  • alverd004
  • oriol.puig
  • nacho_torrella
  • xavi.murcia
  • javiauso
  • alfredo.zimperz
  • francisco.ruiz.lloret
  • andresadv
  • schibstedspain