@azat-io/eslint-config
ESLint shareable config
Last updated 23 days ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @azat-io/eslint-config 
SYNC missed versions from official npm registry.

ESLint Config

ESLint Config Logo

Version GitHub License

A comprehensive and flexible ESLint configuration that supports a wide range of frameworks and environments. Easily integrate clean, consistent code standards across projects by enabling settings for specific tools and libraries.

This config covers multiple setups in a single, straightforward import, helping maintain consistency across different project types and frameworks.

Usage

Running ESLint requires Node.js ^22.22.3 || ^24.16.0 || >=26.3.0, matching the requirements of the included plugins. The code you lint can target older runtimes.

  1. Install package:
pnpm add --save-dev eslint @azat-io/eslint-config
  1. Create ESLint configuration file eslint.config.js:
import eslintConfig from '@azat-io/eslint-config'

export default eslintConfig({
  root: import.meta.dirname,
  perfectionist: true,
  typescript: true,
  react: true,
  node: true,
})
  1. Add script for package.json:
{
  "scripts": {
    "test:js": "eslint \"**/*.{js,ts,jsx,tsx,json}\""
  }
}

Configuration

To configure the ESLint rules based on your project’s needs, import the config and pass an object with options for each framework or tool. Framework and tool flags are disabled by default. Runtime compatibility checks are enabled automatically.

import eslintConfig from '@azat-io/eslint-config'

export default eslintConfig({
  perfectionist: true,
  typescript: true,
  svelte: true,
  vitest: true,
  astro: true,
  react: true,
  qwik: true,
  node: true,
  vue: true,
})

perfectionist

Enables rules for sorting and organizing code structures for better readability and consistency.

typescript

Adds TypeScript-specific linting rules to ensure type safety and maintain TypeScript best practices.

svelte

Enables support for Svelte, including linting rules for Svelte components and files.

vitest

Adds support for Vitest, adjusting linting for testing files and practices within Vitest projects.

astro

Configures ESLint for Astro projects, with adjustments for Astro’s file structure and conventions.

react

Includes React-specific linting rules for JSX syntax, React hooks, and best practices within React environments.

qwik

Adds support for Qwik, adjusting linting for Qwik-specific syntax and conventions.

node

Adjusts linting for Node.js environments, addressing Node-specific globals, imports, and common practices.

vue

Adds Vue-specific linting rules, supporting Vue's syntax and best practices for Vue components.

Runtime targets

The config reads the nearest package.json and Browserslist configuration to disable rules that would introduce unsupported APIs. Runtime overrides apply to source files supported by the enabled configs, leaving JSON files unaffected.

import eslintConfig from '@azat-io/eslint-config'

export default eslintConfig({
  root: import.meta.dirname,
  targets: {
    browsers: 'baseline widely available',
    node: '>=22',
  },
  toolingNode: '>=24',
  typescript: true,
})

root is the directory or file URL used for runtime target discovery. It defaults to process.cwd(); set it explicitly in monorepos or when running ESLint from another directory.

targets defaults to 'auto'. Its node and browsers keys override automatic discovery independently; omitted keys are still detected, and false excludes that runtime. Node.js targets come from engines.node, then Browserslist Node.js queries, then the Node.js 22 fallback. A bare explicit version such as '22.12' means that version or newer. The node: true flag enables Node.js lint rules and is separate from targets.node.

toolingNode sets a different Node.js target for config files and files in scripts/, bin/ and tools/. Only extensions already enabled in the config are included. Otherwise tooling uses the detected project Node.js target, including in browser-only projects.

Additional runtime options:

Option Default Purpose
browserslistEnv 'production' Select the Browserslist environment.
pinnedDate Support data date Pin relative Baseline queries, including shared configs.
fallback { node: '22.0.0' } Choose a fallback Node.js target, or disable with false.
missingBrowsers 'ignore' Ignore missing browser targets, use 'off', or queries.
unknownBrowsers 'off' Disable dependent rules or 'ignore' unknown browsers.
ignoreBrowsers ['op_mini'] Replace the list of ignored Browserslist agents.
quiet false Keep warnings in config settings without printing them.

Resolved target sources, warnings and disabled rules are available under settings['azat-io/runtime'] in ESLint's --print-config output. Custom extends configs run after the runtime overrides, so explicit rule choices take priority.

extends

You can add your own configs. Example:

import eslintConfig from '@azat-io/eslint-config'

export default eslintConfig({
  extends: [
    {
      rules: {
        'no-undef': 'off',
      },
    },
  ],
})

Plugins

This config uses the following plugins:

See also

License

MIT © Azat S.

Current Tags

  • 2.103.0                                ...           latest (23 days ago)

