@arapucajs/eslint-config
v1.1.2
Published
The base configuration for ESLint used by ArapucaJS applications and packages
Readme
@arapucajs/eslint-config
Compatible with ESLint 9.0 and Prettier 3.0
Installation
Install the package from the npm registry.
npm i -D @arapucajs/eslint-config
# Install peer dependencies
npm i -D eslint@9 prettier@3Usage
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 '@arapucajs/eslint-config'
export default configPkg()For app development: Use the following preset when developing an application
// eslint.config.js
import { configApp } from '@arapucajs/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, GLOBAL_IGNORE_LIST } from '@arapucajs/eslint-config'
export default configApp({
name: 'Custom config',
files: INCLUDE_LIST,
ignores: GLOBAL_IGNORE_LIST,
plugins: {
// ESLint plugins go here
},
rules: {
// ESLint rules go here
},
})Available exports
The package exports the following functions and constants:
configPkg()- Configuration for package developmentconfigApp()- Configuration for application developmentINCLUDE_LIST- Default files to include in lintingGLOBAL_IGNORE_LIST- Files to ignore globallyAPP_IGNORE_LIST- Additional files to ignore for applicationsPLUGINS_LIST- Default plugins configurationRULES_LIST- Default rules configuration
Features
This ESLint configuration includes:
- Modern ESLint v9 support with flat config
- TypeScript and JavaScript support
- Prettier integration with automatic formatting
- Unicorn plugin for additional code quality rules
- Stylistic plugin for consistent code style
- Opinionated rules for clean, readable code
License
MIT
