eslint-plugin-import-order

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

Use eslint-plugin-import instead (order rule)
Last updated 10 years ago by jfmengels .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-plugin-import-order 
SYNC missed versions from official npm registry.

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.

Recommended configuration

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.

Current Tags

  • 2.1.4                                ...           latest (10 years ago)

8 Versions

  • 2.1.4 [deprecated]           ...           10 years ago
  • 2.1.3 [deprecated]           ...           10 years ago
  • 2.1.2 [deprecated]           ...           10 years ago
  • 2.1.1 [deprecated]           ...           10 years ago
  • 2.1.0 [deprecated]           ...           10 years ago
  • 2.0.0 [deprecated]           ...           10 years ago
  • 1.0.1 [deprecated]           ...           10 years ago
  • 1.0.0 [deprecated]           ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 1
Dependencies (3)
Dev Dependencies (4)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |