close

jestPlugin

jestPlugin exposes Rslint's built-in implementation of supported rules from eslint-plugin-jest 29.x. Its presets follow the corresponding upstream flat configurations for the rules Rslint currently supports.

import { defineConfig, jestPlugin } from '@rslint/core';

export default defineConfig([
  {
    ...jestPlugin.configs.recommended,
    files: ['**/*.{test,spec}.{js,mjs,jsx,ts,tsx,mts}'],
  },
]);

jestPlugin.configs.recommended does not declare files; the example scopes it to test and spec files.

Presets

PresetDescriptionView rulesSource
jestPlugin.configs.recommendedJest rulesView rules →eslint-plugin-jest configs["flat/recommended"]
jestPlugin.configs.styleJest style rulesView rules →eslint-plugin-jest configs["flat/style"]

See Rules & Presets for guidance on choosing and layering presets.