eslint-plugin-fixclosure
this is a eslint plugin for fixclosure.
Installation
You'll first need to install ESLint and fixclosure:
$ npm i eslint fixclosure --save-dev
Next, install eslint-plugin-fixclosure
:
$ npm install eslint-plugin-fixclosure --save-dev
Usage
Add fixclosure
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"fixclosure"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"fixclosure/fixclosure": "error"
}
}
Supported Rules
fixclosure/fixclosure
A rule to test whether the code is compatible with fixclosure
or not.
This rule supports --fix
option, so you no longer write goog.require(...)
manually
You can pass the following options to fixclosure
.
-
depsJs
-
deps.js
files, which is a comma separated list.
-
-
config
- a path for
.fixclosurerc
.
- a path for
-
provideRoots
- root namespaces you use.
-
useForwardDeclare
- Use
goog.forwardDeclare()
instead ofgoog.requireType()
- Use
You can see the details on the documentation of fixclosure
.