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

2.2.6 • Public • Published

@kolhe/eslint-config npm

One Eslint Config to rule them all. Supports JavaScript, TypeScript, Vue 2, Vue 3, Prettier out of the box.

Features

  • Format with Prettier.
  • Designed to work with TypeScript, Vue 2 and 3 out-of-box.
  • Support JSON(5), YAML, Markdown...
  • Sort imports, package.json, tsconfig.json...
  • ESLint Flat config, compose easily!
  • Reasonable defaults, best practices, only one-line of config

Install

npm i -D @kolhe/eslint-config

Require Node.js >= 18.18, and ESLint >= 8.56.0.

Usage

import { config } from '@kolhe/eslint-config'
export default config(
  [
    /* your custom config */
  ],
  // Features: it'll detect installed dependency and enable necessary features automatically
  {
    prettier: true,
    markdown: true,
    vue: true, // auto detection
    unocss: false, // auto detection
  },
)

Presets

// eslint.config.js
import {
  presetJavaScript, // Ignore common files and include javascript support
  presetJsonc, // Includes basic json(c) file support and sorting json keys
  presetLangsExtensions, // Includes markdown, yaml + `presetJsonc` support
  presetBasic, // Includes `presetJavaScript` and typescript support

  // Includes
  // - `presetBasic` (JS+TS) support
  // - `presetLangsExtensions` (markdown, yaml, jsonc) support
  // - Vue support
  // - UnoCSS support (`uno.config.ts` is required)
  // - Prettier support
  presetAll,
} from '@kolhe/eslint-config'

export default presetAll

See preset.ts for more details.

VSCode

{
  "eslint.experimental.useFlatConfig": true,
}

License

MIT License © 2022-PRESENT Sumit Kolhe

Readme

Keywords

none

Package Sidebar

Install

npm i @kolhe/eslint-config

Weekly Downloads

167

Version

2.2.6

License

MIT

Unpacked Size

585 kB

Total Files

5

Last publish

Collaborators

  • sumitkolhe