<|start_filename|>config/template.json<|end_filename|>
{
  "iosGoogleSignInClientId": "",
  "sentryAuthToken": "",
  "firebaseApiKey": "",
  "measurementId": "",
  "bugsnagApiKey": ""
}


<|start_filename|>_templates/testCode/new/index.js<|end_filename|>
module.exports = {
  prompt: ({ inquirer }) => {
    const questions = [
      {
        type: 'input',
        name: 'component_name',
        message: 'テストを作成する「ディレクトリ名」を指定してください。',
      },
    ];
    return inquirer.prompt(questions).then((answers) => {
      const { component_name } = answers;
      const path = `pages/${component_name}`;
      const absPath = `src/components/${path}`;
      return { ...answers, path, absPath };
    });
  },
};


<|start_filename|>babel.config.js<|end_filename|>
module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      [
        'module-resolver',
        {
          alias: {
            components: './src/components',
            containers: './src/containers',
            lib: './src/lib',
            img: './src/img',
            hooks: './src/hooks',
            domain: './src/domain',
            config: './src/config',
            queries: './src/queries',
            storyBookUtils: './src/storyBookUtils',
            __mockData__: './src/__mockData__',
          },
        },
      ],
      'inline-dotenv',
    ],
  };
};


<|start_filename|>.eslintrc.js<|end_filename|>
module.exports = {
  extends: '@react-native-community',
  env: {
    jest: true,
  },
  rules: {
    curly: 0,
    'prettier/prettier': [
      'error',
      {
        singleQuote: true,
        trailingComma: 'es5',
      },
    ],
    'react-native/no-unused-styles': 'error',
    'react-native/split-platform-components': 'error',
    'react-native/no-inline-styles': 'error',
    'react-native/no-color-literals': 'error',
  },

  parserOptions: {
    warnOnUnsupportedTypeScriptVersion: false,
  },
  overrides: [
    {
      files: ['*.gql'],
      parser: '@graphql-eslint/eslint-plugin',
      plugins: ['@graphql-eslint'],
      parserOptions: {
        operations: ['./src/**/*.gql'],
        schema: './schema.json',
      },
      rules: {
        'prettier/prettier': 0,
        '@graphql-eslint/require-id-when-available': [
          'error',
          {
            fieldName: 'id',
          },
        ],
        '@graphql-eslint/no-deprecated': 'error',
        '@graphql-eslint/prettier': 'error',
        '@graphql-eslint/no-unused-variables': 'error',
      },
    },
  ],
};


<|start_filename|>storybook/index.js<|end_filename|>
import React from 'react';
import { ActionSheetProvider } from '@expo/react-native-action-sheet';
import {
  getStorybookUI,
  configure,
  addDecorator,
} from '@storybook/react-native';
import { AppearanceProvider } from 'react-native-appearance';
import ThemeProvider from '../src/containers/Theme.tsx';
import { loadStories } from './storyLoader';
import './rn-addons';

export const provider = (story) => (
  <AppearanceProvider>
    <ActionSheetProvider>
      <ThemeProvider>{story()}</ThemeProvider>
    </ActionSheetProvider>
  </AppearanceProvider>
);

addDecorator(provider);

configure(() => {
  loadStories();
}, module);

const StorybookUIRoot = getStorybookUI({
  port: 7007,
  onDeviceUI: true,
  host: 'localhost',
});

export default StorybookUIRoot;


<|start_filename|>jest.config.js<|end_filename|>
module.exports = {
  preset: 'jest-expo',
  verbose: true,
  testURL: 'http://localhost/',
  transform: {
    '^.+\\.js$': '<rootDir>/node_modules/react-native/jest/preprocessor.js',
  },
  testRegex: '(spec|test)\\.[jt]sx?$',
  testPathIgnorePatterns: ['/node_modules/', '/e2e/'],
  transformIgnorePatterns: [
    'node_modules/(?!(jest-)?react-native|react-native-root-siblings|static-container|react-clone-referenced-element|@react-native-community|react-native-cookies|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|@sentry/.*)',
  ],
  moduleNameMapper: {
    '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
      'identity-obj-proxy',
  },

  setupFilesAfterEnv: [
    '<rootDir>setupTests.js',
    '<rootDir>/node_modules/jest-plugin-context/setup',
  ],

  collectCoverageFrom: [
    'src/**/*.{js,jsx,ts,tsx}',
    'src/**/*.!{d.ts}',
    '!**/(node_modules|src/@types|src/queries)/**',
    '!**/mockData.ts',
    '!**/stories.js',
    '!src/components/pages/Policy/Page.tsx',
    '!src/components/pages/Tos/Page.tsx',
    '!src/components/pages/LoginWithAmazon/*.tsx',
    '!src/components/pages/ScreenSetting/*.tsx',
    '!src/components/pages/NotificationSetting/Page.tsx',
    '!src/domain/*.ts',
    '!src/lib/firestore/*.ts',
    '!src/lib/system/firebase/*.ts',
    '!src/lib/db/*.ts',
    '!src/app.tsx',
    '!src/index.js',
    '!src/GlobalStyles.tsx',
  ],
};


<|start_filename|>app.test.json<|end_filename|>
{
  "expo": {
    "name": "ペペロミア",
    "slug": "peperomia",
    "scheme": "peperomia",
    "privacy": "public",
    "packagerOpts": {
      "sourceExts": ["js", "ts", "tsx"],
      "transformer": "node_modules/react-native-typescript-transformer/index.js"
    },
    "platforms": ["ios", "android"],
    "version": "3.0.0"
  }
}
