An open API service indexing awesome lists of open source software.

https://github.com/timobechtel/eslint-plugin-rules

Collection of useful eslint rules
https://github.com/timobechtel/eslint-plugin-rules

Last synced: 12 months ago
JSON representation

Collection of useful eslint rules

Awesome Lists containing this project

README

          

# @timobechtel/eslint-plugin-rules

Collection of useful eslint rules

## Installation

You'll first need to install [ESLint](https://eslint.org/):

```sh
npm i eslint --save-dev
```

Next, install `@timobechtel/eslint-plugin-rules`:

```sh
npm install @timobechtel/eslint-plugin-rules --save-dev
```

## Usage

Here's an example ESLint configuration that enables all rules.

### `eslintrc.cjs`

```js
module.exports = {
extends: ['plugin:@timobechtel/rules/all'],
}
```

### `eslint.config.cjs` (requires eslint>=v8.23.0)

```js
const plugin = require('@timobechtel/eslint-plugin-rules');

module.exports = {
...plugin.configs['flat/all'],
}
```

## Configurations

| | Name |
| :- | :--------- |
| 🌐 | `all` |
| | `flat/all` |

## Rules

💼 Configurations enabled in.\
🌐 Set in the `all` configuration.\
💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).

| Name | Description | 💼 | 💡 |
| :------------------------------------------------------------------------------- | :------------------------------------------------- | :--------------------- | :- |
| [no-optional-chaining-comparison](docs/rules/no-optional-chaining-comparison.md) | Disallow optional chaining in comparison operators | 🌐 ![badge-flat/all][] | 💡 |