See : jshint and Javascript Lint
My javascript set up:-
(require 'js-beautify)
(add-to-list 'load-path "~/.emacs.d/jquery-doc")
(require 'jquery-doc)
(add-hook 'js2-mode-hook 'jquery-doc-setup)
(require 'flymake-jshint)
(add-hook 'js2-mode-hook
(lambda () (flymake-mode t)))
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
;; (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
(add-hook 'js2-mode-hook '(lambda () (js-beautify)(define-key js2-mode-map (kbd "M-t") (lambda()(interactive)(js-beautify)))(define-key js2-mode-map [(shift f10)] (lambda()(interactive)(jslint-thisfile)))))
;; javascript lint
(defun jslint-thisfile ()
(interactive)
(compile (format "jsl -process %s" (buffer-file-name))))
(defun jslint-thisfile-test ()
(interactive)
(compile (format "jsl -process %s" (buffer-file-name))))
(provide 'rgr-javascript)
All about the JavaScript was really interesting to know about.Ur blog made it quite interesting.Thank you !
ReplyDeleteAll about the JavaScript was really interesting to know about.Ur blog made it quite interesting.Thank you !
ReplyDeleteweb design company