const PRETTIER_PATH =
  "src/**/!(assets)/**/*.{js,jsx,ts,tsx,json,css,scss,md,yml,yaml,php}";

const PRETTIER_OVERRIDES = [
  {
    files: "*.php",
    options: {
      singleQuote: true,
    },
  },
];

exports.PRETTIER_PATH = PRETTIER_PATH;

exports.PRETTIER_OVERRIDES = PRETTIER_OVERRIDES;

module.exports = function prettier() {
  const spawn = require("cross-spawn");

  spawn("prettier", ["--write", PRETTIER_PATH], {
    stdio: "inherit",
  });
};
