eslint-plugin-consistent-imports
Advanced tools
Comparing version 1.12.0 to 1.13.0
@@ -34,2 +34,13 @@ /** | ||
const camelCaseSource = toCamelCase(node.source.value); | ||
/** | ||
* If import name is case-insensitive substring of source name, allow. | ||
* | ||
* i.e., `import pkg from 'my-pkg'` | ||
*/ | ||
if (sourceNode.value.toLowerCase().includes( | ||
importNode.local.name.toLowerCase())) { | ||
return; | ||
} | ||
if ( | ||
@@ -36,0 +47,0 @@ sourceNode.type === 'Literal' && |
{ | ||
"name": "eslint-plugin-consistent-imports", | ||
"version": "1.12.0", | ||
"version": "1.13.0", | ||
"description": "ESLint rules to enforce consistent variable names for default imports.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -29,7 +29,10 @@ /** | ||
valid: [ | ||
`import foo from './path/to/foo.js';`, | ||
`import myTest from './path/to/myTest.js';`, | ||
`import myClass from './path/to/my-class.js';`, | ||
`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'`, | ||
`import shell from 'await-shell'`, | ||
`import pkg from 'my-pkg'`, | ||
`import pkg from 'myPkg'`, | ||
], | ||
@@ -36,0 +39,0 @@ |
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
8024
163