coffeelint
coffeelint documentation
- Version in MegaLinter: 5.2.11
- Visit Official Web Site
- See How to configure coffeelint rules
- If custom
.coffee-lint.json
config file isn't found, .coffee-lint.json will be used
- If custom
- See How to disable coffeelint rules in files
- See Index of problems detected by coffeelint
Configuration in MegaLinter
- Enable coffeelint by adding
COFFEE_COFFEELINT
in ENABLE_LINTERS variable - Disable coffeelint by adding
COFFEE_COFFEELINT
in DISABLE_LINTERS variable
Variable | Description | Default value |
---|---|---|
COFFEE_COFFEELINT_ARGUMENTS | User custom arguments to add in linter CLI call Ex: -s --foo "bar" |
|
COFFEE_COFFEELINT_COMMAND_REMOVE_ARGUMENTS | User custom arguments to remove from command line before calling the linter Ex: -s --foo "bar" |
|
COFFEE_COFFEELINT_FILTER_REGEX_INCLUDE | Custom regex including filter Ex: (src\|lib) |
Include every file |
COFFEE_COFFEELINT_FILTER_REGEX_EXCLUDE | Custom regex excluding filter Ex: (test\|examples) |
Exclude no file |
COFFEE_COFFEELINT_CLI_LINT_MODE | Override default CLI lint mode - file : Calls the linter for each file- project : Call the linter from the root of the project |
file |
COFFEE_COFFEELINT_FILE_EXTENSIONS | Allowed file extensions. "*" matches any extension, "" matches empty extension. Empty list excludes all filesEx: [".py", ""] |
[".coffee"] |
COFFEE_COFFEELINT_FILE_NAMES_REGEX | File name regex filters. Regular expression list for filtering files by their base names using regex full match. Empty list includes all files Ex: ["Dockerfile(-.+)?", "Jenkinsfile"] |
Include every file |
COFFEE_COFFEELINT_PRE_COMMANDS | List of bash commands to run before the linter | None |
COFFEE_COFFEELINT_POST_COMMANDS | List of bash commands to run after the linter | None |
COFFEE_COFFEELINT_UNSECURED_ENV_VARIABLES | List of env variables explicitly not filtered before calling COFFEE_COFFEELINT and its pre/post commands | None |
COFFEE_COFFEELINT_CONFIG_FILE | coffeelint configuration file nameUse LINTER_DEFAULT to let the linter find it |
.coffee-lint.json |
COFFEE_COFFEELINT_RULES_PATH | Path where to find linter configuration file | Workspace folder, then MegaLinter default rules |
COFFEE_COFFEELINT_DISABLE_ERRORS | Run linter but consider errors as warnings | false |
COFFEE_COFFEELINT_DISABLE_ERRORS_IF_LESS_THAN | Maximum number of errors allowed | 0 |
COFFEE_COFFEELINT_CLI_EXECUTABLE | Override CLI executable | ['coffeelint'] |
IDE Integration
Use coffeelint in your favorite IDE to catch errors before MegaLinter !
IDE | Extension Name | Install | |
---|---|---|---|
Atom | linter-coffeelint | Visit Web Site | |
IDEA | coffeelint |
MegaLinter Flavours
This linter is available in the following flavours
Flavor | Description | Embedded linters | Info | |
---|---|---|---|---|
all | Default MegaLinter Flavor | 121 | ||
dotnetweb | Optimized for C, C++, C# or VB based projects with JS/TS | 73 | ||
javascript | Optimized for JAVASCRIPT or TYPESCRIPT based projects | 60 |
Behind the scenes
How are identified applicable files
- File extensions:
.coffee
How the linting is performed
- coffeelint is called one time by identified file (
file
CLI lint mode)
Example calls
coffeelint myfile.coffee
coffeelint -f .coffee-lint.json myfile.coffee
Help content
Usage: coffeelint [options] source [...]
Options:
-f, --file Specify a custom configuration file.
--rules Specify a custom rule or directory of rules.
--makeconfig Prints a default config file [boolean]
--trimconfig Compares your config with the default and prints a minimal
configuration [boolean]
--noconfig Ignores any config file. [boolean]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
-r (not used, but left for backward compatibility) [boolean]
--reporter built in reporter (default, csv, jslint, checkstyle, raw),
or module, or path to reporter file.
--csv [deprecated] use --reporter csv [boolean]
--jslint [deprecated] use --reporter jslint [boolean]
--nocolor [deprecated] use --color=never [boolean]
--checkstyle [deprecated] use --reporter checkstyle [boolean]
--color=<when> When to colorize the output. <when> can be one of always,
never , or auto.
-s, --stdin Lint the source from stdin [boolean]
-q, --quiet Only print errors. [boolean]
--literate Used with --stdin to process as Literate CoffeeScript
[boolean]
-c, --cache Cache linting results [boolean]
--ext Specify an additional file extension, separated by comma.
Installation on mega-linter Docker image
- NPM packages (node.js):