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

@bjervis/eslint-plugin-scoobie

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bjervis/eslint-plugin-scoobie

Highlight and fix submodule imports from 'scoobie/src'.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
130
decreased by-13.91%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-scoobie

Designed to work with projects using scoobie, this plugin detects when a component is being imported from the src submodule.

VSCode's autoimport has a strong tendency to pull from 'scoobie/src' rather than just 'scoobie', for some reason. This lint rule will error when it happens, and can also autofix.

There are some valid reasons to import from certain submodules in scoobie, and this should leave those alone.

Example

// error
import { SmartTextLink } from 'scoobie/src';

// fixes to
import { SmartTextLink } from 'scoobie';

// ok
import 'scoobie/types';

// also ok
import { robotoHtml, robotoMonoHtml } from 'scoobie/typography';

Usage

yarn add -D @bjervis/eslint-plugin-scoobie

Then in your eslint config

plugins: ['@bjervis/scoobie'],
rules: {
  '@bjervis/scoobie/no-src-import': 2,
},

If you're using Braid, you're probably also using sku, so:

// sku.config.js
module.exports = {
  ...,
  dangerouslySetESLintConfig: (skuConfig) => ({
    ...skuConfig,
    plugins: ['@bjervis/scoobie'],
    rules: {
      '@bjervis/scoobie/no-src-import': 2,
    },
  }),
}

FAQs

Package last updated on 25 Jun 2021

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