# @smnielsen/eslint-config

> ESLint configuration for smnielsen products

Latest version **0.5.3** (published 2022-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @smnielsen/eslint-config
pnpm add @smnielsen/eslint-config
yarn add @smnielsen/eslint-config
bun add @smnielsen/eslint-config
```

## 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.5.3 |
| Published | 2022-02-03 |
| First published | 2019-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Simon |
| Maintainers | smnielsen |
| Keywords | eslint, eslint-config, config, react, typescript, node |

## Links

- npm: https://www.npmjs.com/package/@smnielsen/eslint-config
- Repository: https://github.com/smnielsen/smn-linting
- Homepage: https://github.com/smnielsen/smn-linting/blob/master/packages/eslint-config/README.md
- Issues: https://github.com/smnielsen/smn-linting/issues
- npm.io page: https://npm.io/package/@smnielsen/eslint-config

## Dependencies (5)

- [eslint-plugin-node](https://npm.io/package/eslint-plugin-node.md) ^11.1.0
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.25.4
- [eslint-plugin-promise](https://npm.io/package/eslint-plugin-promise.md) ^6.0.0
- [eslint-plugin-security](https://npm.io/package/eslint-plugin-security.md) ^1.4.0
- [eslint-plugin-standard](https://npm.io/package/eslint-plugin-standard.md) 5.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.5.3 (latest) — 2022-02-03
- 0.5.2 — 2022-02-03
- 0.5.1 — 2022-02-03
- 0.5.0 — 2022-02-03
- 0.4.1 — 2020-06-30
- 0.4.0 — 2020-06-30
- 0.3.0 — 2020-06-13
- 0.2.0 — 2020-06-13
- 0.1.0 — 2020-04-11
- 0.0.3 — 2019-12-01
- 0.0.2 — 2019-12-01
- 0.0.1 — 2019-12-01

## README

# @smnielsen/eslint-config

A shared [ESLint](https://eslint.org) config for @smnielsen. Rules are carefully selected to be as restrictive as necessary but no more. This config aims to reduce bugs and cause as much consistency as possible in a codebase while keeping the code readable even for not-so-experienced developers.

## Installation

Depending which linting you want to run you need to install different set of plugins. This module will not force install any dependencies.

### To start install the base that always is required

```sh
yarn add -D eslint @smnielsen/eslint-config
```

### Then add an `.eslintrc.json` file with the following content to the root of your project and install dependencies

```json
{
  "extends": ["@smnielsen/eslint-config"]
}
```

#### Add linting for React/JSX

```json
{
  "extends": ["@smnielsen", "@smnielsen/eslint-config/react"]
}
```

##### Install plugins

```terminal
yarn add -D eslint-plugin-react eslint-config-react-app eslint-config-prettier eslint-plugin-jsx-a11y eslint-plugin-react-hooks babel-eslint eslint-plugin-flowtype react
```

#### Add linting for Vue

```json
{
  "extends": ["@smnielsen", "@smnielsen/eslint-config/vue"]
}
```

##### Install plugins

```terminal
yarn add -D vue @vue/eslint-config-prettier eslint-plugin-jsx-a11y
```

#### Add linting with Prettier

If you're using Prettier as well, use this to run with prettier.
Make sure the prettier config always is last

```json
{
  "extends": ["@smnielsen", "@smnielsen/eslint-config/prettier"]
}
```

##### Install plugins

```terminal
yarn add -D eslint-config-prettier
```

#### Add linting with TypeScript

If you want to use TypeScript, that's fine:

```json
{
  "extends": ["@smnielsen", "@smnielsen/eslint-config/typescript"]
}
```

##### Install plugins

```terminal
yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript
```

### If you use Mocha+Chai instead of Jest

#### Add linting for Mocha and Chai:

```json
{
  "extends": ["@smnielsen", "@smnielsen/eslint-config/mocha"]
}
```

##### Install plugins

```terminal
yarn add -D eslint-plugin-mocha eslint-plugin-chai-expect eslint-plugin-chai-friendly
```

### Application Ready Examples

#### React + Typescript + Prettier

```json
{
  "extends": [
    "@smnielsen",
    "@smnielsen/eslint-config/react",
    "@smnielsen/eslint-config/typescript",
    "@smnielsen/eslint-config/prettier"
  ]
}
```

##### Install plugins

```terminal
yarn add -D eslint-plugin-react eslint-config-react-app eslint-config-prettier eslint-plugin-jsx-a11y eslint-plugin-react-hooks babel-eslint eslint-plugin-flowtype react eslint-config-prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript
```

#### Vue + Typescript + Prettier

```json
{
  "extends": [
    "@smnielsen",
    "@smnielsen/eslint-config/vue",
    "@smnielsen/eslint-config/typescript",
    "@smnielsen/eslint-config/prettier"
  ]
}
```

##### Install plugins

```terminal
yarn add -D vue @vue/eslint-config-prettier eslint-config-prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript
```

For more information see: http://eslint.org/docs/user-guide/configuring

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