New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-workspaces

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-workspaces

An ESLint plugin for enforcing consistent imports across monorepo packages.

  • 0.10.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eslint-plugin-workspaces npm downloads Coverage Status code style: prettier

An ESLint plugin for enforcing consistent imports across monorepo packages.

It supports:

Installation

# npm
npm install eslint-plugin-workspaces --save-dev

# yarn
yarn add eslint-plugin-workspaces --dev

Configuration

Enable the rules in your ESLint configuration file:

{
  "plugins": ["workspaces"],
  "rules": {
    "workspaces/no-relative-imports": "error",
    "workspaces/require-dependency": "warn"
  }
}

Or add the "recommended" preset:

{
  "extends": ["plugin:workspaces/recommended"]
}

Rules

✔ included in the "recommended" preset

🔧 fixable using the --fix command line option

NameDescription
🔧no-absolute-importsdisallow absolute imports for files that are within the current package
no-cross-importsdisallow imports of files that are inside another package
🔧no-relative-importsdisallow relative imports of files that are outside of the current package
require-dependencydisallow importing from packages that are not listed as a dependency

Presets

  • recommended enables rules recommended for all users
  • all enables all rules

License

MIT

Keywords

FAQs

Package last updated on 07 May 2024

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

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