0.0.7 • Published 9 years ago
eslint-plugin-apidoc v0.0.7
eslint-plugin-apidoc
lint apidoc.json using API style rules (see http://apidoc.me/)
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-apidoc:
$ npm install eslint-plugin-apidoc --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-apidoc globally.
Usage
Add apidoc to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"apidoc"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"apidoc/rule-name": 2
}
}Finally be sure to include your apidoc.json file when running eslint:
eslint apidoc.jsonSupported Rules
base-url- validates that a valid base_url is specified- options can be used to force a domain (
[{"domain": "mydomain.com"}]) (any subdomain is allowed)
- options can be used to force a domain (
contact- validates contact (valid name and email)description- validates a description exists for the API and for all resources.
For adding new rules, check rules README