Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kuzzleio/eslint-plugin-kuzzle
Browse files Browse the repository at this point in the history
  • Loading branch information
Aschen committed Jul 15, 2022
2 parents e84af2d + 4ab41ae commit e840a7c
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@

Kuzzle Coding Standard

## Installation
## Install our coding standard

Install ESLint and the plugin
1) Install ESLint and the plugin

```sh
npm i eslint eslint-plugin-kuzzle
npm i eslint eslint-plugin-kuzzle prettier
```


## Usage

Add `kuzzle` to the plugins section of your `.eslintrc` configuration file and select the default rule set:
2) Add `kuzzle` to the plugins section of your `.eslintrc` configuration file and select the default rule set:

```json
{
Expand All @@ -24,14 +21,22 @@ Add `kuzzle` to the plugins section of your `.eslintrc` configuration file and s
"plugin:kuzzle/typescript",
]
}
```

3) Run Prettier to format the code accordingly

```sh
echo {}> .prettierrc.json
npx prettier lib/ test/ features/ --write
```

4) Remove unused eslint-related dependencies (such as `@typescript-eslint/eslint-plugin`, etc)

5) Commit relevant files

## Available rule sets

- `plugin:kuzzle/default`: default rules between all javascript projects
- `plugin:kuzzle/node`: rules for Node.js projects
- `plugin:kuzzle/typescript`: rules for Typescript projects



0 comments on commit e840a7c

Please sign in to comment.