How to use the @spotify/web-scripts-utils.hasConfig function in @spotify/web-scripts-utils

To help you get started, we’ve selected a few @spotify/web-scripts-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spotify / web-scripts / packages / web-scripts / src / Tasks / LintTask.ts View on Github external
export function getEslintConfig(): string | null {
  if (
    !hasConfig([
      { type: 'file', pattern: '.eslintrc.*' },
      { type: 'package.json', property: 'eslintConfig' },
    ])
  ) {
    return ESLINT_CONFIG;
  }

  return null;
}
github spotify / web-scripts / packages / web-scripts / src / Tasks / FormatTask.ts View on Github external
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;
}
github spotify / web-scripts / packages / web-scripts / src / Tasks / TestTask.ts View on Github external
export function getJestConfig(): string | null {
  if (
    !hasConfig([
      { type: 'file', pattern: 'jest.config.js' },
      { type: 'package.json', property: 'jest' },
    ])
  ) {
    return JEST_CONFIG;
  }

  return null;
}

@spotify/web-scripts-utils

Private package which contains re-used utils within web-scripts projects

Apache-2.0
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis

Similar packages