Skip to content

ESLint ConfigAn opinionated ESLint config preset

Battle-tested, TypeScript & Vue ready, works with Prettier

Quick Start

Install the package:

shell
npm i eslint typescript @ntnyq/eslint-config -D
shell
pnpm add eslint typescript @ntnyq/eslint-config -D
shell
yarn add eslint typescript @ntnyq/eslint-config -D
shell
bun add eslint typescript @ntnyq/eslint-config -D

Create eslint.config.mjs:

js
// @ts-check

import { defineESLintConfig } from '@ntnyq/eslint-config'

export default defineESLintConfig()

Add lint scripts:

json
{
  "scripts": {
    "lint": "eslint",
    "lint:fix": "eslint --fix"
  }
}

That's it! 🎉

What's Included?

  • JavaScript & TypeScript: Full support with strict typing rules
  • Vue 3: SFC linting with composition API support
  • Frameworks: Astro, Svelte (opt-in)
  • Data Formats: JSON, JSONC, YAML, TOML
  • Markdown: Lint code blocks and prose
  • SVG: SVGO optimization rules
  • Node.js: Best practices for Node.js projects
  • Tests: Vitest, Jest support
  • Import/Export: Smart import sorting and organization

Resources

Credits

This config is inspired by and built upon amazing work from:

License

MIT License © 2023-PRESENT ntnyq