@prata.ma/anvil-lint
v0.2.1
Published
Shared ESLint flat configuration for the Anvil workspace.
Downloads
456
Readme
@prata.ma/anvil-lint
Shared ESLint flat configuration for the Anvil workspace.
Overview
@prata.ma/anvil-lint owns the reusable ESLint config consumed across workspace packages. It wraps @antfu/eslint-config with the repo's baseline defaults, formatter behavior, markdown overrides, and package-level options for library-oriented packages.
Within the monorepo and for external consumers, packages consume this package through eslint.config.ts entrypoints instead of duplicating lint setup locally. The supported surface is intentionally small: the root package export and the @prata.ma/anvil-lint/base subpath used by package-local config files.
Installation
Install the package from npm when using the shared lint baseline outside this monorepo.
npm
{
"devDependencies": {
"@prata.ma/anvil-lint": "^0.0.0"
}
}Usage
The normal usage path is to import base from @prata.ma/anvil-lint/base inside a package-local eslint.config.ts, optionally adding package-specific config items after the shared baseline.
Library
import type { BaseReturn } from '@prata.ma/anvil-lint'
import { base } from '@prata.ma/anvil-lint/base'
const config: BaseReturn = base({
type: 'lib',
})
export default configPatterns
base() accepts Antfu config options and extra flat-config items, so packages can extend the shared baseline without reimplementing formatter or markdown behavior.
This package also uses the same pattern for its own eslint.config.ts:
import type { BaseReturn } from '@prata.ma/anvil-lint'
import { base } from '@prata.ma/anvil-lint/base'
const config: BaseReturn = base()
export default configAPI
@prata.ma/anvil-lint exposes a narrow shared-config surface for workspace consumers.
Exports
@prata.ma/anvil-lint- re-exportsbaseand the package's main public types@prata.ma/anvil-lint/base- direct subpath for the sharedbase()config builderbase(options, ...configs)- returns the workspace ESLint flat config with repo defaults appliedBaseOptions,BaseReturn,BaseUserConfig- shared typing for package-local config files
Configuration
- Default ignores include
**/*.svg,build/**, anddist/**. - The shared baseline enables formatter support for CSS, HTML, and Markdown.
- Markdown formatting is overridden to use a 4-space tab width and
embeddedLanguageFormatting: 'off'. - Markdown lint rules explicitly disable
markdown/no-multiple-h1. - TypeScript parser warnings for unsupported TS versions are suppressed in the shared baseline.
Development
Use the package-local scripts while working in @packages/anvil-lint, and keep shared lint behavior centralized here instead of reintroducing ad hoc package-level rule copies.
This package now participates in the repo's Changesets, npm publish, and GitHub Release automation as a package-scoped public surface. The package-local release:check script remains the focused validation contract for this package.
Commands
pnpm --filter @prata.ma/anvil-lint release:check
pnpm --filter @prata.ma/anvil-lint build
pnpm --filter @prata.ma/anvil-lint lint
pnpm --filter @prata.ma/anvil-lint test:typeConventions
- Keep the supported consumer contract centered on
base()and the documented exports. - Prefer changing shared defaults here rather than layering repeated rule overrides across packages.
- Preserve the built-output contract because package-local
eslint.config.tsfiles consume@prata.ma/anvil-lint/basefrom package build output.
Status
This package is active and serves as the workspace's shared ESLint configuration boundary.
Maturity
@prata.ma/anvil-lint is active and publish-prepared as a reusable package.
Scope
The package currently supports the shared flat-config baseline, formatter behavior, markdown overrides, and typed config composition for workspace packages. It does not own package-specific lint rules that belong in consuming packages or separate ESLint plugin implementation work owned elsewhere.
Notes
@prata.ma/anvil-lintnow ships a packageCHANGELOG.mdand participates in the repo's multi-package release workflow.- Consumers should use the documented
@prata.ma/anvil-lintand@prata.ma/anvil-lint/baseentrypoints only. - A fresh checkout should build the shared workspace packages before relying on package-local editor linting or direct package-level lint commands that import
@prata.ma/anvil-lint/basefrom built output.
