Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function getEslintConfig(): string | null {
if (
!hasConfig([
{ type: 'file', pattern: '.eslintrc.*' },
{ type: 'package.json', property: 'eslintConfig' },
])
) {
return ESLINT_CONFIG;
}
return null;
}
export function getPrettierConfig(): string | null {
if (
!hasConfig([
{ type: 'file', pattern: '.prettierrc' },
{ type: 'file', pattern: 'prettier.config.js' },
{ type: 'package.json', property: 'prettierrc' },
])
) {
return PRETTIER_CONFIG;
}
return null;
}
export function getJestConfig(): string | null {
if (
!hasConfig([
{ type: 'file', pattern: 'jest.config.js' },
{ type: 'package.json', property: 'jest' },
])
) {
return JEST_CONFIG;
}
return null;
}