@z1digitalstudio/eslint-config-imports

1.0.0 • Public • Published

@z1digitalstudio/eslint-config-imports

A minimal and opinionated eslint config to handle import sorting

This eslint config uses a combination of eslint-plugin-import and the default eslint rule sort-imports to automatically sort CommonJS and ES imports in what we at Z1 consider the standard way.

Getting started

Install the peer dependencies if you don't have them already:

yarn add --dev eslint eslint-plugin-import

Then, install this config:

yarn add --dev @z1digitalstudio/eslint-config-imports

And simply extend from it:

// .eslintrc.js
module.exports = {
  // ...
  extends: [
    "@z1digitalstudio/eslint-config-imports"
  ],
  // ...
}

Custom resolvers

If you're using Webpack, Babel or something similar, you may need to configure custom resolvers.

Refer to the eslint-plugin-import documentation on how to do so.

Extending this config

This config is meant to be zero-config and opinionated. If you wish to extend it, simply uninstall this package and copy the contents from index.js into your own config.

Readme

Keywords

none

Package Sidebar

Install

npm i @z1digitalstudio/eslint-config-imports

Weekly Downloads

40

Version

1.0.0

License

MIT

Unpacked Size

3.09 kB

Total Files

3

Last publish

Collaborators

  • j.castro
  • ana_martinez
  • emiliosanchez