How to use eslint.ESLint:
8 9 10 11 12 13 14 15 16 17 18 19 20
const extensionRegex = /\.(cjs|cts|js|jsx|mjs|mts|ts|tsx)$/; async function main(argv) { const { dir, rule } = argv; const eslint = new ESLint({ cwd: dir }); let consideredFilesTally = 0; let skippedFilesTally = 0; let filesWithIssuesTally = 0;
How to use eslint.RuleTester: