Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 2 months ago
JSON representation
ESLint configuration used by Leonardo Lissone.
- Host: GitHub
- URL: https://github.com/lissone/eslint-config-lissone
- Owner: Lissone
- Created: 2024-08-20T01:42:56.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-05T00:01:00.000Z (4 months ago)
- Last Synced: 2024-10-15T17:44:02.320Z (2 months ago)
- Topics: eslint, eslint-import-plugin, eslint-import-resolver, eslint-plugin-unicorn, eslint-stylistic, eslint-typescript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@lissone/eslint-config
- Size: 62.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Lissone ESLint Config
Description |
Plugins |
Setup |
Configuration |
Version |
License
## 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