eslint-plugin-consistent-imports
Advanced tools
Comparing version 1.1.0 to 1.3.0
@@ -12,1 +12,2 @@ /** | ||
import mySpecialPackage from './path/to/my-special-package.js'; | ||
console.log(mySpecialPackage); |
{ | ||
"name": "eslint-plugin-consistent-imports", | ||
"version": "1.1.0", | ||
"version": "1.3.0", | ||
"description": "ESLint rules to enforce consistent variable names for default imports.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,2 +5,23 @@ # eslint-plugin-consistent-imports | ||
```javascript | ||
valid: [ | ||
`import foo from './path/to/foo.js';`, | ||
`import myTest from './path/to/myTest.js';`, | ||
`import myClass from './path/to/my-class.js';`, | ||
`import myPackage from 'my-package'`, | ||
`import myZip2 from 'my-zip2'`, | ||
] | ||
... | ||
invalid: [ | ||
`import bar from './path/to/foo.js';`, | ||
// ✅ import foo from './path/to/foo.js'; | ||
`import bar from 'my-awesome-package';` | ||
// ✅ import myAwesomePackage from 'my-awesome-package'; | ||
`import bar from './path/to/an-awesome-file.js';` | ||
// ✅ import anAwesomeFile from './path/to/an-awesome-file.js'; | ||
] | ||
``` | ||
## Installation | ||
@@ -7,0 +28,0 @@ |
@@ -14,5 +14,4 @@ /** | ||
const rule = require('../../../lib/rules/default-variable-match-filename'); | ||
const RuleTester = require('eslint').RuleTester; | ||
const { camelCaseError } = require('../../../lib/camelCase'); | ||
const RuleTester = require('eslint').RuleTester; | ||
@@ -19,0 +18,0 @@ RuleTester.setDefaultConfig({ |
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
9295
153
72