Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/autosseyai/eslint-config

A base for projects that use ESLint.
https://github.com/autosseyai/eslint-config

eslint eslint-config react typescript typescript-react

Last synced: about 2 months ago
JSON representation

A base for projects that use ESLint.

Awesome Lists containing this project

README

        


@autossey/eslint-config



npm


typescript


A base for projects that use ESLint.


_If I should maintain this repo, please ⭐️_

GitHub stars

_DM me on [Twitter](https://twitter.com/bconnorwhite) if you have questions or suggestions._

Twitter Follow

---

This package provides a base ESLint config for TypeScript, and a second for TypeScript with React.

## Installation



NPM

```sh
npm install --save-dev @autossey/eslint-config
```



Yarn

```sh
yarn add --dev @autossey/eslint-config
```


PNPM

```sh
pnpm add --save-dev @autossey/eslint-config
```


Bun

```sh
bun add --dev @autossey/eslint-config
```

## Usage

In your `package.json` file:

**TypeScript**

This is a generic config for projects that use TypeScript.

```json
{
"eslintConfig": {
"extends": "@autossey/eslint-config"
}
}
```

**Node**

The `node` config extends the `typescript` config and adds rules for Node.js.

```json
{
"eslintConfig": {
"extends": "@autossey/eslint-config/node"
}
}
```

**React**

The `react` config extends the `typescript` config and adds rules for React.

```json
{
"eslintConfig": {
"extends": "@autossey/eslint-config/react"
}
}
```

### Running ESLint

Now to run ESLint, run `yarn eslint source` or `npm run eslint source`.

## Updates

As this package updates, bug fixes are considered patch updates as usual.

Rule changes are considered minor updates. Rule changes can cause linting errors in your code, If you want to avoid rule changes, you can set your package to use a specific minor version of this package with the `~` operator:

```json
{
"devDependencies": {
"@autossey/eslint-config": "~0.2.0"
}
}
```


Dependenciesdependencies

- [@types/eslint](https://www.npmjs.com/package/@types/eslint): TypeScript definitions for eslint
- [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin): TypeScript plugin for ESLint
- [@typescript-eslint/parser](https://www.npmjs.com/package/@typescript-eslint/parser): An ESLint custom parser which leverages TypeScript ESTree
- [eslint-plugin-i](https://www.npmjs.com/package/eslint-plugin-i): A fork of `eslint-plugin-import` using `get-tsconfig` to replace `tsconfig-paths` and heavy `typescript` under the hood.
- [eslint-plugin-json](https://www.npmjs.com/package/eslint-plugin-json): eslint plugin for JSON files
- [eslint-plugin-n](https://www.npmjs.com/package/eslint-plugin-n): Additional ESLint's rules for Node.js
- [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react): React specific linting rules for ESLint
- [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks): ESLint rules for React Hooks


Peer Dependencies

- [eslint](https://www.npmjs.com/package/eslint): An AST-based pattern checker for JavaScript.


Dev Dependencies

- [@autossey/tsconfig](https://www.npmjs.com/package/@autossey/tsconfig): A collection of base TSConfigs for various types of projects.
- [eslint](https://www.npmjs.com/package/eslint): An AST-based pattern checker for JavaScript.


License license

[MIT](https://opensource.org/licenses/MIT) - _MIT License_