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.1.0 to 1.3.0

1

example/index.js

@@ -12,1 +12,2 @@ /**

import mySpecialPackage from './path/to/my-special-package.js';
console.log(mySpecialPackage);

2

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

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