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

eslint-plugin-feature-modules

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-feature-modules - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

lib/rules/no-deep-module-require/index.js
const path = require('path');
const lintingErrorMessage = "Importing of feature module components (outside of [feature]/index.js) is not allowed"
const isRequireFunction = node => {

@@ -79,3 +81,3 @@ return (

if (isDeepNonIndexImport(modulePathParts)) {
context.report(node, 'Cannot request module thats too deep!');
context.report(node, lintingErrorMessage);
}

@@ -82,0 +84,0 @@ };

{
"name": "eslint-plugin-feature-modules",
"version": "1.0.1",
"version": "1.0.2",
"description": "Plugin for eslint rules that apply to feature modules directory structure",

@@ -5,0 +5,0 @@ "keywords": [

const { RuleTester } = require('eslint');
const rule = require('../../../../lib/rules/no-deep-module-require');
const path = require('path')
const path = require('path');

@@ -13,4 +13,4 @@ const config = {

const normalizePath = filePath => {
return path.resolve(filePath)
}
return path.resolve(filePath);
};

@@ -22,3 +22,3 @@ const ruleOptions = [{ moduleFolderName: 'module' }];

const invalid = testConfig => {
testConfig.errors = [{ message: 'Cannot request module thats too deep!' }];
testConfig.errors = [{ message: 'Importing of feature module components (outside of [feature]/index.js) is not allowed' }];

@@ -25,0 +25,0 @@ return testConfig;

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