# eslint-config-node

> Pluggable eslint config for Node.js that you can import, extend and override

Latest version **4.1.0** (published 2020-05-29) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2020-05-29 |
| First published | 2016-07-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 45 |
| Author | kunalgolani@gmail.com |
| Maintainers | kunalgolani |
| Keywords | eslint, eslint-config, eslintconfig, node, node.js |

## Links

- npm: https://www.npmjs.com/package/eslint-config-node
- Repository: https://github.com/kunalgolani/eslint-config
- Homepage: https://github.com/kunalgolani/eslint-config/tree/master/packages/node#readme
- Issues: https://github.com/kunalgolani/eslint-config/issues
- npm.io page: https://npm.io/package/eslint-config-node

## Dependencies (2)

- [eslint](https://npm.io/package/eslint.md) ^6.8.0
- [eslint-config-esnext](https://npm.io/package/eslint-config-esnext.md) ^4.1.0

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

- 4.1.0 (latest) — 2020-05-29
- 4.0.0 — 2018-09-28
- 3.0.2 — 2018-09-28
- 3.0.1 — 2018-09-28
- 3.0.0 — 2018-06-10
- 2.0.0 — 2017-12-09
- 1.6.0 — 2016-08-28
- 1.5.0 — 2016-08-26
- 1.4.0 — 2016-08-08
- 1.2.1 — 2016-07-19
- 1.2.0 — 2016-07-19
- 1.1.0 — 2016-07-19
- 1.0.0 — 2016-07-19
- 0.1.1 — 2016-07-18
- 0.1.0 — 2016-07-15
- … 1 more at https://npm.io/package/eslint-config-node/versions

## README

## Pluggable [ESLint](http://eslint.org/docs/about/) [config](http://eslint.org/docs/developer-guide/shareable-configs) for [Node.js](https://nodejs.org) that you can import, extend and override

[![Join the chat at https://gitter.im/kunalgolani/eslint-config ][gitter-img]][gitter-url]
[![npm version][version-img]][npm-url]
[![npm downloads][downloads-img]][npm-url]
[![GitHub issues][issues-img]][issues-url]
[![Deps][deps-img]][deps-url]
[![Dev Deps][devdeps-img]][deps-url]

### Node.js: Safety Checks and Best Practices with a bias toward code concision / brevity

#### Usage

In your js project directory:

```shell
npm install --save-dev eslint-config-node
```

And in your `.eslintrc.yaml`:

```yaml
extends:
  - node
```

Alternatively, in your `.eslintrc.js` or `.eslintrc.json`:

```json
{
  "extends": ["node"]
}
```

To add a git-hook to your commits, consider using [husky](https://github.com/typicode/husky)

```shell
npm install --save-dev husky
```

And in your `package.json`:

```json
  "scripts": {
    "precommit": "eslint ."
  }
```

---

#### Config

This config is biased and opinionated, and errs on the side of too many rules instead of too few. Think of this as a superset of your repo's lint config, and discard what you don't like in it. It's easy to override and disable the rules you find inconvenient.

```yaml
env:
  node: true
```

[enables](http://eslint.org/docs/user-guide/configuring#specifying-environments) Node.js features and global variables

```yaml
extends: esnext
```

includes config and rules from [eslint-config-esnext](https://github.com/kunalgolani/eslint-config/tree/master/packages/esnext)

```yaml
rules:
```

selected [from here](http://eslint.org/docs/rules/#nodejs-and-commonjs), configured to:

- [`no-path-concat`](http://eslint.org/docs/rules/no-path-concat): disallow string concatenation with `__dirname` and `__filename`
- [`no-process-exit`](http://eslint.org/docs/rules/no-process-exit): disallow the use of `process.exit()`
- [`no-sync`](http://eslint.org/docs/rules/no-sync): disallow synchronous methods; set to warn only

---

### [Node.js Style Guide](https://github.com/kunalgolani/eslint-config/tree/master/packages/node/style-guide)

[gitter-img]: https://badges.gitter.im/kunalgolani/eslint-config.svg
[gitter-url]: https://gitter.im/kunalgolani/eslint-config?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[version-img]: https://img.shields.io/npm/v/eslint-config-node.svg
[npm-url]: https://www.npmjs.com/package/eslint-config-node
[downloads-img]: https://img.shields.io/npm/dt/eslint-config-node.svg
[issues-img]: https://img.shields.io/github/issues-raw/kunalgolani/eslint-config.svg?maxAge=2592000
[issues-url]: https://github.com/kunalgolani/eslint-config/issues
[deps-img]: https://img.shields.io/david/kunalgolani/eslint-config.svg
[devdeps-img]: https://img.shields.io/david/dev/kunalgolani/eslint-config.svg
[deps-url]: https://github.com/kunalgolani/eslint-config/blob/master/node/package.json

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