# @pedalboard/eslint-plugin-craftsmanlint

> A set of ESlint rules for your code craftsmanship

Latest version **1.2.19** (published 2026-04-07) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.2.19 |
| Published | 2026-04-07 |
| First published | 2021-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Matti Bar-Zeev |
| Maintainers | mbarzeev |

## Links

- npm: https://www.npmjs.com/package/@pedalboard/eslint-plugin-craftsmanlint
- Repository: https://github.com/mbarzeev/pedalboard
- Homepage: https://github.com/mbarzeev/pedalboard#readme
- Issues: https://github.com/mbarzeev/pedalboard/issues
- npm.io page: https://npm.io/package/@pedalboard/eslint-plugin-craftsmanlint

## Recent versions

- 1.2.19 (latest) — 2026-04-07
- 1.2.18 — 2026-04-02
- 1.2.17 — 2024-03-05
- 1.2.16 — 2022-12-15
- 1.2.15 — 2022-12-14
- 1.2.13 — 2022-12-14
- 1.2.12 — 2022-10-01
- 1.2.11 — 2022-09-30
- 1.2.10 — 2022-05-27
- 1.2.9 — 2022-05-17
- 1.2.8 — 2022-04-30
- 1.2.7 — 2022-02-11
- 1.2.6 — 2022-02-11
- 1.2.5 — 2022-02-10
- 1.2.4 — 2022-02-05
- … 10 more at https://npm.io/package/@pedalboard/eslint-plugin-craftsmanlint/versions

## README

# @pedalboard/eslint-plugin-craftsmanlint

A set of ESLint rules for your code craftsmanship.

## Installation

### yarn
```bash
yarn add @pedalboard/eslint-plugin-craftsmanlint -D
```

### npm
```bash
npm install @pedalboard/eslint-plugin-craftsmanlint -D
```

## Setup

Add the plugin to your ESLint configuration file (`.eslintrc.json`):

```json
{
    "plugins": ["@pedalboard/craftsmanlint"],
    "rules": {
        "@pedalboard/craftsmanlint/no-namespace-imports": "error"
    }
}
```

## Rules

### no-namespace-imports

Disallows namespace imports (e.g., `import * as something from 'module'`).

Namespace imports can make it harder to tree-shake unused code and can obscure which specific exports are being used. This rule encourages the use of named imports for better code clarity and optimization.

#### Configuration

**Basic usage** - Disallow namespace imports from all modules:

```json
{
    "rules": {
        "@pedalboard/craftsmanlint/no-namespace-imports": "error"
    }
}
```

**With specific modules** - Only disallow namespace imports from certain modules:

```json
{
    "rules": {
        "@pedalboard/craftsmanlint/no-namespace-imports": [
            "error",
            {
                "forbiddenModules": ["lodash", "./utils"]
            }
        ]
    }
}
```

#### Examples

**Invalid code:**

```javascript
// When rule is enabled for all modules
import * as utils from './utils';
import * as _ from 'lodash';

// When rule is configured with forbiddenModules: ['lodash']
import * as _ from 'lodash';
```

**Valid code:**

```javascript
// Named imports are always allowed
import {map, filter} from 'lodash';
import {myFunction} from './utils';

// Default imports are allowed
import React from 'react';
```

## License

MIT

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