diff --git a/app.config.js b/app.config.js index f3abb95d34..7528e9010c 100644 --- a/app.config.js +++ b/app.config.js @@ -1,5 +1,10 @@ +// @ts-check const pkg = require('./package.json') +/** + * @param {import('@expo/config-types').ExpoConfig} _config + * @returns {{ expo: import('@expo/config-types').ExpoConfig }} + */ module.exports = function (_config) { /** * App version number. Should be incremented as part of a release cycle. @@ -192,10 +197,14 @@ module.exports = function (_config) { scheme: 'https', host: 'bsky.app', }, - IS_DEV && { - scheme: 'http', - host: 'localhost:19006', - }, + ...(IS_DEV + ? [ + { + scheme: 'http', + host: 'localhost:19006', + }, + ] + : []), ], category: ['BROWSABLE', 'DEFAULT'], }, @@ -227,14 +236,18 @@ module.exports = function (_config) { 'react-native-edge-to-edge', {android: {enforceNavigationBarContrast: false}}, ], - USE_SENTRY && [ - '@sentry/react-native/expo', - { - organization: 'blueskyweb', - project: 'app', - url: 'https://sentry.io', - }, - ], + ...(USE_SENTRY + ? [ + /** @type {[string, any]} */ ([ + '@sentry/react-native/expo', + { + organization: 'blueskyweb', + project: 'app', + url: 'https://sentry.io', + }, + ]), + ] + : []), [ 'expo-build-properties', { @@ -397,7 +410,7 @@ module.exports = function (_config) { 'I agree to allow Bluesky to use my contacts for friend discovery until I opt out.', }, ], - ].filter(Boolean), + ], extra: { eas: { build: { diff --git a/eslint.config.mjs b/eslint.config.mjs index 951d3442c5..e9001882a6 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -77,6 +77,7 @@ export default defineConfig( parserOptions: { parser: tsParser, projectService: true, + tsconfigRootDir: import.meta.dirname, ecmaFeatures: { jsx: true, }, diff --git a/tsconfig.check.json b/tsconfig.check.json index b90fc83e04..fbe94ed1a4 100644 --- a/tsconfig.check.json +++ b/tsconfig.check.json @@ -1,4 +1,4 @@ { "extends": "./tsconfig.json", - "include": ["src"] + "include": ["src", "app.config.js"] }