lfeslint
v1.3.3
Published
Livefyre ES Linter
Downloads
1
Readme
LFESLINT
Overview
Linter for Livefyre Javascript projects
Install
Drop it into your package.json
or install via npm install git+ssh://[email protected]/Livefyre/lfeslint.git
Usage
Running lfeslint
will run the linter recurisvely in the current directory. It will skip certain directories by default.
To run on a certain path
lfeslint ./src
Command line options
-e --env Environment prefixes: browser, mocha, node, commonjs, es6 (defaults to all)
-F --fix Automatically fix some issues
-f --formatter Output results as different format types
-g --global Declare global variable
-v --version Show current version
-h, --help Show usage information
-i, --ignore Ignore certain paths
Ignoring Files
Certain paths - including node_modules/**
and *.min.js
- are ignored by default.
To add more directories to ignore, place the following in your package.json
"lfeslint": {
"ignore": [
"**/out/**",
"**/lib/select2/**",
"**/lib/ckeditor/**"
]
}
Hiding Warnings
This project uses ESlint
. All of the ESlint directives will work - for example: /*eslint-disable*/
Defining Globals in a project's package.json
Certain projects will need globals present to operate correctly.
{
"lfeslint": {
"global": ["var1", "Q"]
}
}
Configuring environments
A complete list of available environments can be found in the Specifying Environments
section of the ESLint docs.
{
"lfeslint": {
"env": ["mocha", "es6"]
}
}
Choosing a formatter
A complete list of available formatters can be found in the ESLint Formatters
section of the ESLint docs