Skip to content

adonisjs/eslint-config

Repository files navigation

@adonisjs/eslint-config

Compatible with ESLint 9.0 and Prettier 3.0



ESLint presets used by the AdonisJS core team

The adonisjs/eslint-config ships with the default set of ESLint rules used by the AdonisJS core team. The presets are tuned to work alongside Prettier.


npm-image license-image

Installation

Install the package from the npm registry.

npm i -D @adonisjs/eslint-config

# Install peer dependencies
npm i -D eslint@9 prettier@3

Usage

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

For package development: Use the following preset when developing a package

// eslint.config.js
import { configPkg } from '@adonisjs/eslint-config'
export default configPkg()

For app development: Use the following preset when developing an AdonisJS application

// eslint.config.js
import { configApp } from '@adonisjs/eslint-config'
export default configApp()

Adding additional config blocks

You can pass additional config blocks as multiple arguments to one of the preset functions.

import { configApp, INCLUDE_LIST, IGNORE_LIST } from '@adonisjs/eslint-config'

export default configApp({
  name: 'Custom config',
  files: INCLUDE_LIST,
  ignores: IGNORE_LIST,
  plugins: {
    // ESLint plugins go here
  },
  rules: {
    // ESLint rules go here
  },
})
Built with ❤︎ by Julien Ripouteau and Harminder Virk

About

ESLint presets used by the AdonisJS core team

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 5

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy