// https://docs.expo.dev/guides/using-eslint/
const { defineConfig } = require('eslint/config');
const expoConfig = require("eslint-config-expo/flat");

const platformExtensions = [];
for (const platform of ['.android', '.ios', '.web', '.native', '']) {
  for (const base of ['.ts', '.tsx', '.d.ts']) {
    platformExtensions.push(`${platform}${base}`);
  }
}

module.exports = defineConfig([
  expoConfig,
  {
    ignores: ["dist/*"],
  },
  {
    settings: {
      'import/resolver': {
        typescript: {
          extensions: platformExtensions,
        },
      },
    },
  }
]);
