Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

ESLint configuration used by Leonardo Lissone.
https://github.com/lissone/eslint-config-lissone

eslint eslint-import-plugin eslint-import-resolver eslint-plugin-unicorn eslint-stylistic eslint-typescript

Last synced: 24 days ago
JSON representation

ESLint configuration used by Leonardo Lissone.

Awesome Lists containing this project

README

        


Lissone ESLint Config


Description   |   
Plugins   |   
Setup   |   
Configuration   |   
Version   |   
License


License
Repo size
Top lang
Stars repo
Forks repo
Pull requests
Last commit


Report bug
·
Request feature

## Description

I created this ESLint extension with the goal of keeping my projects consistently standardized and simplifying the lint configuration process across different environments. The main idea is to centralize all the rules and path aliases I frequently use, ensuring consistency and code quality, regardless of the project.

I'm open to any suggestions that can contribute to the improvement of this shared ESLint configuration.

## Plugins

This configuration includes the following plugins:

- [Typescript](https://github.com/typescript-eslint/typescript-eslint)
- [Stylistic](https://github.com/eslint-community/eslint-plugin-stylistic)
- [Unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
- [Promise](https://github.com/eslint-community/eslint-plugin-promise)
- [Import](https://github.com/import-js/eslint-plugin-import)
- [Import Resolver Alias](https://github.com/johvin/eslint-import-resolver-alias)
- [Security](https://github.com/nodesecurity/eslint-plugin-security)
- [ESLint Comments](https://github.com/mysticatea/eslint-plugin-eslint-comments)
- [React](https://github.com/jsx-eslint/eslint-plugin-react)
- [React Hooks](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks)
- [Next](https://github.com/vercel/next.js)
- [JSX a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)

## Setup

### React (with Next.js)

Install dependencies:

```bash
npm i -D eslint @lissone/eslint-config
```

Inside `.eslintrc`:

```json
{
"extends": "@lissone/eslint-config/next"
}
```

### React

Install dependencies:

```bash
npm i -D eslint @lissone/eslint-config
```

Inside `.eslintrc`:

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

### Node.js

Install dependencies:

```bash
npm i -D eslint @lissone/eslint-config
```

Inside `.eslintrc`:

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

## Configuration

### Import Paths

To configure import paths using this configuration, add the following to your `.eslintrc`:

```json
{
"settings": {
"import/resolver": {
"alias": {
"map": [
["@", "./src"],
["@shared", "./src/shared"]
],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}
```

If your project uses TypeScript, make sure to add these aliases to your `tsconfig.json` as well:

```json
{
"compilerOptions": {
"baseUrl": "./src",
"paths": {
"@/*": ["./*"],
"@shared/*": ["shared/*"]
}
}
}
```

### Overriding Rules

You can override any rule specified in the base configuration. For example, to change the `no-console` rule, add the following to your `.eslintrc`:

```json
{
"rules": {
"no-console": "warn"
}
}
```

## Version

This configuration requires ESLint version **8.57.0**. If your project uses TypeScript, it is recommended to use a version above **5.0.0**.

## License

Distributed under the MIT License. See `LICENSE` for more information.


Made with ❤️ by Lissone