# babel-plugin-clean-code

> A babel plugin to delete console[log/warn/error/info] and debugger in source code

Latest version **0.0.3** (published 2021-02-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-clean-code
pnpm add babel-plugin-clean-code
yarn add babel-plugin-clean-code
bun add babel-plugin-clean-code
```

## Health

**Score 25/100 (F)** — status: abandoned.

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

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2021-02-05 |
| First published | 2021-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Fukang Wang |
| Maintainers | wfk007 |
| Keywords | babel, babel-plugin, babel-plugin-clean-code, clean, console, debugger |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-clean-code
- Repository: https://github.com/wfk007/babel-plugin-clean-code
- Issues: https://github.com/wfk007/babel-plugin-clean-code/issues
- npm.io page: https://npm.io/package/babel-plugin-clean-code

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2021-02-05
- 0.0.2 — 2021-02-05
- 0.0.1 — 2021-02-04

## README

# README

## babel-plugin-clean-code

### usage

```shell
$ npm install babel-plugin-clean-code -D
```

in your babel config file or babel-loader

```json
{
  "plugins": [["babel-plugin-clean-code", options]]
}
```

#### options

default options are as below：

```ts
{
  clearConsole: true,
  consoleLevel: ["log", "error", "info", "warn"],
  clearDebugger: true,
}
```

#### ts

```ts
interface IBabelPluginCleanCode {
  clearConsole: boolean;
  clearDebugger: boolean;
  consoleLevel: ReadonlyArray<"log" | "error" | "info" | "warn">;
}
```

## test

```shell
$ npm run test
```

## build

```
$ npm run build
```

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