112 Versions

  • 2.103.0                                ...           23 days ago
  • 2.102.0                                ...           a month ago
  • 2.101.0                                ...           a month ago
  • 2.100.0                                ...           a month ago
  • 2.99.0                                ...           2 months ago
  • 2.98.0                                ...           2 months ago
  • 2.97.0                                ...           2 months ago
  • 2.96.1                                ...           2 months ago
  • 2.96.0                                ...           2 months ago
  • 2.95.0                                ...           3 months ago
  • 2.94.0                                ...           3 months ago
  • 2.93.0                                ...           3 months ago
  • 2.92.0                                ...           3 months ago
  • 2.91.0                                ...           4 months ago
  • 2.90.0                                ...           4 months ago
  • 2.89.0                                ...           4 months ago
  • 2.88.0                                ...           4 months ago
  • 2.87.0                                ...           5 months ago
  • 2.86.0                                ...           5 months ago
  • 2.85.0                                ...           5 months ago
  • 2.84.0                                ...           5 months ago
  • 2.83.0                                ...           5 months ago
  • 2.82.0                                ...           6 months ago
  • 2.81.0                                ...           6 months ago
  • 2.80.0                                ...           7 months ago
  • 2.79.0                                ...           7 months ago
  • 2.78.0                                ...           7 months ago
  • 2.77.0                                ...           7 months ago
  • 2.76.0                                ...           8 months ago
  • 2.75.0                                ...           8 months ago
  • 2.74.0                                ...           8 months ago
  • 2.73.0                                ...           8 months ago
  • 2.72.0                                ...           9 months ago
  • 2.71.0                                ...           9 months ago
  • 2.70.0                                ...           9 months ago
  • 2.69.0                                ...           9 months ago
  • 2.68.0                                ...           10 months ago
  • 2.67.0                                ...           10 months ago
  • 2.66.0                                ...           10 months ago
  • 2.65.0                                ...           10 months ago
  • 2.64.0                                ...           a year ago
  • 2.63.0                                ...           a year ago
  • 2.62.1                                ...           a year ago
  • 2.62.0                                ...           a year ago
  • 2.61.0                                ...           a year ago
  • 2.60.0                                ...           a year ago
  • 2.59.0                                ...           a year ago
  • 2.58.0                                ...           a year ago
  • 2.57.0                                ...           a year ago
  • 2.56.0                                ...           a year ago
  • 2.55.0                                ...           a year ago
  • 2.54.0                                ...           a year ago
  • 2.53.0                                ...           a year ago
  • 2.52.0                                ...           a year ago
  • 2.51.0                                ...           a year ago
  • 2.50.0                                ...           a year ago
  • 2.49.0                                ...           a year ago
  • 2.48.0                                ...           a year ago
  • 2.47.0                                ...           a year ago
  • 2.46.0                                ...           a year ago
  • 2.45.0                                ...           a year ago
  • 2.44.0                                ...           a year ago
  • 2.43.0                                ...           a year ago
  • 2.42.1                                ...           a year ago
  • 2.42.0                                ...           a year ago
  • 2.41.0                                ...           a year ago
  • 2.40.0                                ...           a year ago
  • 2.39.0                                ...           a year ago
  • 2.38.0                                ...           a year ago
  • 2.37.0                                ...           a year ago
  • 2.36.0                                ...           a year ago
  • 2.35.0                                ...           a year ago
  • 2.34.0                                ...           a year ago
  • 2.33.0                                ...           a year ago
  • 2.32.0                                ...           2 years ago
  • 2.31.0                                ...           2 years ago
  • 2.30.0                                ...           2 years ago
  • 2.29.0                                ...           2 years ago
  • 2.28.0                                ...           2 years ago
  • 2.27.0                                ...           2 years ago
  • 2.26.0                                ...           2 years ago
  • 2.25.0                                ...           2 years ago
  • 2.24.2                                ...           2 years ago
  • 2.24.1                                ...           2 years ago
  • 2.24.0                                ...           2 years ago
  • 2.23.0                                ...           2 years ago
  • 2.22.0                                ...           2 years ago
  • 2.21.0                                ...           2 years ago
  • 2.20.0                                ...           2 years ago
  • 2.19.0                                ...           2 years ago
  • 2.18.0                                ...           2 years ago
  • 2.17.0                                ...           2 years ago
  • 2.16.0                                ...           2 years ago
  • 2.15.0                                ...           2 years ago
  • 2.14.0                                ...           2 years ago
  • 2.13.0                                ...           2 years ago
  • 2.12.0                                ...           2 years ago
  • 2.11.1                                ...           2 years ago
  • 2.11.0                                ...           2 years ago
  • 2.10.0                                ...           2 years ago
  • 2.9.0                                ...           2 years ago
  • 2.8.0                                ...           2 years ago
  • 2.7.0                                ...           2 years ago
  • 2.6.0                                ...           2 years ago
  • 2.5.0                                ...           2 years ago
  • 2.4.0                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.2                                ...           2 years ago
  • 2.1.1                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.0                                ...           2 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE