close

nodePlugin

nodePlugin exposes Rslint's built-in implementation of supported rules from eslint-plugin-n 18.x. Rules use Rslint's native node/* prefix instead of upstream's n/*.

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

export default defineConfig([nodePlugin.configs.recommended]);

Presets

The camelCase keys below map to upstream's preset names:

PresetDescriptionView rulesSource
nodePlugin.configs.recommendedNode.js rules for mixed CommonJS and ES modulesView rules →eslint-plugin-n configs.recommended
nodePlugin.configs.recommendedModuleNode.js rules for ES modulesView rules →eslint-plugin-n configs['recommended-module']
nodePlugin.configs.recommendedScriptNode.js rules for CommonJSView rules →eslint-plugin-n configs['recommended-script']

recommended selects the nearest valid package.json from process.cwd() and applies .mjs/.cjs overrides. The API's cwd does not change this lookup; use an explicit preset when the process directory differs from the lint project.

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