Skip to content

Delemangi/eslint-config-imperium

Repository files navigation

Imperium ESLint Config

This is a strict configuration for ESLint. It is meant for those who have never found a linter annoying before.

Currently supports ESLint v9 and the flat config only.

Quickstart

  1. Install dependencies: npm i --save-dev eslint eslint-config-imperium
  2. Create eslint.config.js (see Example Configuration)
  3. Run your linter: npm run lint (or npx eslint)

Example Configuration

// eslint.config.js
import { auto } from "eslint-config-imperium";

export default [auto, stylistic];

Configurations

This package is modular and includes several configurations intended to be enabled for certain environments. If you don't know what you need, you should probably use auto. Otherwise, pick a combination of the above configurations.

Main

  • auto - Special configuration in which some of the below configurations are enabled
  • base - Base framework and environment agnostic configuration

Frameworks / Environments

  • browser - Browser environment configuration
  • node - Node environment configuration
  • react - React configuration
  • typescript - TypeScript configuration
  • vitest - Vitest configuration

Style

You should not enable prettier and stylistic at the same time.

Plugins

This is a list of the currently used ESLint plugins:

Building

  1. Clone the repository: git clone https://github.com/Delemangi/eslint-config-imperium.git
  2. Install the dependencies: npm i
  3. Build the package: npm run build

After this, the build output will be placed in the lib folder. You may use it directly, pack it or whatever you'd like afterwards.

License

MIT