createConfig = (rules, flatConfigName) => ({
  ...(flatConfigName
    ? {
      ...flatConfigBase,
      name: `jsx-a11y/${flatConfigName}`,
      plugins: { 'jsx-a11y': jsxA11y },
    }
    : { ...legacyConfigBase, plugins: ['jsx-a11y'] }),
  rules: { ...rules },
})
Given a ruleset and optionally a flat config name, generate a config.
@param {object} rules - ruleset for this config
@param {string} flatConfigName - name for the config if flat
@returns Config for this set of rules.