3.0.0-rc.5 • Published 2 years ago

@leandromatos/eslint-config v3.0.0-rc.5

Weekly downloads
14
License
MIT
Repository
github
Last release
2 years ago

ESlint Config

!IMPORTANT

This package requires ESLint v9 or higher. For older ESLint versions, please use v2.x of this package.

This is a custom and sharable ESLint configuration for TypeScript, JavaScript, and React projects. It includes the following packages:

Core ESLint Packages

  • eslint - The core ESLint linting engine
  • @eslint/js - ESLint's built-in JavaScript rules and configurations
  • @eslint/eslintrc - Compatibility utilities for ESLint configuration formats

TypeScript Support

Code Formatting

Import Management

React Support

Additional Linting

Installation

!NOTE

It's crucial to note that you must install the typescript package, even in a project that uses only JavaScript. This is because ESLint leverages TypeScript to parse the code and provide more accurate error messages.

Use your preferred package manager to install the ESLint configuration:

yarn add --dev eslint typescript @leandromatos/eslint-config

You can use any package manager of your choice (npm, pnpm, bun, etc.)

Configuration

Create a new eslint.config.js file in the root of your project and add the following content:

const { config } = require("@leandromatos/eslint-config")

module.exports = [
  ...config
]

ESM Projects

If you're using ES modules, create an eslint.config.mjs file instead:

import { config } from "@leandromatos/eslint-config"

export default [
  ...config
]

Customization

If you want to override or add additional rules, you can extend the configuration by adding new configuration objects to the array:

const { config } = require("@leandromatos/eslint-config")

module.exports = [
  ...config,
  {
    rules: {
      "no-unused-vars": "warn",
      "prefer-const": "error"
    }
  }
]

Project-specific Configuration

You can also apply different rules to specific file patterns:

const { config } = require("@leandromatos/eslint-config")

module.exports = [
  ...config,
  {
    files: ["**/*.test.{js,ts,jsx,tsx}"],
    rules: {
      "no-console": "off"
    }
  }
]

License

This package is licensed under the MIT License. For more information, see the LICENSE file.

3.0.0-rc.24

1 year ago

3.0.0-rc.23

1 year ago

3.0.0-rc.26

1 year ago

3.0.0-rc.25

1 year ago

3.0.0-rc.28

10 months ago

3.0.0-rc.27

11 months ago

3.0.0-rc.29

7 months ago

3.0.0-rc.22

1 year ago

3.0.0-rc.21

1 year ago

3.0.0-rc.30

7 months ago

3.0.0-rc.20

1 year ago

3.0.0-rc.17

1 year ago

3.0.0-rc.19

1 year ago

3.0.0-rc.18

1 year ago

3.0.0-rc.16

1 year ago

3.0.0-rc.15

1 year ago

3.0.0-rc.14

1 year ago

3.0.0-rc.13

1 year ago

3.0.0-rc.12

2 years ago

3.0.0-rc.11

2 years ago

3.0.0-rc.10

2 years ago

3.0.0-rc.9

2 years ago

3.0.0-rc.8

2 years ago

3.0.0-rc.7

2 years ago

3.0.0-rc.6

2 years ago

3.0.0-rc.5

2 years ago

3.0.0-rc.4

2 years ago

3.0.0-rc.2

2 years ago

3.0.0-rc.1

2 years ago

3.0.0-rc.0

2 years ago

3.0.0-rc.3

2 years ago

2.2.11

2 years ago

2.3.0

2 years ago

2.2.1

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.7

2 years ago

2.2.6

2 years ago

2.2.10

2 years ago

2.1.1

2 years ago

2.2.9

2 years ago

2.2.8

2 years ago

2.1.0

3 years ago

1.3.4

3 years ago

1.4.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.3.3

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

0.0.22

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.19

4 years ago

0.0.15

5 years ago

0.0.13

5 years ago

0.0.14

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8-0

5 years ago

0.0.8

5 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago