https://github.com/adonisjs/eslint-config
ESLint presets used by the AdonisJS core team
https://github.com/adonisjs/eslint-config
Last synced: 12 months ago
JSON representation
ESLint presets used by the AdonisJS core team
- Host: GitHub
- URL: https://github.com/adonisjs/eslint-config
- Owner: adonisjs
- License: mit
- Created: 2024-08-21T10:14:04.000Z (almost 2 years ago)
- Default Branch: 2.x
- Last Pushed: 2025-06-18T03:59:53.000Z (about 1 year ago)
- Last Synced: 2025-06-18T04:36:09.485Z (about 1 year ago)
- Language: JavaScript
- Size: 64.5 KB
- Stars: 8
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# @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]][npm-url] [![license-image]][license-url]
## Installation
Install the package from the npm registry.
```sh
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
```ts
// eslint.config.js
import { configPkg } from '@adonisjs/eslint-config'
export default configPkg()
```
**For app development**: Use the following preset when developing an AdonisJS application
```ts
// 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.
```ts
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
},
})
```
[npm-image]: https://img.shields.io/npm/v/@adonisjs/eslint-config/latest.svg?style=for-the-badge&logo=npm
[npm-url]: https://www.npmjs.com/package/@adonisjs/eslint-config/v/latest 'npm'
[license-url]: LICENSE.md
[license-image]: https://img.shields.io/github/license/adonisjs/adonis-framework?style=for-the-badge