Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Declaring dependency on eslint in shared config (fixes #6617) #6985

Merged
merged 1 commit into from
Aug 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/developer-guide/shareable-configs.md
Original file line number Diff line number Diff line change
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