Socket
Socket
Sign inDemoInstall

eslint-plugin-loadable-component

Package Overview
Dependencies
89
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-loadable-component

Unofficial lint support for @loadable/component.


Version published
Weekly downloads
4
decreased by-42.86%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

eslint-plugin-loadable-component

Unofficial lint support for @loadable/component.

Test CI codecov

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-loadable-component:

npm install eslint-plugin-loadable-component --save-dev

Or, with yarn:

yarn add -D eslint-plugin-loadable-component

Usage

Note: This plugin doesn't have "recommended" rule set at the moment. We are currently still considering of the right rules to be the recommended default set. Please make sure to enable rules based on your needs.

To get started, add loadable-component to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["loadable-component"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "loadable-component/no-empty-fallback": "warn",
    "loadable-component/no-full-dynamic-import": "error",
    "loadable-component/no-other-loadable-identifier": "error"
  }
}

Rules

NameTypeDocs
no-empty-fallbackBest PracticesLink
no-full-dynamic-importBest PracticesLink
no-other-loadable-idenfierPossible ErrorLink

Disabling Rule

You can disable certain rule by using ESLint directive syntax to hint ESLint to disable in specific line or entire file. You can find a list of ESLint directives here.

// eslint-disable-next-line no-empty-fallback
loadable(() => import('./foo.js'));

License

MIT

Keywords

FAQs

Last updated on 02 Jan 2022

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