Skip to content

Commit

Permalink
Docs: Declaring dependency on eslint in shared config (fixes #6617) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto authored and vitorbal committed Aug 28, 2016
1 parent 6869c60 commit a989a7c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/developer-guide/shareable-configs.md
Expand Up @@ -26,6 +26,14 @@ Since `index.js` is just JavaScript, you can optionally read these settings for

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

You should declare your dependency on eslint in `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": ">= 3"
}
```

You can also test your shareable config on your computer before publishing by linking your module globally. Type:

```bash
Expand Down

0 comments on commit a989a7c

Please sign in to comment.