close

API overview

@rslint/core provides configuration helpers and presets for authoring flat configs, plus the Rslint class for programmatic linting:

import { Rslint, defineConfig, globalIgnores, js, ts } from '@rslint/core';

Configuration API

Use the configuration exports to compose flat configs without constructing internal loader objects.

APIDescription
defineConfigType-safe identity helper for a flat config
globalIgnoresCreates a global ignore entry
globalsLazily loaded runtime-global catalog

Plugin API

These exports provide the configuration API for Rslint's built-in rule groups and plugins. The rules are compiled into Rslint, so the upstream ESLint plugins do not need to be installed. Each page lists the upstream project its rules are based on and maps every available Rslint preset to its upstream configuration source.

An upstream mapping describes the compatibility source, not a byte-for-byte copy. Rslint presets include the rules Rslint currently supports and may contain adaptations for its native runtime.

APIDescription
jsJavaScript
tsTypeScript baseline, strict, and stylistic variants
reactPluginReact
reactHooksPluginReact Hooks
importPluginImports
promisePluginPromises
jestPluginJest
rstestPluginRstest
unicornPluginUnicorn
jsxA11yPluginJSX accessibility

JavaScript API

Use the JavaScript API when a Node.js-compatible host needs to invoke Rslint directly. The JavaScript API guide covers common workflows; the reference below documents the complete class surface.

APIDescription
RslintESLint-style class for linting files or in-memory source