Skip to content

ESLint Config API reference

Source information
  • Package: @pikacss/eslint-config
  • Generated from the exported surface and JSDoc in packages/eslint-config/src/index.ts.
  • Source files: packages/eslint-config/src/index.ts

Package summary

ESLint flat config for PikaCSS

Use ESLint setup when you need conceptual usage guidance instead of exact symbol lookup.

Functions

default(options?)

Default export that returns the recommended PikaCSS ESLint flat-config.

ParameterTypeDescription
options?PikacssConfigOptionsConfiguration options to customise which function name the rules detect.

Returns: Linter.Config - A flat-config entry identical to what recommended() produces.

Remarks:

This is a convenience alias for recommended() so consumers can write a simple default import.

ts
import pikacss from '@pikacss/eslint-config'
export default [pikacss()]


Returns the recommended PikaCSS ESLint flat-config object with all rules enabled at error level.

ParameterTypeDescription
options?PikacssConfigOptionsConfiguration options to customise which function name the rules detect.

Returns: Linter.Config - A flat-config entry with the PikaCSS plugin registered and all recommended rules enabled.

Remarks:

This is the preferred way to add PikaCSS linting to a project. It registers the plugin under the pikacss namespace and turns on no-dynamic-args at 'error' severity.

ts
import { recommended } from '@pikacss/eslint-config'
export default [recommended()]


Constants

plugin

ESLint plugin object exposing all PikaCSS rules.

Remarks:

Register this plugin under the pikacss namespace in your ESLint flat config. In most cases you should use the recommended() preset instead of wiring rules manually.

ts
import { plugin } from '@pikacss/eslint-config'
export default [{ plugins: { pikacss: plugin } }]


Types

PikacssConfigOptions

Options accepted by the PikaCSS ESLint configuration factory functions.

PropertyTypeDescriptionDefault
fnName?stringBase PikaCSS function name the rules should detect.'pika'

Remarks:

Pass these options to recommended() or the default export to customise which base function name the rules match. When omitted, all rules default to detecting pika.

ts
import pikacss from '@pikacss/eslint-config'
export default [pikacss({ fnName: 'css' })]