3

私は spacemacs を初めて使用し、https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bframeworks/reactのガイドに従っています 。

eslinter がローカルの .eslintrc を使用しないことを除いて、すべてがうまく機能します。

Atom エディター、Sublime Text 3、VSCode で動作します。どうしてか分かりません。

誰でも私を助けることができますか?

ありがとう。

4

2 に答える 2

2

を見つけるには、発射物 (spacemacs に既に含まれています) を使用するだけ.eslintrcです。

(defun codefalling//reset-eslint-rc ()
    (let ((rc-path (if (projectile-project-p)
                       (concat (projectile-project-root) ".eslintrc"))))
      (if (file-exists-p rc-path)
          (progn
            (message rc-path)
          (setq flycheck-eslintrc rc-path)))))    

(add-hook 'flycheck-mode-hook 'codefalling//reset-eslint-rc)
于 2016-09-11T09:29:05.340 に答える