Created
April 28, 2025 06:07
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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