@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

1,284

Version

3.3.0

License

MIT

Unpacked Size

5.56 kB

Total Files

3

Last publish

Collaborators

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