Skip to content

omermecitoglu/eslint-config

Repository files navigation

@omer-x/eslint-config

npm version npm downloads codecov License: MIT GitHub last commit GitHub issues GitHub stars

This package contains my favorite ESLint rules, created following this tutorial on ESLint's shareable configs.

Installation

Install this package via npm:

npm install @omer-x/eslint-config --save-dev

Ensure you have the following peer dependencies installed:

  • eslint >= 9

Usage

Add the configuration to your ESLint configuration file (e.g., eslint.config.js or eslint.config.mjs):

import omer from "@omer-x/eslint-config";

export default [
  ...omer,
  {
    rules: {
      // add your other rules here
    },
  },
];

Or you can install components individually

import base from "@omer-x/eslint-config/base";
import stylistic from "@omer-x/eslint-config/stylistic";
import typescript from "@omer-x/eslint-config/typescript";
import react from "@omer-x/eslint-config/react";
import jsxAccessibility from "@omer-x/eslint-config/jsx-a11y";
import importPlugin from "@omer-x/eslint-config/import";
import unusedImports from "@omer-x/eslint-config/unused-imports";

export default [
  ...base,
  ...stylistic,
  ...typescript,
  ...react,
  ...jsxAccessibility,
  ...importPlugin,
  ...unusedImports,
  {
    rules: {
      // add your other rules here
    },
  },
];

License

This project is licensed under the MIT License - see the LICENSE file for details.