How to use the @mapbox/fusspot.oneOfType function in @mapbox/fusspot

To help you get started, we’ve selected a few @mapbox/fusspot 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 mapbox / underreact / lib / config / validate-config.js View on Github external
function validateConfig(rawConfig = {}) {
  try {
    v.assert(
      v.strictShape({
        browserslist: v.oneOfType(v.plainObject, v.arrayOf(v.string)),
        compileNodeModules: v.oneOfType(v.boolean, v.arrayOf(v.string)),
        devServerHistoryFallback: v.boolean,
        host: v.string,
        hot: v.boolean,
        htmlSource: v.oneOfType(validatePromise, v.string, v.func),
        jsEntry: validateAbsolutePaths,
        liveReload: v.boolean,
        environmentVariables: v.plainObject,
        modernBrowserTest: v.string,
        outputDirectory: validateAbsolutePaths,
        polyfill: v.boolean,
        port: v.number,
        postcssPlugins: v.arrayOf(v.func),
        publicAssetsPath: v.string,
        publicDirectory: v.string,
        siteBasePath: validateBasePath,
        stats: v.string,
        vendorModules: v.arrayOf(v.string),
        webpackConfigTransform: v.func,
        webpackLoaders: v.arrayOf(v.plainObject),
        webpackPlugins: v.arrayOf(v.any)
github mapbox / underreact / lib / config / validate-config.js View on Github external
function validateConfig(rawConfig = {}) {
  try {
    v.assert(
      v.strictShape({
        browserslist: v.oneOfType(v.plainObject, v.arrayOf(v.string)),
        compileNodeModules: v.oneOfType(v.boolean, v.arrayOf(v.string)),
        devServerHistoryFallback: v.boolean,
        host: v.string,
        hot: v.boolean,
        htmlSource: v.oneOfType(validatePromise, v.string, v.func),
        jsEntry: validateAbsolutePaths,
        liveReload: v.boolean,
        environmentVariables: v.plainObject,
        modernBrowserTest: v.string,
        outputDirectory: validateAbsolutePaths,
        polyfill: v.boolean,
        port: v.number,
        postcssPlugins: v.arrayOf(v.func),
        publicAssetsPath: v.string,
        publicDirectory: v.string,
        siteBasePath: validateBasePath,
        stats: v.string,