Skip to content

orzechowskid/flymake-stylelint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

flymake-stylelint

Flymake backend for CSS and friends using stylelint

Installation

  1. Make sure stylelint is installed and present on your emacs exec-path. For Linux systems exec-path usually equals your $PATH environment variable; for other systems, you're on your own.
  2. Install: download and place inside ~/.emacs.d/lisp. then edit ~/.emacs or equivalent:
(add-to-list 'load-path "~/.emacs.d/lisp")
(require "flymake-stylelint.el")
  1. Enable:
(add-hook 'scss-mode-hook ; or whatever the mode-hook is for your mode of choice
  (lambda ()
    (flymake-stylelint-enable)))

Customization

useful variables are members of the flymake-stylelint group and can be viewed and modified with the command M-x customize-group [RET] flymake-stylelint [RET].

(defcustom flymake-stylelint-executable-name "stylelint"
  "Name of executable to run when checker is called.  Must be present in variable `exec-path'."
  :type 'string
  :group 'flymake-stylelint)

(defcustom flymake-stylelint-executable-args nil
  "Extra arguments to pass to stylelint."
  :type 'string
  :group 'flymake-stylelint)

(defcustom flymake-stylelint-show-rule-name t
  "Set to t to append rule name to end of warning or error message, nil otherwise."
  :type 'boolean
  :group 'flymake-stylelint)

(defcustom flymake-stylelint-defer-binary-check nil
  "Set to t to bypass the initial check which ensures stylelint is present.

Useful when the value of variable `exec-path' is set dynamically and the location of stylelint might not be known ahead of time."
  :type 'boolean
  :group 'flymake-stylelint)

See Also

flymake-eslint

License

MIT