77
88(require 'lazyflymake-sdk )
99
10+ (defcustom lazyflymake-eslint-args '(" --format" " unix" )
11+ " Arguments of eslint cli."
12+ :group 'lazyflymake
13+ :type '(repeat string))
14+
1015(defun lazyflymake-eslint-err-line-pattern ()
1116 " Return error line pattern.
1217If return a list containing patterns, `flymake-proc-err-line-patterns' uses the
@@ -20,7 +25,6 @@ If return nil, nothing need be done."
2025 (let* ((dir (locate-dominating-file default-directory " node_modules" ))
2126 (local-eslint (concat dir " node_modules/.bin/eslint" ))
2227 (program (if (file-exists-p local-eslint) local-eslint " eslint" ))
23- (eslint-args '(" --format" " unix" ))
2428 file
2529 ; ; use babel?
2630 (babelrc (lazyflymake-sdk-find-dominating-file '(" babel.config.json" " .babelrc.json" " babel.config.js" ))))
@@ -30,12 +34,13 @@ If return nil, nothing need be done."
3034
3135 ; ; use locale babel configuration file
3236 (when babelrc
33- (push (format " {babelOptions:{configFile:'%s '}} " (file-truename babelrc)) eslint-args)
34- (push " --parser-options" eslint-args))
37+ (push (format " {babelOptions:{configFile:'%s '}} " (file-truename babelrc))
38+ lazyflymake-eslint-args)
39+ (push " --parser-options" lazyflymake-eslint-args))
3540
3641 (lazyflymake-sdk-generate-flymake-init
3742 program
38- eslint-args
43+ lazyflymake- eslint-args
3944 file))))
4045
4146(provide 'lazyflymake-eslint )
0 commit comments