# @devoinc/eslint-config-devo

> Devo's ESlint configurations

Latest version **1.1.0** (published 2024-04-16) · UNLICENSED license · 0 weekly downloads

## Install

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

## 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 | 1.1.0 |
| Published | 2024-04-16 |
| First published | 2022-10-17 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 3 |
| Unpacked size | 23.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Devo |
| Maintainers | devo_ci |
| Keywords | Devo, ESlint |

## Links

- npm: https://www.npmjs.com/package/@devoinc/eslint-config-devo
- Repository: https://github.com/devoinc/eslint-config-devo
- Homepage: https://github.com/devoinc/eslint-config-devo#readme
- Issues: https://github.com/devoinc/eslint-config-devo/issues
- npm.io page: https://npm.io/package/@devoinc/eslint-config-devo

## Dependencies (3)

- [@babel/eslint-parser](https://npm.io/package/@babel/eslint-parser.md) ^7.21.8
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^8.8.0
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^5.59.5

## 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
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2024-04-16
- 1.0.2 — 2023-05-10
- 1.0.1 — 2022-11-03
- 1.0.0 — 2022-10-17
- 1.0.0-alpha.1 — 2022-10-17

## README

# `@devoinc/eslint-config-devo`

This is an eslint config package. It exports several eslint confgs for projects with react and js or ts.

# Usage

1. ## **Install this package**:

   ```bash
   $ npm install --dev @devoinc/eslint-config-devo
   ```

2. ## **Install dependencies**:

   - If you're using npm < 7, install this package's **peerDependencies** as devDependencies (npm >= 7 will install them automatically for you):
     ```bash
     $ npm install -D eslint eslint-plugin-react eslint-plugin-react-hooks
     ```
   - If you're going to use a config with typescript add `@typescript-eslint/eslint-plugin` to your devDependencies.
   - If you're going to use a config with jest add `eslint-plugin-jest` to to your devDependencies.

3. ## **Add it to your project's eslint config file**:

   - Edit your eslint config file (`.eslintrc.*`) and extend one of the exported configurations (see available configurations below). Examples:

     ```javascript
     {
       "extends": ["@devoinc/eslint-config-devo/js-react"]
     }
     ```

     or

     ```javascript
       {
         "extends": ["@devoinc/eslint-config-devo/ts-react-newJsx-jest"]
       }
     ```

## Optional: If you want to add Prettier to your config:

Prettier is not required and has nothing to do with `@devoinc/eslint-config-devo` but we recommend adding Prettier to your dev environment.

- Install [Prettier](https://prettier.io/)
- Set up Prettier. We recommend using our prettier config shared configuration, named `@devoinc/prettier-config`: https://github.com/DevoInc/prettier-config

  ```bash
  $ npm install -D @devoinc/prettier-config
  ```

  Then, configure it adding this to your `package.json` file:

  ```javascript
   {
     "prettier": "@devoinc/prettier-config"
   }
  ```

  Note: If you use a prettier shared config, you can still extend/override it in your project's configuration, the same as with the eslint config.

# Available configurations:

This package exports a number of eslint configurations. Choose the one that better applies to your project. Keep in mind these recommendations:

- There are 2 `classic` configs. They exist to maintain compatibility with predecessor projects. Prefer other configs for new projects, as they add more rules and support ESModules out of the box.
- It is recommended to use configs with `-jest` suffix only for [Jest](https://jestjs.io/) test files. You can either create an eslint config file for a folder where you have your test files or you can use the [overrides keyword](https://github.com/jest-community/eslint-plugin-jest#running-rules-only-on-test-related-files) in your eslint config. On how to use it, check out the [Example project](#example-project) section below.

  ## Javascript configs (each config extends the previous one):

  - `@devoinc/eslint-config-devo/js-react`: javascript base config with react recommended rules (includes hooks rules)
  - `@devoinc/eslint-config-devo/js-react-jest`: javascript, react and jest recommended rules
  - `@devoinc/eslint-config-devo/js-react-newJsx`: javascript and react with [new JSX](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports). Overrides js-react.
  - `@devoinc/eslint-config-devo/js-react-newJsx-jest`: javascript, react with new JSX and jest

  ## Classic javascript configs:

  - `@devoinc/eslint-config-devo/js-classic-base`: very basic base config with few rules
  - `@devoinc/eslint-config-devo/js-classic-jest-react-prettier`: extends the previous one and also adds recommended rules for jest, react, react hooks and prettier. This packages requires Prettier. See notes above about Prettier. For this package you might need to install these extra devDependencies: `eslint-config-prettier eslint-plugin-jest eslint-plugin-prettier prettier`

  ## Typescript configs (each config extends the previous one):

  - `@devoinc/eslint-config-devo/ts-react`: typescript base config with react recommended rules (includes hooks rules)
  - `@devoinc/eslint-config-devo/ts-react-jest`: typescript, react and jest recommended rules
  - `@devoinc/eslint-config-devo/ts-react-newJsx`: typescript and react with [new JSX](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports). Overrides ts-react.
  - `@devoinc/eslint-config-devo/ts-react-newJsx-jest`: typescript, react with new JSX and jest

# Example project

If you have any questions, we have an [example project](https://github.com/DevoInc/React-App-Template) that can teach you how to use this package. See the `.eslintrc.cjs` and `package.json` files.

# Development of this package

There are 2 families of eslint configs in this package: Javascript and Typescript configs.
All the the javascript configs (except the classic configs) extend the `js-react` config. So if you make changes in the `js-react` config it will affect the others. The same goes for the `ts-react` config in the typescript configs family.

If you want to test your config you can use the `eslint . --debug` command in your consumer package to log all debugging info.

For more info about creating a shareable config see [the official docs](https://stackoverflow.com/questions/54246368/how-to-test-an-npm-module-with-peerdependencies).

# How to publish a new version

1. Bump the package version
2. Update the changelog
3. Create a new Github release

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