order-imports

1.5.0 • Public • Published

order-imports

This node script orders the imports of your ES6 Javascript files.

Example invocation:

node order-imports src -c exampleConfig.json

Example config:

{
  "files": ".*.js",
  "order": [
    {
      "regex": "react"
    },
    {
      "regex": "react-native"
    },
    {
      "regex": "react-redux"
    },
    {
      "regex": "styled-components"
    },
    {
      "regex": "^[^\\.@]"
    },
    {
      "regex": "^@"
    }
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i order-imports

Weekly Downloads

10

Version

1.5.0

License

MIT

Unpacked Size

117 kB

Total Files

14

Last publish

Collaborators

  • xanderd