LoginSignup
14
15

More than 5 years have passed since last update.

flycheck で coffeelint の設定をカスタマイズする方法

Posted at

前提: Emacs で flycheck を導入しており、 coffeelint による CoffeeScript のシンタックスチェックを設定済みであること。

coffeelint は -f オプションで独自の設定ファイルを渡し、特定の設定を上書きできる(例: max_line_length のチェックは無視したい、とか)

coffeelint --makeconfig で標準出力にデフォルトの設定を吐き出してくれるのでファイルに保存して必要な部分だけ編集すると便利。

$ coffeelint --makeconfig > .coffeelint.json
$ coffeelint -f .coffeelint.json foo.coffee

flycheck-coffeelintrc という変数に、 coffeelint -f に渡されるファイル名を指定できる。デフォルトで .coffeelint.json が設定済み(っぽい?)ので、 .coffeelint.json というファイル名で設定を保存しておけば何もしなくてよい。

例: max_line_length の警告は無視する .coffeelint.json (level: ignore にすると無視)

$ cat .coffeelint.json
{
    "max_line_length": {
        "value": 80,
        "level": "ignore"
    }
}
14
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
15