function reset(_source, options) {
	source = _source;
	const root_dir = options.rootDir?.replace(/\\/g, '/');
	filename = options.filename.replace(/\\/g, '/');

	dev = !!options.dev;

	if (typeof root_dir === 'string' && filename.startsWith(root_dir)) {
		// make filename relative to rootDir
		filename = filename.replace(root_dir, '').replace(/^[/\\]/, '');
	}

	locator = getLocator(source, { offsetLine: 1 });
	warnings = [];
	ignore_stack = [];
	ignore_map.clear();
}
@param {string} _source
@param {{ dev?: boolean; filename: string; rootDir?: string }} options