# eslint-plugin-doc-code-blocks

> Lint JavaScript in block comment code blocks

Latest version **0.3.1** (published 2017-02-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-doc-code-blocks
pnpm add eslint-plugin-doc-code-blocks
yarn add eslint-plugin-doc-code-blocks
bun add eslint-plugin-doc-code-blocks
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2017-02-15 |
| First published | 2017-02-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ilya Radchenko |
| Maintainers | knownasilya |
| Keywords | eslint, eslintplugin, eslint-plugin, jsdoc, yuidoc, comments, code fences, comment code, lint |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-doc-code-blocks
- npm.io page: https://npm.io/package/eslint-plugin-doc-code-blocks

## Dependencies (2)

- [line-column](https://npm.io/package/line-column.md) ^1.0.2
- [extract-comments](https://npm.io/package/extract-comments.md) ^0.10.1

## 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

- 0.3.1 (latest) — 2017-02-15
- 0.3.0 — 2017-02-15
- 0.2.7 — 2017-02-15
- 0.2.6 — 2017-02-14
- 0.2.5 — 2017-02-14
- 0.2.4 — 2017-02-14
- 0.2.3 — 2017-02-14
- 0.2.2 — 2017-02-14
- 0.2.1 — 2017-02-14
- 0.2.0 — 2017-02-14
- 0.1.3 — 2017-02-13
- 0.1.2 — 2017-02-13
- 0.1.1 — 2017-02-13
- 0.1.0 — 2017-02-13
- 0.0.3 — 2017-02-13
- … 3 more at https://npm.io/package/eslint-plugin-doc-code-blocks/versions

## README

# eslint-plugin-doc-code-blocks

Lint JavaScript in block comment code blocks

[![Build Status](https://travis-ci.org/knownasilya/eslint-plugin-doc-code-blocks.svg?branch=master)](https://travis-ci.org/knownasilya/eslint-plugin-doc-code-blocks)

![Screenshot](screenshot.png)

## Installation

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

```
$ npm i eslint --save-dev
```

Next, install `eslint-plugin-doc-code-blocks`:

```
$ npm install eslint-plugin-doc-code-blocks --save-dev
```

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-doc-code-blocks` globally.

## Usage

Add `doc-code-blocks` to the plugins section of your `.eslintrc.js` configuration file. You can omit the `eslint-plugin-` prefix:

```js
module.exports = {
  plugins: [
    'doc-code-blocks'
  ]
};
```

## Configuration

By default, the `doc-code-blocks` plugin uses the default ESLint rules, and the values for these could change
from one ESLint release to another. So you'd want to lock in your rules, or you might want different rules
then your code base. This is how you'd do that.

In a file like `.doc.eslintrc.js` or equivalent, set something like:

```js
module.exports = {
  extends: [
    'plugin:doc-code-blocks/recommended'
  ],
  plugins: [
    'doc-code-blocks'
  ],
  rules: {
    'quotes': ['error', 'single']
  }
};
```

You can now call this via `eslint --config .doc.eslintrc.js your_files`, basically you'd have to calls to `esslint`, one for your code
and one for the comments.

You can use all of the default ESLint rules here, like `quotes` above.

*Note: This plugin doesn't currently provide any rules of it's own.*

### Available Extends

- `'plugin:doc-code-blocks/all'` - This is essentially `eslint:all`, and can break your build from release to release, since all rules are enabled,
  even new ones. Make sure to turn off rules you don't want, if using this mode.
- `'plugin:doc-code-blocks/recommended'` - This is essentially `eslint:recommended`, and shouldn't break within a major version of ESLint.

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