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

@dreipol/eslint-plugin-export-keys

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dreipol/eslint-plugin-export-keys

Specify how the object kyes should be exported

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-export-keys

Eslint plugin to check the object keys exported by your javascript modules

Installation

npm i @dreipol/eslint-plugin-export-keys -D

Rules

Order

Enabling the export-keys/order rule you will be able to specify the the order in which your object keys should be exported

For example:

{
  "plugins": [
    "export-keys/order"
  ],
  "rules": {
    "export-keys/order": [1, { "keys": ["template", "data", "ready"] }]
  }
}

This rule will check that all your modules exporting some of all the keys defined inside the keys option will be exported in the order defined:

export default {
  template: {},
  data: {},
  ready: {},
}

// or also valid
export default {
  template: {},
  ready: {},
}

// this will throw
export default {
  ready: {},
  template: {},
}

This rule works with module.exports and exports as well

Keywords

FAQs

Package last updated on 09 Aug 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