Socket
Socket
Sign inDemoInstall

eslint-plugin-monorepo

Package Overview
Dependencies
32
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-monorepo

ESLint plugin for monorepos


Version published
Weekly downloads
25K
decreased by-6.19%
Maintainers
1
Install size
427 kB
Created
Weekly downloads
 

Readme

Source

eslint-plugin-monorepo

Travis Prettier npm semantic-release License

A collection of ESLint rules for enforcing import rules in a monorepo. Supports:

Configuration

Use the "recommended" configuration:

// .eslintrc.json
{
  "extends": ["plugin:monorepo/recommended"]
}

Or enable rules manually:

// .eslintrc.json
{
  "plugins": ["monorepo"],
  "rules": {
    "monorepo/no-internal-import": "error",
    "monorepo/no-relative-import": "error"
  }
}

Rules

monorepo/no-internal-import

Forbids importing specific files from a monorepo package.

// Bad
import 'module/src/foo.js';

// Good
import { foo } from 'module';

monorepo/no-relative-import (fixable)

Forbids importing other packages from the monorepo with a relative path.

// Bad
import module from '../module';

// Good
import module from 'module';

Keywords

FAQs

Last updated on 15 Nov 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc