CoffeeLint

CoffeeLint is a style checker that helps keep CoffeeScript code clean and consistent.

Version

1.16.0

Runtime

CoffeeScript 1.10.0 Node.js v6.9.5 npm 3.10.10

Supported Languages

CoffeeScript

Official Documentation

http://www.coffeelint.org/

YAML Configuration

coffeelint:

  • input:

    Patterns to include in execution and reports.

  • ignore:

    Patterns to exclude from execution and reports.

  • auto-fix:

    N/A

  • config-file:

    Alias of --file option.

  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.25 CPU with 960 MiB RAM.

  • options:

    Below is the list of options that are supported:

    -f, --file      Specify a custom configuration file.
    --rules         Specify a custom rule or directory of rules.
    --ext           Specify an additional file extension, separated by comma.
  • thresholds:

    • num-issues:

      In addition to general severity levels, the following tool specific severity levels can be specified:

      • warn (equivalent to general severity level warning)
  • experimental:

    • incremental:

      true/false

      Note: The incremental analysis is disabled if any kinds of configuration files are changed. The files recognized as configuration files are as follows:

      • Configuration files:
        • Files specified in config-file field
        • Files specified to -f, --file options
        • If none of the above configuration files are found:
          • **/coffeelint.json, **/package.json
      • Rule files:

        • <rulesdir>/**/*.js, <rulesdir>/**/*.coffee, <rulesdir>/**/*.litcoffee, <rulesdir>/**/*.coffee.md where <rulesdir> is one the directories specified to --rules option
      • Ignore files:

        • .coffeelintignore at the repository root

YAML Examples

  • With default options:

    inspecode:
      coffeelint: default
  • With custom machine:

    inspecode:
      coffeelint:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
  • With custom options:

    inspecode:
      coffeelint:
        options:
          --rules: ./myrules
  • With a configuration file:

    inspecode:
      coffeelint:
        config-file: ./my-coffeelint.json

    The above configuration is equivalent to:

    inspecode:
      coffeelint:
        options:
          -f: ./my-coffeelint.json

Configuration File Detection

If no configuration files are specified via config-file or options field, Inspecode first lets CoffeeLint to find configuration files in your repository. See http://www.coffeelint.org/#usage about how CoffeeLint looks for configuration files.

In addition, if CoffeeLint cannot find any configuration files, Inspecode also walks the file tree in lexical order in your repository to find a configuration file named coffeelint.json and specifies the file first found to CoffeeLint automatically via --file option.

Note: Inspecode ignores specific configuration files while searching. See Configuration > Tool Configuration > Field: config-file for detail.

If the configuration file detected by Inspecode is not the one you want to use or you do not want to use any configuration files, you can disable Inspecode from detecting configuration files by explicitly setting an empty string to config-file field like below:

inspecode:
  coffeelint:
    config-file: ""

results matching ""

    No results matching ""