Socket
Socket
Sign inDemoInstall

eslint-plugin-prefer-import

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-prefer-import

Prefer ES6 import statements when importing files


Version published
Weekly downloads
517
decreased by-15.38%
Maintainers
1
Install size
3.34 kB
Created
Weekly downloads
 

Readme

Source

eslint-plugin-prefer-import

ESLint plugin to prefer ES6 import statements when importing files.

Installation

Install the npm package

# If eslint is installed globally
npm install -g eslint-plugin-prefe-import

# If eslint is installed locally
npm install -D eslint-plugin-prefe-import

Add the plugin to the plugins section and the rule to the rules section in your .eslintrc

"plugins": [
  "prefer-import"
],
"rules": {
  "prefer-import/prefer-import-over-require": ["error"]
}

Rules

  • prefer-import-over-require: Checks for any require calls and prefer the usage of import statements instead.

Keywords

FAQs

Last updated on 07 Sep 2017

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