1.0.10 • Published 6 months ago

@dubium/eslint-config v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@dubium/eslint-config

Flat ESLint config for Dubium projects — modular, extensible, and strictly structured. Supports TypeScript, React, and accessibility (a11y) best practices.

Русская версия


📦 Installation

Install the config and the required peer dependencies according to your needs.

🔹 Base configuration (base)

npm install -D eslint @dubium/eslint-config
# or
yarn add -D eslint @dubium/eslint-config

It is also recommended to install globals if you use global variables in your ESLint config.


🔹 TypeScript (typescript)

npm install -D @typescript-eslint/parser @typescript-eslint/eslint-plugin
# or
yarn add -D @typescript-eslint/parser @typescript-eslint/eslint-plugin

🔹 React (react)

npm install -D eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-refresh
# or
yarn add -D eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-refresh

🔹 Accessibility (jsxA11y)

npm install -D eslint-plugin-jsx-a11y
# or
yarn add -D eslint-plugin-jsx-a11y

⚙️ Usage

Create an eslint.config.js file:

import { defineConfig } from "eslint/config";
import {
  base,
  typescript,
  react,
  jsxA11y,
} from "@dubium/eslint-config";

export default defineConfig([
  base,
  typescript,
  react,
  jsxA11y,
]);

You can also use only the configs you need:

export default defineConfig([
  base,
  typescript,
]);

If your project uses global variables (e.g. window, process, jest, etc.), we recommend installing the globals package and adding them to your ESLint configuration:

import globals from "globals";

export default defineConfig({
  languageOptions: {
    globals: {
      ...globals.browser,
      ...globals.node,
      ...globals.jest,
    },
  },
  // other settings
});

🧩 Available configs

ConfigImport fromDescription
base@dubium/eslint-config/baseBasic JS/TS setup + globals
typescript@dubium/eslint-config/typescriptTypeScript support
react@dubium/eslint-config/reactReact, hooks, and React Refresh
jsxA11y@dubium/eslint-config/jsx-a11yAccessibility (a11y) recommendations

🔍 Inspect final config

npx eslint --print-config src/index.ts

Or, if you have the script added:

npm run lint:inspect

🔧 Requirements

  • Node.js >=18
  • ESLint ^9.0.0 (Flat Config)
  • Your project must use "type": "module"

📝 License

MIT © Dubium

1.0.10

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago