Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-consistent-imports

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-consistent-imports - npm Package Compare versions

Comparing version 1.12.0 to 1.13.0

11

lib/rules/default-match-source.js

@@ -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' &&

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc