Skip to content

z1digitalstudio/eslint-config-imports

Repository files navigation

@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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published