How to use the ESLint function from eslint

Find comprehensive JavaScript eslint.ESLint code examples handpicked from public code repositorys.

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;
fork icon0
star icon0
watch icon1

+ 5 other calls in file