@rkulik/eslint-config
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@rkulik/eslint-config

René's ESLint configuration.

Usage

Install

pnpm add -D eslint @rkulik/eslint-config

Configure

Once installed, create an eslint.config.js in your project root:

import rkulik from '@rkulik/eslint-config';

// eslint-disable-next-line import/no-default-export
export default rkulik();

Run

Add a script to your package.json that runs ESLint:

{
  "scripts": {
    "lint": "eslint . -c eslint.config.js"
  }
}

Customization

Toggle default configurations

By default, rkulik includes or excludes multiple configurations based on locally installed packages. However, you can configure which configurations should be included or excluded as needed:

// eslint.config.js
import rkulik from '@rkulik/eslint-config';

export default rkulik({ imports: false });

Add configuration overrides

As a second parameter, rkulik accepts custom configuration overrides, allowing you to modify or extend the default settings:

// eslint.config.js
import rkulik from '@rkulik/eslint-config';

// eslint-disable-next-line import/no-default-export
export default rkulik({}, { ignores: ['**/some-directory'] });

Create custom configurations

This package also exports all available configurations and utilities. These exports allow you to create your own customized configurations:

// eslint.config.js
import { configs, utils } from '@rkulik/eslint-config';

// eslint-disable-next-line import/no-default-export
export default utils.combineConfigs(
  configs.destructuring,
  configs.ignores,
  configs.imports,
  configs.javascript,
  configs.preferArrow,
  configs.prettier,
  configs.react,
  configs.tailwindcss,
  configs.typescript,
);

License

Distributed under the MIT License, Copyright © 2024-PRESENT René Kulik

Package Sidebar

Install

npm i @rkulik/eslint-config

Weekly Downloads

4

Version

1.2.0

License

MIT

Unpacked Size

20.7 kB

Total Files

7

Last publish

Collaborators

  • rkulik