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

eslint-plugin-import-helpers

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-import-helpers - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

1

lib/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.rules = void 0;
exports.rules = {
'order-imports': require('./rules/order-imports'),
};

6

lib/rules/order-imports.js

@@ -248,3 +248,3 @@ "use strict";

function computeRank(ranks, regExpGroups, name, type) {
return ranks[import_type_1.determineImportType(name, regExpGroups)] + (type === 'import' ? 0 : 100);
return ranks[(0, import_type_1.determineImportType)(name, regExpGroups)] + (type === 'import' ? 0 : 100);
}

@@ -266,3 +266,3 @@ function registerNode(node, name, type, ranks, regExpGroups, imported) {

group.forEach(function (groupItem) {
if (!import_type_1.isRegularExpressionGroup(groupItem) && knownTypes.indexOf(groupItem) === -1) {
if (!(0, import_type_1.isRegularExpressionGroup)(groupItem) && knownTypes.indexOf(groupItem) === -1) {
throw new Error("Incorrect configuration of the rule: Unknown type " + JSON.stringify(groupItem) + ". For a regular expression, wrap the string in '/', ex: '/shared/'");

@@ -445,3 +445,3 @@ }

CallExpression: function handleRequires(node) {
if (level !== 0 || !static_require_1.isStaticRequire(node) || !isInVariableDeclarator(node.parent)) {
if (level !== 0 || !(0, static_require_1.isStaticRequire)(node) || !isInVariableDeclarator(node.parent)) {
return;

@@ -448,0 +448,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.determineImportType = exports.isRegularExpressionGroup = exports.isRelativeToSibling = exports.isIndex = exports.isRelativeToParent = exports.isModule = exports.isAbsolute = void 0;
function isAbsolute(name) {

@@ -4,0 +5,0 @@ return name.indexOf('/') === 0;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isStaticRequire = void 0;
function isStaticRequire(node) {

@@ -4,0 +5,0 @@ return (node &&

{
"name": "eslint-plugin-import-helpers",
"version": "1.1.0",
"version": "1.2.0",
"description": "ESLint Rules to Aid with Imports",

@@ -24,8 +24,8 @@ "main": "lib/index.js",

"peerDependencies": {
"eslint": "5.x - 7.x"
"eslint": "5.x - 8.x"
},
"devDependencies": {
"@types/node": "^11.12.2",
"@typescript-eslint/parser": "^3.6.0",
"eslint": "^7.4.0",
"@types/node": "^14.17.33",
"@typescript-eslint/parser": "^5.3.1",
"eslint": "^8.2.0",
"gulp": "^3.9.0",

@@ -35,4 +35,4 @@ "gulp-typescript": "^5.0.1",

"nyc": "^13.3.0",
"rimraf": "2.5.2",
"typescript": "^3.4.1"
"rimraf": "^3.0.2",
"typescript": "^4.4.4"
},

@@ -39,0 +39,0 @@ "dependencies": {},

@@ -88,1 +88,15 @@ # eslint-plugin-import-helpers

To use this plugin with TypeScript, you must use the TypeScript parser for ESLint. See [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) for more details.
# Working with This Repo
## Dependencies
| Name | Version |
| ------------------------------------------------------------- | ------- |
| [node.js](https://nodejs.org) | 10.x |
| [yarn](https://classic.yarnpkg.com/) | 1.x |
Gulp v3 is the thing keeping us at node.js v10
## Running Tests
First, `yarn install`
Then, `yarn test`
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