tl-eslint-config
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

tl-eslint-config npm

A opinionated ESLint config preset for JavaScript, TypeScript, Vue, and Prettier.

Features

  • Format with Prettier.
  • Designed to work with TypeScript, Vue out-of-box.
  • Sort imports, package.json, tsconfig.json...
  • ESLint Flat config, compose easily!

Install

npm i -D tl-eslint-config

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

Usage

import { tl } from "tl-eslint-config";
export default tl(
  // Features: it'll detect installed dependency and enable necessary features automatically
  {
    prettier: true,
    vue: true, // auto detection
  },
  [
    /* your custom config */
  ]
).removeRules("foo/bar"); // see more in https://github.com/antfu/eslint-flat-config-utils

Presets

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

  // Includes
  // - `presetBasic` (JS+TS) support
  // - Vue support
  // - Prettier support
  presetAll,
} from "tl-eslint-config";

export default presetAll;

See preset.ts for more details.

License

MIT License © 2021-PRESENT tl

Package Sidebar

Install

npm i tl-eslint-config

Weekly Downloads

135

Version

1.0.2

License

MIT

Unpacked Size

246 kB

Total Files

4

Last publish

Collaborators

  • triumph-light