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

eslint-plugin-import-order

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-import-order

ESLint plugin to enforce the order of import/require statements.

  • 2.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6K
increased by73.98%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-import-order

version

ESLint plugin to enforce the order of import/require statements.

Deprecation notice

This plugin is no longer maintained, as its sole feature has been integrated and improved upon in eslint-plugin-import, which does even more cool stuff. The corresponding rule is available under the name order.

Install

$ npm install --save-dev eslint eslint-plugin-import-order

Usage

Configure it in package.json.

{
	"name": "my-awesome-project",
	"eslintConfig": {
		"env": {
			"es6": true
		},
		"parserOptions": {
			"ecmaVersion": 6,
			"sourceType": "module"
		},
		"plugins": [
			"import-order"
		],
		"rules": {
			"import-order/import-order": 2
		}
	}
}

Rules

  • import-order - Enforce a convention in module import order.

This plugin exports a recommended configuration that enforces good practices.

To enable this configuration use the extends property in your package.json.

{
	"name": "my-awesome-project",
	"eslintConfig": {
		"extends": "plugin:import-order/recommended",
		"plugins": [
			"import-order"
		]
	}
}

See ESLint documentation for more information about extending configuration files.

Note: This configuration will also enable the correct parser options and environment.

Keywords

FAQs

Package last updated on 10 May 2016

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