import { lintFolder } from '../lint/lintFolder' import { FormatResult } from '../types/FormatResult' import { getProjectRoot } from '../utils/getProjectRoot' import { formatFolder } from './formatFolder' /** * Automatically formats all SAS files in the current project. * @returns {Promise} Resolves successfully when all SAS files in the current project have been formatted. */ export const formatProject = async (): Promise => { const projectRoot = (await getProjectRoot()) || process.projectDir || process.currentDir if (!projectRoot) { throw new Error('SASjs Project Root was not found.') } return await formatFolder(projectRoot) }