eslint-plugin-nextcloud
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -20,1 +20,7 @@ /** | ||
module.exports.rules = requireIndex(__dirname + "/rules"); | ||
// import all environments in lib/environments | ||
module.exports.environments = requireIndex(__dirname + "/environments"); | ||
// import all configs in lib/configs | ||
module.exports.configs = requireIndex(__dirname + "/configs"); |
{ | ||
"name": "eslint-plugin-nextcloud", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Nextcloud lint plugin for ESLint", | ||
@@ -11,2 +11,4 @@ "keywords": [ | ||
"author": "Christoph Wurst", | ||
"homepage": "https://github.com/nextcloud/eslint-plugin-nextcloud", | ||
"repository": "git+https://github.com/nextcloud/eslint-plugin-nextcloud.git", | ||
"main": "lib/index.js", | ||
@@ -17,6 +19,6 @@ "scripts": { | ||
"dependencies": { | ||
"requireindex": "~1.1.0" | ||
"requireindex": "~1.2.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "~3.9.1", | ||
"eslint": "~5.16.0", | ||
"mocha": "^6.1.4" | ||
@@ -23,0 +25,0 @@ }, |
@@ -19,10 +19,19 @@ # eslint-plugin-nextcloud | ||
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-nextcloud` globally. | ||
## Usage | ||
Add `nextcloud` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: | ||
Add `plugin:nextcloud/recommended` to the `extends` section of your `.eslintrc` configuration file in order to use all recommended options (load estlint-plugin-nextcloud, add Nextcloud environment and add recommended rules): | ||
```json | ||
{ | ||
"extends": [ | ||
"plugin:nextcloud/recommended" | ||
] | ||
} | ||
``` | ||
Alternatively, you can activate only those parts that you want to use. In this case, you have to add `nextcloud` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: | ||
```json | ||
{ | ||
"plugins": [ | ||
@@ -35,8 +44,20 @@ "nextcloud" | ||
Then configure the rules you want to use under the rules section. | ||
Add the Nextcloud environment if you want to use global variables defined by Nextcloud server. | ||
```json | ||
{ | ||
"env": { | ||
"nextcloud/nextcloud": true, | ||
} | ||
} | ||
``` | ||
Configure the rules you want to use under the rules section. | ||
```json | ||
{ | ||
"rules": { | ||
"nextcloud/rule-name": 2 | ||
"nextcloud/no-deprecations": "warn", | ||
"nextcloud/no-removed-apis": "error", | ||
} | ||
@@ -46,9 +67,16 @@ } | ||
## Supported Rules | ||
## Supported Shared Configurations | ||
* Fill in provided rules here | ||
* `nextcloud/recommended`: Recommended configuration that loads the Nextcloud ESlint plugin, adds the Nextcloud environment and configures all recommended Nextcloud rules. | ||
## Supported Environments | ||
* `nextcloud/nextcloud`: Manifests global variables defined by Nextcloud server | ||
## Supported Rules | ||
* `nextcloud/no-deprecations`: Detects properties and functions that were deprecated in Nextcloud server | ||
* `nextcloud/no-removed-apis`: Detects previously available APIs that were removed from Nextcloud server | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
13903
12
260
1
80
+ Addedrequireindex@1.2.0(transitive)
- Removedrequireindex@1.1.0(transitive)
Updatedrequireindex@~1.2.0