Skip to content

Instantly share code, notes, and snippets.

@Haprog
Created April 28, 2025 06:07
Show Gist options
  • Save Haprog/ceb56439371a800002c2c39b0be88f55 to your computer and use it in GitHub Desktop.
Save Haprog/ceb56439371a800002c2c39b0be88f55 to your computer and use it in GitHub Desktop.
Example of inspecting eslint-config-sheriff config by logging to console from eslint.config.ts
import { inspect } from 'node:util';
console.debug(
inspect(
{ sheriffConfig },
{
depth: 5,
colors: true,
maxArrayLength: 200,
},
),
);
// Use filter to look for specific rules
console.debug(
inspect(
{
sheriffConfig: sheriffConfig.filter(
(o) => o.rules?.['vitest/consistent-test-it'],
),
},
{
depth: 5,
colors: true,
maxArrayLength: 200,
},
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment