Socket
Book a DemoInstallSign in
Socket

@zohodesk/eslint-plugin-import-validation

Package Overview
Dependencies
Maintainers
51
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zohodesk/eslint-plugin-import-validation

Import validation plugin for ESLint

latest
npmnpm
Version
0.0.1
Version published
Maintainers
51
Created
Source

eslint-plugin-import-validation

  • A custom ESLint plugin that enforces approved import paths by disallowing direct imports from internal es/ or lib/ directories.
  • It supports exact or regex-based patterns and suggests alternative wrapper component paths to maintain a consistent and modular codebase.

📦 Installation

  • npm install --save-dev @zohodesk/eslint-plugin-import-validation

✨ Features

  • Disallows usage of specific imports or import patterns
  • Provides clear suggestions for alternative import paths
  • Supports both exact string match and regex patterns
  • Useful for large codebases with migration or structural conventions

Rule Configuration

rules: {
    'import-validation/import-validator': ['error',
    {
        onboarding: {
            disallowPattern: '^@zohodesk/dot/(es|lib)/Onboarding/Onboarding(\\.js)?$',
            suggest: 'src/components/Wrapper/Onboarding/Onboarding.js',
        }
    }
    ]
}

Keywords

ZOHODESK

FAQs

Package last updated on 23 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts