Skip to content

Commit

Permalink
Remove react from the 'default' collection. Add collection 'react-rec…
Browse files Browse the repository at this point in the history
…ommended'
  • Loading branch information
mortnod committed Jul 9, 2019
1 parent 36ebb0a commit 5c3df45
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Otovo eslint config

This repo contains sets of highly opinionated linting rules (eslint-configs) for Otovo projects.
This repo contains sets of opinionated linting rules (eslint-configs) for Otovo projects.

## Installing

Expand Down Expand Up @@ -60,9 +60,10 @@ For a given project, you will probably need several of them. For example: If you

### Recommended sets

Instead of adding rule sets one by one, you can use one of three collections:
Instead of adding rule sets one by one, you can use one of four collections:

- `@otovo/eslint-config-otovo`
- `@otovo/eslint-config-otovo/react-recommended`
- `@otovo/eslint-config-otovo/react-flow-recommended`
- `@otovo/eslint-config-otovo/react-typescript-recommended`

Expand All @@ -80,23 +81,23 @@ You use collections in the same way you add rule sets: By adding them to the `ex

The following is a overview of the rules each collection includes:

| | `default` | `react-flow-recommended` | `react-typescript-recommended` |
| ------------------- | --------- | ------------------------ | ------------------------------ |
| javascript ||||
| react ||||
| prettier | |||
| prettier-react | |||
| flowtype | || |
| prettier-flowtype | || |
| typescript | | ||
| prettier-typescript | | ||
| | `default` | `react-recommended` | `react-flow-recommended` | `react-typescript-recommended` |
| ------------------- | --------- | ------------------- | ------------------------ | ------------------------------ |
| javascript ||| ||
| prettier || |||
| react | | |||
| prettier-react | | |||
| flowtype | | | | |
| prettier-flowtype | | | | |
| typescript | | | ||
| prettier-typescript | | | ||

## Publishing

This package is hosted on npm under @otovo/eslint-config-otovo namespace and is published using the brilliant [`np`](https://github.com/sindresorhus/np) package. To publish a new version, run
This package is hosted on npm under @otovo/eslint-config-otovo namespace and is published using [`np`](https://github.com/sindresorhus/np). To publish a new version, run

```sh
yarn run release
```

This will guide you through the process of publishing on npm, pushing tags to Github and create release notes.
Doing so guides you through publishing to npm, pushing tags to Github and create release notes.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
extends: ["./javascript", "./react", "./prettier", "./prettier-react/"].map(
require.resolve
)
extends: ["./javascript", "./prettier"].map(require.resolve)
};
8 changes: 8 additions & 0 deletions react-recommended/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
extends: [
"../javascript",
"../react",
"../prettier",
"../prettier-react/"
].map(require.resolve)
};

0 comments on commit 5c3df45

Please sign in to comment.