# eslint-config-moni-web

> Moni's ESLint config, following our styleguide for web projects

Latest version **0.0.3** (published 2025-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-config-moni-web
pnpm add eslint-config-moni-web
yarn add eslint-config-moni-web
bun add eslint-config-moni-web
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2025-09-11 |
| First published | 2022-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18.0.0 |
| Dependencies | 0 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | https://twitter.com/qmzik |
| Maintainers | qmzik |
| Keywords | eslint, eslintconfig |

## Links

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

## 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
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2025-09-11
- 0.0.2 — 2022-10-24
- 0.0.1 — 2022-10-24

## README

# eslint-config-moni-web

ESLint configuration for Moni's web projects, following our styleguide for web projects. Compatible with ESLint 9+ and TypeScript ESLint 8+.

## Features

- **TypeScript support** with strict type checking rules
- **React support** with hooks and JSX rules
- **Prettier integration** for consistent formatting
- **Import sorting** with `simple-import-sort`
- **Promise best practices** with `eslint-plugin-promise`
- **Modern ESLint 9+ flat config** format

## Installation

All dependencies must be installed explicitly due to ESLint's peer dependency requirements:

```bash
npm install --save-dev eslint-config-moni-web eslint @eslint/js @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-config-next eslint-config-prettier eslint-plugin-prettier eslint-plugin-promise eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-simple-import-sort prettier
```

Or use [install-peerdeps](https://github.com/nathanhleung/install-peerdeps) for easier installation:

```bash
npm install install-peerdeps --global
npm install eslint-config-moni-web --save-dev
install-peerdeps eslint-config-moni-web --dev
```

## Usage

### ESLint 9+ (Flat Config) - Recommended

Create an `eslint.config.js` file in your project root:

```js
const config = require('eslint-config-moni-web');

module.exports = [
  ...config,
  {
    // Your project-specific rules
    rules: {
      // Additional rules...
    }
  }
];
```

Or using ES modules:

```js
import moniWebConfig from 'eslint-config-moni-web';

export default [
  ...moniWebConfig,
  {
    // Your project-specific rules
    rules: {
      // Additional rules...
    }
  }
];
```

### Running ESLint

```bash
# Check all files
npx eslint .

# Check specific directory
npx eslint src/

# Check specific file
npx eslint src/index.ts

# Auto-fix issues
npx eslint src/ --fix

# Check TypeScript files only
npx eslint "**/*.{ts,tsx}"
```

## Configuration Details

This configuration includes:

### Base Rules
- Line length limit: 150 characters
- Consistent spacing and formatting
- Curly braces enforcement
- Parameter reassignment prevention

### TypeScript Rules
- Strict type checking
- Naming conventions (PascalCase for classes, interfaces)
- Explicit member accessibility
- Module boundary types enforcement

### React Rules
- JSX filename extensions
- Hooks rules
- Deprecated API prevention
- Unsafe patterns detection

### Import Rules
- Automatic import sorting with `simple-import-sort`
- Grouped imports (Node.js, React, types, internal, hooks, relative)

### Prettier Integration
- Single quotes
- 4-space indentation
- Trailing commas
- Consistent line endings

## Requirements

- **Node.js** >= 18.0.0
- **ESLint** >= 9.29.0
- **TypeScript ESLint** >= 8.15.0
- **TypeScript** >= 4.0.0 (for TypeScript projects)

## Version

Current version: 0.0.3

## License

MIT

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