@maprox/lint-config

Shared ESLint flat configs (base, vue, astro, node, opt-in tailwind) + oxlint skeleton
820
Install
npm install @maprox/lint-config
Latest Version:1.7.0
Vue:3
License:MIT
Last Updated:Oct 20, 2026
Links: Repository  ·  npm
Maintainer: maprox

@maprox/lint-config

Shared ESLint flat configs for maprox (and related) projects, plus an experimental Oxlint base.

Formerly published as @sunsay/eslint-config on the Forgejo npm registry; use @maprox/lint-config going forward (same presets).

Migration

1.7.0 — function complexity limits (error)

Base / portable (and thus ./vue, ./node, ./astro) now enforces:

Rule Limit
complexity 10
max-params 4
max-depth 3
max-lines-per-function 30 (skipBlankLines + skipComments)
max-statements 20

Expect lint failures on large CLI-style handlers and nested branching. Prefer smaller functions / early returns. Hotspot override (last resort):

import maprox from '@maprox/lint-config'

export default [
  ...maprox,
  {
    files: ['**/commands/invent.ts'],
    rules: {
      'max-lines-per-function': 'off',
      'max-statements': 'off',
    },
  },
]

Install

npm install --save-dev @maprox/lint-config

Install peers for the preset you use (eslint, typescript, and for Vue also @nuxt/eslint-config, for Astro also eslint-plugin-astro, etc.).

Usage

Base (TS/JS)

export { default } from '@maprox/lint-config'

Vue / Nuxt

Prefer a one-liner. Non-Vue rules (style, imports, TS, relative-import ban) live in base; ./vue only adds Vue SFC rules. No Tailwind checks unless you opt in.

export { default } from '@maprox/lint-config/vue'

Optional project overrides only when truly necessary:

import maproxVue from '@maprox/lint-config/vue'

export default maproxVue.append([
  {
    rules: {
      // rare project-only exceptions
    },
  },
])

Tailwind CSS v4 (opt-in)

Projects without Tailwind should not import this. Without a real CSS entry the plugin errors / false-positives on ordinary classes.

Install optional peers: eslint-plugin-tailwindcss@4 and tailwindcss@4 (Node >= 20.19).

import maproxVue from '@maprox/lint-config/vue'
import tailwind from '@maprox/lint-config/tailwind'

export default maproxVue.append([
  ...tailwind({
    // CSS entry with `@import "tailwindcss"` — not tailwind.config.ts
    cssConfigPath: 'app/assets/css/main.css',
  }),
])

With a flat array preset (Astro / base):

import maproxAstro from '@maprox/lint-config/astro'
import tailwind from '@maprox/lint-config/tailwind'

export default [
  ...maproxAstro,
  ...tailwind({ cssConfigPath: 'src/styles/global.css' }),
]

Only classnames-order is on by default (warn, autofixable). Noisy rules such as no-custom-classname stay off unless you enable them yourself. Do not use prettier-plugin-tailwindcss alongside it.

Astro

import maproxAstro from '@maprox/lint-config/astro'

export default maproxAstro

Node / scripts

export { default } from '@maprox/lint-config/node'

Custom relative-import message

Base (and thus ./vue, ./node, ./astro) bans relative imports with Nuxt-style alias guidance. To customize the message:

import maproxVue from '@maprox/lint-config/vue'
import { noRelativeImports } from '@maprox/lint-config/no-relative-imports'

export default maproxVue.append([
  noRelativeImports({ message: 'Use your aliases…' }),
])

Oxlint (experimental)

import { defineConfig } from 'oxlint'
import base from '@maprox/lint-config/oxlint'

export default defineConfig({
  extends: [base],
})

Vue stays on the ESLint ./vue preset for now.

What is included

  • Base / portable: @stylistic, import order (import-x + import-newlines), TS strictness, type-aware rules for *.ts, relative-import ban, @typescript-eslint/no-shadow (core no-shadow off), curly / no-console, complexity metrics (complexity ≤10, max-params ≤4, max-depth ≤3, max-lines-per-function ≤30, max-statements ≤20), etc. Enums are PascalCase with UPPER_CASE members. Boolean variables and parameters are PascalCase with a prefix of is, should, has, can, did, or will (isReady, hasError). Needs a usable tsconfig.json (project: true).
  • Vue: createConfigForNuxt + portable layer + Vue SFC-only rules; type-aware rules also cover .vue <script> (extraFileExtensions).
  • Astro / Node: extend base with their parsers/globals.
  • Tailwind (opt-in ./tailwind): eslint-plugin-tailwindcss@4 classnames-order + required cssConfigPath.

Prefer either the package stylistic rules or Prettier at full strength — not both.

Requirements

  • ESLint 9+ (flat config)
  • Node.js 18+ (Tailwind layer: Node.js 20.19+)
  • TypeScript project with tsconfig.json for type-aware rules in base / vue
  • Tailwind CSS 4.x only when using ./tailwind

Key dependencies

  • @nuxt/eslint-config (peer, Vue preset)
  • typescript-eslint, @eslint/js, globals
  • @stylistic/eslint-plugin, eslint-plugin-import-x, eslint-plugin-import-newlines (dependencies, base)
  • eslint-plugin-astro (optional peer, Astro preset)
  • eslint-plugin-tailwindcss, tailwindcss (optional peers, ./tailwind only)

License

MIT

Related Packages

@nyvoru/eslint-config

Opinionated ESLint config for Nyvoru Vue and Nuxt projects

521 0
@deviltea/eslint-config

DevilTea's opinionated ESLint flat config for JavaScript, TypeScript, and Vue.

21,263 0
@nexso/eslint-config-typescript

Nexso Flat Config for TypeScript projects using ESLint 10

1,232 0
@lupinum/website-config

Shared Vite+ and template ESLint configuration for Lupinum Nuxt websites.

190 0
@batuhan-bas/configs

Shared ESLint (flat config) and Prettier configs for TypeScript, React, Vue and...

592 2

Version History

Version Released License
1.7.0 MIT
1.6.1 MIT
1.6.0 MIT
1.0.1 MIT
1.0.0 MIT
Pre-releases (1)
Version Released License
0.0.0-stage