Skip to content

Commit

Permalink
update cwd resolver (#32)
Browse files Browse the repository at this point in the history
* update cwd resolver

* wrap project-foo in featurep

* version bump

---------

Co-authored-by: Dan Orzechowski <daniel@aletheagroup.com>
  • Loading branch information
orzechowskid and Dan Orzechowski authored Oct 18, 2023
1 parent e76071e commit e30c9a1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions flymake-eslint.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; flymake-eslint.el --- A Flymake backend for Javascript using eslint -*- lexical-binding: t; -*-

;; Version: 1.6.0
;; Version: 1.7.0
;; Author: Dan Orzechowski
;; Contributor: Terje Larsen
;; URL: https://github.com/orzechowskid/flymake-eslint
Expand All @@ -26,7 +26,8 @@
;;;; Requirements

(require 'cl-lib)
(require 'project)
(when (featurep 'project)
(require 'project))
(when (featurep 'json)
(require 'json))

Expand Down Expand Up @@ -226,9 +227,12 @@ argument."
(when (process-live-p flymake-eslint--process)
(kill-process flymake-eslint--process))
(let ((default-directory
(if (project-current)
(project-root (project-current))
default-directory))
(or
flymake-eslint-project-root
(when (and (featurep 'project)
(project-current))
(project-root (project-current)))
default-directory))
(format-args
(if (flymake-eslint--use-json-p)
'("--format" "json")
Expand Down

0 comments on commit e30c9a1

Please sign in to comment.