@dirupt/eslint-config

2.1.0 • Public • Published

DIRUPT ESLint Config - For ESLint 9


ESLint presets used by the DIRUPT core team

DIRUPT ESLint Config provides a set of carefully curated ESLint rules and configurations to ensure consistent code style and quality across projects. This package encapsulates the best practices and coding standards used by the DIRUPT core team, helping developers write clean, maintainable, and error-free JavaScript and TypeScript code.


license-image npm-image

Installation

Install the package from the npm registry.

pnpm add -D @dirupt/eslint-config

# Make sure also to install the following packages
pnpm add -D eslint@9 prettier@3

Usage

After installation, use one of the following presets depending on the nature of your application/library/project.

For AdonisJS

// eslint.config.{js,mjs,ts}
import { configApp } from '@adonisjs/eslint-config'
import { configAdonis } from '@dirupt/eslint-config'

export default configApp(configAdonis())

For React

// eslint.config.{js,mjs,ts}
import { configReact } from '@dirupt/eslint-config'

export default configReact()

For TypeScript

// eslint.config.{js,mjs,ts}
import { configTypescript } from '@dirupt/eslint-config'

export default configTypescript()

For Recommended

// eslint.config.{js,mjs,ts}
import { configRecommanded } from '@dirupt/eslint-config'

export default configRecommanded()

Combining Configurations:

You can combine multiple configurations. For example:

// eslint.config.{js,mjs,ts}
import { configTypescript, configRecommanded, configReact } from '@dirupt/eslint-config'

export default configTypescript(configRecommanded(configReact()))

Available Configurations

  • configAdonis(): Configuration for AdonisJS projects
  • configReact(): Configuration for React projects
  • configTypescript(): Configuration for TypeScript projects
  • configRecommanded(): Recommended configuration for general JavaScript/TypeScript projects

Each configuration can be customized by passing additional options or rules.

Plugins and Rules

This package includes several plugins and predefined rules:

  • Import plugin and rules
  • Unused imports plugin and rules
  • Prettier plugin and rules
  • TypeScript-specific rules (when using configTypescript)
  • React-specific rules (when using configReact)

For detailed information about the rules and plugins, please refer to the source code or documentation of each specific configuration.

Built with ❤︎ by Philippe Desplats - Project based on AdonisJS Prettier Config

/@dirupt/eslint-config/

    Package Sidebar

    Install

    npm i @dirupt/eslint-config

    Weekly Downloads

    1,187

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    17 kB

    Total Files

    12

    Last publish

    Collaborators

    • philippe.desplats
    • redekproject