drupal-mode icon indicating copy to clipboard operation
drupal-mode copied to clipboard

Use eslint for JavaScript

Open arnested opened this issue 12 years ago • 2 comments
trafficstars

Use flymake-jshint.el for JavaScript.

JSHint will be officially used as coding standard for JavaScript in Drupal 8. See http://atendesigngroup.com/blog/looking-at-drupal-8-javascript-changes.

arnested avatar Jan 12 '13 22:01 arnested

ESLint is the official linting tool for Drupal 8 now (see #2274223) so we should probably use that instead (although there is now flymake-eslint.el (yet).

arnested avatar Jul 28 '14 22:07 arnested

Theres ESLint support in flycheck, it just requires one to disable the jshint checker.

The question is whether to just disable jshint buffer locally for Drupal js files, and assume that eslint is available, or do it the proper way and detect whether eshint is installed and only disable jshint in that case. The latter is more proper, but the former is probably easier.

Though flycheck has flycheck-may-use-checker which can tell us whether a checker may be used in the current buffer, which should make it fairly easy to fix up the flycheck-disabled-checkers in some hook.

xendk avatar Jul 29 '14 09:07 xendk