/core-rules)
    * [ Governance ](/docs/latest/contribute/governance)
    * [ Report a Security Vulnerability ](/docs/latest/contribute/report-security-vulnerability)
  * [ Maintain ESLint ](/docs/latest/maintain/)
    * [ How ESLint is Maintained ](/docs/latest/maintain/overview)
    * [ Manage Issues and Pull Requests ](/docs/latest/maintain/manage-issues)
    * [ Review Pull Requests ](/docs/latest/maintain/review-pull-requests)
    * [ Manage Releases ](/docs/latest/maintain/manage-releases)
    * [ Working Groups ](/docs/latest/maintain/working-groups)

#  Share Configurations

##  Table of Contents

  1. Creating a Shareable Config 
  2. Publishing a Shareable Config 
  3. Using a Shareable Config 
    1. Overriding Settings from Shareable Configs 
  4. Sharing Multiple Configs 
  5. Further Reading 

To share your ESLint configuration, create a **shareable config** . You can
publish your shareable config on [ npm ](https://www.npmjs.com/) so that
others can download and use it in their ESLint projects.

This page explains how to create and publish a shareable config.

Tip

This page explains how to create a shareable config using the flat config
format. For the deprecated eslintrc format, [ see the deprecated documentation
](shareable-configs-deprecated) .

##  Creating a Shareable Config

Shareable configs are simply npm packages that export a configuration object
or array. To start, [ create a Node.js module
](https://docs.npmjs.com/getting-started/creating-node-modules) like you
normally would.

While you can name the package in any way that you’d like, we recommend using
one of the following conventions to make your package easier to identify:

  * Begin with ` eslint-config- ` , such as ` eslint-config-myconfig ` . 
  * For an npm [ scoped module ](https://docs.npmjs.com/misc/scope) , name or prefix the module with ` @scope/eslint-config ` , such as ` @scope/eslint-config ` or ` @scope/eslint-config-myconfig ` . 

In your module, export the shareable config from the module’s [ ` main `
](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#main) entry point
file. The default main entry point is ` index.js ` . For example:

    
    
    // index.js
    export default [
        {
            languageOptions: {
                globals: {
                    MyGlobal: true
                }
            },
    
            rules: {
                semi: [2, "always"]
            }
    
        }
    ];
    
    
    1  
    2  
    3  
    4  
    5  
    6  
    7  
    8  
    9  
    10  
    11  
    12  
    13  
    14  
    15  
    

Because the ` index.js ` file is just JavaScript, you can read these settings
from a file or generate them dynamically.

Tip

Most of the time, you’ll want to export an array of config objects from your
shareable config. However, you can also export a single config object. Make
sure your documentation clearly shows an example of how to use your shareable
config inside of an ` eslint.config.js ` file to avoid user confusion.

##  Publishing a Shareable Config

Once your shareable config is ready, you can [ publish it to npm
](https://docs.npmjs.com/getting-started/publishing-npm-packages) to share it
with others. We recommend using the ` eslint ` and ` eslintconfig ` [ keywords
](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#keywords) in the
` package.json ` file so others can easily find your module.

You should declare your dependency on ESLint in the ` package.json ` using the
[ peerDependencies
](https://docs.npmjs.com/files/package.json#peerdependencies) field. The
recommended way to declare a dependency for future-proof compatibility is with
the “>=” range syntax, using the lowest required ESLint version. For example:

    
    
    {
        "peerDependencies": {
            "eslint": ">= 9"
        }
    }
    
    
    1  
    2  
    3  
    4  
    5  
    

If your shareable config depends on a plugin or a custom parser, you should
specify these packag