1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-07 12:40:05 +00:00

feat: support a user-level ~/.sasjslint

This commit is contained in:
2023-04-12 23:06:08 +05:00
parent 22cc42446c
commit 2cb73da0eb
4 changed files with 14 additions and 7 deletions

View File

@@ -8,11 +8,12 @@ import { formatFolder } from './formatFolder'
* @returns {Promise<FormatResult>} Resolves successfully when all SAS files in the current project have been formatted.
*/
export const formatProject = async (): Promise<FormatResult> => {
const projectRoot =
(await getProjectRoot()) || process.projectDir || process.currentDir
const projectRoot = (await getProjectRoot()) || process.currentDir
if (!projectRoot) {
throw new Error('SASjs Project Root was not found.')
}
console.info(`Formatting all .sas files under ${projectRoot}`)
return await formatFolder(projectRoot)
}