# eslint-config-beslogic

> ESLint rules, plugins and configs used at Beslogic

Latest version **6.0.3** (published 2026-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-config-beslogic
pnpm add eslint-config-beslogic
yarn add eslint-config-beslogic
bun add eslint-config-beslogic
```

## Health

**Score 50/100 (C)** — status: active.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 6.0.3 |
| Published | 2026-07-17 |
| First published | 2021-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | ^22.16 \|\| ^24 |
| Dependencies | 21 |
| Unpacked size | 185 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | Samuel Therrien |
| Maintainers | samuel-therrien-beslogic |
| Keywords | eslint, eslintconfig, eslintplugin, eslint-config, eslint-plugin, config, plugin, beslogic, linting, typescript, node, nodejs, express, jest, react, mui, material, material-ui, angular, dprint, autofix |

## Links

- npm: https://www.npmjs.com/package/eslint-config-beslogic
- npm.io page: https://npm.io/package/eslint-config-beslogic

## Dependencies (21)

- [globals](https://npm.io/package/globals.md) >=13.12.1
- [@eslint/js](https://npm.io/package/@eslint/js.md) ^9.38 || ^10
- [@eslint/compat](https://npm.io/package/@eslint/compat.md) ^1.2.4 || ^2
- [typescript-eslint](https://npm.io/package/typescript-eslint.md) ^8.35
- [eslint-plugin-jest](https://npm.io/package/eslint-plugin-jest.md) ^28.8.3 || ^29.0.1
- [eslint-plugin-regexp](https://npm.io/package/eslint-plugin-regexp.md) ^2.3
- [eslint-plugin-autofix](https://npm.io/package/eslint-plugin-autofix.md) ^2.2
- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) ^3.0.2 || ^4.0.3
- [eslint-plugin-unicorn](https://npm.io/package/eslint-plugin-unicorn.md) ^65.0.1
- [eslint-plugin-import-x](https://npm.io/package/eslint-plugin-import-x.md) ^4.15.1
- [@stylistic/eslint-plugin](https://npm.io/package/@stylistic/eslint-plugin.md) ^5.3
- [confusing-browser-globals](https://npm.io/package/confusing-browser-globals.md) ^1
- [eslint-plugin-extra-rules](https://npm.io/package/eslint-plugin-extra-rules.md) ^0.0.0-development
- [eslint-config-flat-gitignore](https://npm.io/package/eslint-config-flat-gitignore.md) ^2.1.0
- [@morev/eslint-disable-autofix](https://npm.io/package/@morev/eslint-disable-autofix.md) ^1.1.0
- [eslint-plugin-testing-library](https://npm.io/package/eslint-plugin-testing-library.md) ^7.2.0
- [eslint-plugin-simple-import-sort](https://npm.io/package/eslint-plugin-simple-import-sort.md) >=12.0
- [eslint-import-resolver-typescript](https://npm.io/package/eslint-import-resolver-typescript.md) ^4
- [eslint-plugin-prefer-arrow-functions](https://npm.io/package/eslint-plugin-prefer-arrow-functions.md) ^3.10
- [eslint-plugin-no-relative-import-paths](https://npm.io/package/eslint-plugin-no-relative-import-paths.md) ^1.6
- [@eslint-community/eslint-plugin-eslint-comments](https://npm.io/package/@eslint-community/eslint-plugin-eslint-comments.md) ^4.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 6.0.3 (latest) — 2026-07-17
- 6.0.0-rc.5 (6-rc) — 2026-06-27
- 3.3.2 (legacy-configs) — 2025-10-04
- 6.0.2 — 2026-07-15
- 6.0.1 — 2026-07-14
- 6.0.0 — 2026-06-27
- 6.0.0-rc.4 — 2026-06-27
- 6.0.0-rc.3 — 2026-06-27
- 6.0.0-rc.2 — 2026-06-27
- 6.0.0-rc.1 — 2026-06-27
- 6.0.0-rc.0 — 2026-06-22
- 5.2.3 — 2026-01-04
- 5.2.2 — 2026-01-02
- 5.2.1 — 2026-01-02
- 5.1.2 — 2026-01-02
- … 97 more at https://npm.io/package/eslint-config-beslogic/versions

## README

# Eslint Config Beslogic

## Installation and usage

Run `npm i  --save-dev eslint-config-beslogic`

Depending on your needs, you will need to also install other peer dependencies for linting.

In your `eslint.config.*` file, simply [extend](#examples) our [presets](#presets) appropriate for your project.

For stylistic rules, it is highly recommended to use a dedicated formatter over ESLint. Read more here: <https://typescript-eslint.io/users/what-about-formatting/>\
We assume [dprint](https://dprint.dev/) and don't enable any rules it covers by default. If you're not using a formatter, a [stylistic.mjs](#stylisticmjs) configuration is offered below.

## Parallel configurations

These are configuration files you'll have to update manually to best work with these presets.

### `package.json`

Read the [`package.json`](https://github.com/Beslogic/shared-configs/blob/main/README.md#packagejson) section of our Shared Configs for one-liner shortcut scripts you can use.

### Base `tsconfig.json`

Extend the following in your base `tsconfig.json` (follow link for more details):

[`typescript@>=5.6`](https://socket.dev/npm/package/eslint-config-beslogic/files/latest/tsconfig.5.6.json):

```jsonc
"extends": ["eslint-config-beslogic/tsconfig.5.6.json"],
```

[`typescript@>=5.0`](https://socket.dev/npm/package/eslint-config-beslogic/files/latest/tsconfig.5.0.json):

```jsonc
"extends": ["eslint-config-beslogic/tsconfig.5.0.json"],
```

TypeScript's implicit `include` skips dot-directories, so `.azuredevops`, `.github`, etc. are left out (no type-check, no lint). A base config can't fix this (child `include` replaces, not merges). Add the dot-dirs you need to your own `tsconfig.json`:

```jsonc
"include": ["**/*", ".azuredevops/**/*", ".github/**/*"]
```

"No Unchecked Indexed Access" makes index accesses even stricter. You may not want it in your project or in your tests. You can disable it with `"compilerOptions": { "noUncheckedIndexedAccess": false }`.

If using experimental decorators (likely for an Angular project), you still need to set

```jsonc
"compilerOptions": { 
  "emitDecoratorMetadata": true,
  "experimentalDecorators": true,
}
```

If deploying / bundling with an Angular npm package, also set `angularCompilerOptions": { "strictMetadataEmit": true }`.

### `.vscode/settings.json` and `.vscode/extensions.json`

Read and copy the sections for the languages you use from [Beslogic/shared-configs/.vscode](https://github.com/Beslogic/shared-configs/tree/main/.vscode).

### `.dprint.jsonc`

<!-- Keep in sync with https://github.com/Beslogic/shared-configs README -->

Add the following into your `.dprint.jsonc` at the root of your git project (even if you have multiple workspaces):

```jsonc
{
  // https://dprint.dev/config/#extending-a-different-configuration-file
  "extends": "https://raw.githubusercontent.com/Beslogic/shared-configs/<hash>/.dprint.jsonc"
}
```

Read the [`dprint`](https://github.com/Beslogic/shared-configs/blob/main/README.md#dprint) section of our Shared Configs for more information.

If also using [`json-like.mjs` preset](#json-likemjs) extend from `https://raw.githubusercontent.com/Beslogic/shared-configs/main/.dprint-json-like.jsonc` instead.

### PR Autofixes

We've stopped attempting to support pre-commit.ci.\
Read the [`PR Autofixes`](https://github.com/Beslogic/shared-configs/blob/main/README.md#pr-autofixes) section of our Shared Configs for an explanation and alternatives.

## Patched packages

The following packages cause problems or have other type-safety issues that are automatically patched out by `eslint-config-beslogic` on install. To see the complete logs, add `foreground-scripts=true` to a root `.npmrc` file, or run `npm install` with `--foreground-scripts`.

### NX/NRWL

NX has a reusable `add-linting` generator that adds configuration that hides our own and/or conflicts with our best practices. We automatically patch-out that NX generator.

If you have a project that used NX before also using `eslint-config-beslogic@>=1.5.2`, make sure to remove all `@nrwl/*` and `@angular-eslint/template/process-inline-templates` entries from `"extends"` in all eslint configuration files. You can keep entries generated under `"rules"`.

NX also [doesn't support trailing commas in jsonc](https://github.com/nrwl/nx/issues/10393) files. You'll have to make sure that your configurations contains none (and go upvote the referenced issue!).

### Angular Material

Angular Material's MatDialogRef [defaults it dialog result generic to `any`](https://github.com/angular/components/issues/12898#issuecomment-1608214668). This breaks type safety and is automatically patched out since `eslint-config-beslogic@1.5.2`.

## Presets

Below are all the different configurations you can extend from. You can mix and match as you want if a predefined configuration does not exist for your specific stack.

### Examples

<details>
<summary>React (w/ or w/o TypeScript)</summary>

```js
import { defineConfig } from 'eslint/config';
import beslogicExtraStrict from 'eslint-config-beslogic/extra-strict.mjs'
import beslogicReact from 'eslint-config-beslogic/react.mjs'

export default defineConfig(
  beslogicReact,
  beslogicExtraStrict,
  // Your configs here
  {...}
)
```

</details>

<details>
<summary>Angular</summary>

```js
import { defineConfig } from 'eslint/config';
import beslogicAngular from 'eslint-config-beslogic/angular.mjs'
import beslogicExtraStrict from 'eslint-config-beslogic/extra-strict.mjs'

export default defineConfig(
  beslogicAngular,
  beslogicExtraStrict,
  // Your configs here
  {...}
)
```

</details>

<details>
<summary>Frameworkless TypeScript w/o dprint</summary>

```js
import { defineConfig } from 'eslint/config';
import beslogicExtraStrict from 'eslint-config-beslogic/extra-strict.mjs'
import beslogicBase from 'eslint-config-beslogic/base.mjs'
import beslogicStylistic from 'eslint-config-beslogic/stylistic.mjs'

export default defineConfig(
  beslogicBase,
  beslogicExtraStrict,
  beslogicStylistic,
  // Your configs here
  {...}
)
```

</details>

### `index.mjs`

Default preset, alias / re-exports `base.mjs`.

### `jest.mjs`

[Jest](https://www.npmjs.com/package/jest) and [Testing Library](https://testing-library.com/) configs. Is already extended by `base.mjs` for all `*spec.[jt]s` and `*.test.[jt]sx` files, as well as `*.[jt]s` and `*.[jt]sx` files inside of `__tests__` folders. You should not need to extend from this configuration unless you want to add it to a test file that is not automatically picked up by the naming convention.

### `base.mjs`

Basic javascript/TypeScript configs, is extended by all other configs except `jest.mjs`, `storybook.mjs` and `json-like.mjs`. Includes TypeScript-specific configs and `TSX` support.

If you have a non-standard `tsconfig.json`, you may need custom configurations for [settings.import-x/resolver-next: [createTypeScriptImportResolver({project: ...})]](https://github.com/import-js/eslint-import-resolver-typescript#eslintconfigjs) and/or [settings.parserOptions.projectService](https://typescript-eslint.io/packages/parser#projectserviceoptions).

For the linting to be fully effective, please make sure that your base `jsconfig.json`/`tsconfig.json` extends `eslint-config-beslogic/tsconfig.X.X.json` (see [Parallel configurations](#parallel-configurations)).

If you want extra strict linting, consider adding the [`extra-strict.mjs` preset](#extra-strictmjs).

If you are a writing library, use the following rule:

```js
import { defineConfig } from "eslint/config"
import { explicitModuleBoundaryType } from "eslint-config-beslogic/extra-strict.mjs"

export default defineConfig(
  {
    rules: {
      "@typescript-eslint/explicit-module-boundary-types": explicitModuleBoundaryType
    }
  }
)
```

<!-- Notes about bun support for later: https://github.com/import-js/eslint-import-resolver-typescript#bun -->

### `node-js.mjs`

Configurations for NodeJS backends.

TODO: mention already handled by angular preset

Add the following `devDependencies` to your `package.json`:

```shell
npm install --save-dev eslint-plugin-n
```

### `rxjs.mjs`

Configurations for projects using RxJs. Already extends and `base.mjs` and is already extended by `angular.mjs`.

Add the following `devDependencies` to your `package.json`:

```shell
npm install --save-dev eslint-plugin-rxjs-x
```

### `react.mjs`

Configurations for React projects. Comes with `JSX` support.

Add the following `devDependencies` to your `package.json`:

```shell
npm install --save-dev eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-prefer-function-component
```

### `react-native.mjs`

Configurations for [React Native](https://reactnative.dev/) projects, including [Expo](https://expo.dev/). Already extends `react.mjs`.

Add the following `devDependencies` to your `package.json`:

```shell
npm install --save-dev eslint-plugin-react-native eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-prefer-function-component
```

### `mui.mjs`

[MUI/material](https://github.com/mui-org/material-ui) framework configurations. Already extends `react.mjs`.

Add the following `devDependencies` to your `package.json`:

```shell
npm install --save-dev eslint-plugin-mui eslint-plugin-mui-sx-order eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-prefer-function-component
```

### `angular.mjs`

Configurations for NGX projects. Comes with `html` template and inline template support. Already extends `rxjs.mjs`. Also extends `node-js.mjs` for Javascript files.

For the linting to be fully effective, please make sure that your base `tsconfig.json` extends `eslint-config-beslogic/tsconfig.X.X.json` (see [Parallel configurations](#parallel-configurations)).\
If bundling as an npm package set `"strictMetadataEmit": true` under `angularCompilerOptions`.

Add the following `devDependencies` to your `package.json`:

```shell
npm install --save-dev @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/template-parser eslint-plugin-rxjs-angular-x eslint-plugin-angular-file-naming eslint-plugin-rxjs-x
```

If using Standalone Components, which are now the recommended default, you should enable the rule `"no-autofix/@angular-eslint/prefer-standalone": "error"`.

### `storybook.mjs`

Includes strict Storybook ESLint plugin and a custom rule for Angular components. This preset should be added last.\
If you're using different ESLint configs for your Angular and Storybook projects, you should add this preset to both.

Add the following `devDependencies` to your `package.json`:

```shell
npm install --save-dev eslint-plugin-storybook
```

## Stylistic and pedantic Presets

If used, these presets should always come last, in this specific order.

### `extra-strict.mjs`

Enables extra-strict rules for TypeScript project and requires stricter `tsconfig.json` configurations.

### `stylistic.mjs`

Enables stylistic rules that would be taken care of by [dprint](https://dprint.dev/plugins/typescript/). Please read [What About Formatting?](https://typescript-eslint.io/users/what-about-formatting/)

We don't recommend using this preset, and to use dprint instead (see [Parallel configurations](#parallel-configurations)).

But if for some reason, `dprint` isn't an option for you, this preset follows our standards using ESLint.

### `json-like.mjs`

Enforces stylistic rules for JS objects to look like valid JSON objects as much as possible.

## Changelog

You can view the changelog under the [Code Tab](https://www.npmjs.com/package/eslint-config-beslogic?activeTab=code), or at <https://socket.dev/npm/package/eslint-config-beslogic/files/latest/CHANGELOG.md>

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