# @clubdrei/eslint-plugin-clubdrei

> ESLint plugin with default rule configurations and custom rules for clubdrei.com projects

Latest version **1.3.0** (published 2026-01-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install @clubdrei/eslint-plugin-clubdrei
pnpm add @clubdrei/eslint-plugin-clubdrei
yarn add @clubdrei/eslint-plugin-clubdrei
bun add @clubdrei/eslint-plugin-clubdrei
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2026-01-27 |
| First published | 2022-08-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^16 \|\| ^18 \|\| ^20 \|\| ^22 |
| Dependencies | 9 |
| Unpacked size | 128.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | clubdrei.com Medienagentur GmbH |
| Maintainers | aspasojevic-c3, clubdrei_chris |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/@clubdrei/eslint-plugin-clubdrei
- Homepage: https://www.clubdrei.com
- npm.io page: https://npm.io/package/@clubdrei/eslint-plugin-clubdrei

## Dependencies (9)

- [@babel/core](https://npm.io/package/@babel/core.md) >=7.18.13
- [requireindex](https://npm.io/package/requireindex.md) ^1.2.0
- [eslint-plugin-vue](https://npm.io/package/eslint-plugin-vue.md) >=7 <10
- [eslint-plugin-jsdoc](https://npm.io/package/eslint-plugin-jsdoc.md) ^46.10.1
- [@babel/eslint-parser](https://npm.io/package/@babel/eslint-parser.md) >=7.17.0
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) >=2.32.0
- [eslint-config-airbnb-base](https://npm.io/package/eslint-config-airbnb-base.md) ^15.0.0
- [eslint-import-resolver-alias](https://npm.io/package/eslint-import-resolver-alias.md) ^1.1.2
- [eslint-plugin-filenames-simple](https://npm.io/package/eslint-plugin-filenames-simple.md) ^0.9.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2026-01-27
- 1.3.0-rc.1769530038 (next) — 2026-01-27
- 1.2.0 — 2025-05-26
- 1.1.1 — 2024-11-22
- 1.1.1-rc.1732295235 — 2024-11-22
- 1.1.0-rc.1732294215 — 2024-11-22
- 1.1.0 — 2024-11-22
- 1.0.10 — 2023-11-30
- 1.0.9 — 2023-08-24
- 1.0.8 — 2023-03-16
- 1.0.7 — 2023-01-13
- 1.0.6 — 2023-01-05
- 1.0.5 — 2023-01-04
- 1.0.4 — 2023-01-04
- 1.0.3 — 2023-01-04
- … 14 more at https://npm.io/package/@clubdrei/eslint-plugin-clubdrei/versions

## README

# eslint-plugin-clubdrei

ESLint plugin with default rule configurations and custom rules for clubdrei.com projects

If you want to add a rule or update the packages use the [developerGuide](./developerGuide.md)

## Installation

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

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

Next, install `@clubdrei/eslint-plugin-clubdrei`:

```sh
npm install @clubdrei/eslint-plugin-clubdrei --save-dev
```

Next, install peerDependencies

## Usage

Add `clubdrei` to the `extends` section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-`
prefix.  
With `/vanilla` and `/vue` you can select the right config.

```json
{
  "extends": [
    "plugin:@clubdrei/clubdrei/vanilla"
  ]
}
```

```json
{
  "extends": [
    "plugin:@clubdrei/clubdrei/vue"
  ]
}
```

When you want to overwrite a plugin rule add `clubdrei` to the plugin section of your `.eslintrc` configuration file.

```json
{
  "plugins": [
    "@clubdrei/clubdrei"
  ]
}
```

Currently `settings` and `parserOption` are not included in the configs.
So add our defaults:

```js
module.exports = {
  parserOptions: {
    ecmaVersion: 2020,
    sourceType: 'module',
    //only needed on vanilla-js projects
    parser: '@babel/eslint-parser',
  },
  settings: {
    'import/resolver': {
      alias: {
        map: [
          ['@', './src'],
          ['@ssr', './ssr'],
          ['@tests', './tests'],
        ],
        extensions: ['.js', '.scss', '.vue'],
      },
    },
    'import/extensions': ['error', 'ignorePackages', { vue: 'always', js: 'always' }],
  },
}
```

## Custom Rules

| Rule                                                                                                   | Options                                           | Short Description                                                                     | Type    |
|--------------------------------------------------------------------------------------------------------|---------------------------------------------------|---------------------------------------------------------------------------------------|---------|
| [length-condition]( docs/rules/length-condition.md)                                                    | none                                              | Forces conditions with `.length`, to use a comparison                                 | Vanilla |
| [force-trim-length-on-empty-string-checks]( docs/rules/force-trim-length-on-empty-string-checks.md)    | none                                              | Forces to use `.trim().length`to check if an  string is Empty                         | Vanilla |
| [vue-watch-order]( docs/rules/vue-watch-order.md)                                                      | none                                              | Forces Order in watch: `immediate`, `deep`, `handler`                                 | Vue     |
| [vue-force-handler-in-watch]( docs/rules/vue-force-handler-in-watch.md)                                | none                                              | Forces to use `handler()` in watch                                                    | Vue     |
| [vue-no-complex-keys-in-watch](docs/rules/vue-no-complex-keys-in-watch.md)                             | 'allowedPropertyLevel': number                    | Not allow `test.foo` in watch                                                         | Vue     |
| [filename-convention](docs/rules/filename-convention.md)                                               | 'expect': string[],   <br/>'extensions': string[] | defines naming of files                                                               | Vanilla |
| [vue-force-trim-length-on-empty-string-checks]( docs/rules/vue-force-trim-length-on-empty-string-checks.md) | none                                              | Expand force-trim-length-on-empty-string-checks rule, to check the types of vue props | Vue     |
| [force-equal-zero](docs/rules/force-equal-zero.md)                                                     | none                                              | not allow `foo < 1` for zero checks                                                   | Vanilla |
| [vue-no-multiple-quotes-in-component-props](docs/rules/vue-no-multiple-quotes-in-component-props.md)   | none                                              | forbids double quotes in vue attributes                                               | Vue     |
| [vue-no-arrow-functions-in-html-events](docs/rules/vue-no-arrow-functions-in-html-events.md)           | none                                              | forbids unnecessary arrow functions in html                                           | Vue     |
| [vue-avoid-paranthesis-in-events](docs/rules/vue-avoid-paranthesis-in-events.md)                       | none                                              | Prevents the use of parenthesis in events                                             | Vue     |
| [force-typeof-with-undefined-checks](docs/rules/force-typeof-with-undefined-checks.md)                 | none                                              | Prevent undefined conditions without typeof                                           | Vanilla |
| [vue-prevent-empty-line-between-properties](docs/rules/vue-prevent-empty-line-between-properties.md)   | none                                              | Prevents empty lines between properties                                               | Vue     |
| [force-usage-of-hasown.md](docs/rules/force-usage-of-hasown.md)                                                                                                       | none                                              | Forces the use of `Object.hasOwn` instead of `hasOwnProperty`                          | Vanilla |

---
_Source: https://npm.io/package/@clubdrei/eslint-plugin-clubdrei · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
