Socket
Socket
Sign inDemoInstall

@dreipol/eslint-plugin-export-keys

Package Overview
Dependencies
Maintainers
4
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


Version published
Weekly downloads
2
increased by100%
Maintainers
4
Weekly downloads
 
Created
Source

eslint-plugin-export-keys

Build Status

NPM version NPM downloads MIT License

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": [
    "@dreipol/export-keys"
  ],
  "rules": {
    "export-keys/order": [1, ["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 10 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