Skip to content

laurens-dg/pre-commit-stylelint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pre-commit hook for Stylelint + styled-components / emotion

This is the Stylelint hook for pre-commit. This prevents git commits unless the checks pass.

Using stylelint with pre-commit

  • To use this you first need to install pre-commit(see links below).
  • Then create a pre-commit config file and also a stylelint config file in the root of your project.
  • Run pre-commit install from the root of your project

Finally add this to your .pre-commit-config.yaml:

  - repo: https://github.com/laurens-dg/pre-commit-stylelint
    rev: '0.2.1'
    hooks:
      - id: stylelint
        additional_dependencies:
        - stylelint@13.13.1
        - stylelint-prettier@1.1.2
        - stylelint-config-standard@22.0.0

Links