eslint-plugin-import
Advanced tools
Comparing version 0.3.12 to 0.3.13
exports.rules = { | ||
"exists": require("./lib/rules/exists"), | ||
"no-unresolved": require("./lib/rules/no-unresolved"), | ||
"named": require("./lib/rules/named"), | ||
@@ -10,7 +10,9 @@ "default": require("./lib/rules/default"), | ||
"no-common": require("./lib/rules/no-common"), | ||
"no-errors": require("./lib/rules/no-errors") | ||
"no-errors": require("./lib/rules/no-errors"), | ||
"exists": require("./lib/rules/no-unresolved") | ||
}; | ||
exports.rulesConfig = { | ||
"exists": 2, | ||
"no-unresolved": 2, | ||
"named": 2, | ||
@@ -17,0 +19,0 @@ "namespace": 2, |
{ | ||
"name": "eslint-plugin-import", | ||
"version": "0.3.12", | ||
"version": "0.3.13", | ||
"description": "Import with sanity.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,3 +10,3 @@ eslint-plugin-import | ||
* Ensure imports point to a file/module that exists. ([`exists`](#exists)) | ||
* Ensure imports point to a file/module that can be resolved. ([`no-unresolved`](#no-unresolved)) | ||
* Ensure named imports correspond to a named export in the remote file. ([`named`](#named)) | ||
@@ -20,5 +20,6 @@ * Ensure a default export is present, given a default import. ([`default`](#default)) | ||
### `exists` | ||
### `no-unresolved` | ||
Ensures an imported module exists, as defined by standard Node `require.resolve` behavior. | ||
Ensures an imported module can be resolved to a module on the local filesystem, | ||
as defined by standard Node `require.resolve` behavior. | ||
@@ -29,3 +30,4 @@ ### `named` | ||
Note that if there are _no_ named exports, nor a default export, this rule will not report a mismatch, to allow Babel-style `import` of CommonJS modules. | ||
Note that if there are _no_ named exports, nor a default export, this rule will | ||
not report a mismatch, to allow Babel-style `import` of CommonJS modules. | ||
@@ -36,7 +38,10 @@ Provide the `es6-only` option in your rule config if you would like to enforce this on all imports. | ||
If a default import is requested, this rule will report if there is no default export in the imported module. | ||
If a default import is requested, this rule will report if there is no default | ||
export in the imported module. | ||
Note that if there are _no_ named exports, nor a default export, this rule will not report a mismatch, to allow Babel-style `import` of CommonJS modules. | ||
Note that if there are _no_ named exports, nor a default export, this rule will | ||
not report a mismatch, to allow Babel-style `import` of CommonJS modules. | ||
Provide the `es6-only` option in your rule config if you would like to enforce this on all imports. | ||
Provide the `es6-only` option in your rule config if you would like to enforce | ||
this on all imports. | ||
@@ -63,1 +68,9 @@ ### `no-common` | ||
Will also report shadowing (i.e. redeclaration as a variable, function, or parameter); | ||
## Debugging | ||
### `no-errors` | ||
Reports on errors in the attempt to parse the imported module for exports. | ||
Primarily useful for determining why imports are not being reported properly by the other rules. | ||
Pass `include-messages` as an option to include error descriptions in the report. |
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
31669
721
72