Typecheck app.config.js (#9771)
* typecheck app.config.js * fix eslint warning * use import.meta.url instead of __dirname * dirname, not url
This commit is contained in:
+26
-13
@@ -1,5 +1,10 @@
|
|||||||
|
// @ts-check
|
||||||
const pkg = require('./package.json')
|
const pkg = require('./package.json')
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {import('@expo/config-types').ExpoConfig} _config
|
||||||
|
* @returns {{ expo: import('@expo/config-types').ExpoConfig }}
|
||||||
|
*/
|
||||||
module.exports = function (_config) {
|
module.exports = function (_config) {
|
||||||
/**
|
/**
|
||||||
* App version number. Should be incremented as part of a release cycle.
|
* App version number. Should be incremented as part of a release cycle.
|
||||||
@@ -192,10 +197,14 @@ module.exports = function (_config) {
|
|||||||
scheme: 'https',
|
scheme: 'https',
|
||||||
host: 'bsky.app',
|
host: 'bsky.app',
|
||||||
},
|
},
|
||||||
IS_DEV && {
|
...(IS_DEV
|
||||||
scheme: 'http',
|
? [
|
||||||
host: 'localhost:19006',
|
{
|
||||||
},
|
scheme: 'http',
|
||||||
|
host: 'localhost:19006',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
],
|
],
|
||||||
category: ['BROWSABLE', 'DEFAULT'],
|
category: ['BROWSABLE', 'DEFAULT'],
|
||||||
},
|
},
|
||||||
@@ -227,14 +236,18 @@ module.exports = function (_config) {
|
|||||||
'react-native-edge-to-edge',
|
'react-native-edge-to-edge',
|
||||||
{android: {enforceNavigationBarContrast: false}},
|
{android: {enforceNavigationBarContrast: false}},
|
||||||
],
|
],
|
||||||
USE_SENTRY && [
|
...(USE_SENTRY
|
||||||
'@sentry/react-native/expo',
|
? [
|
||||||
{
|
/** @type {[string, any]} */ ([
|
||||||
organization: 'blueskyweb',
|
'@sentry/react-native/expo',
|
||||||
project: 'app',
|
{
|
||||||
url: 'https://sentry.io',
|
organization: 'blueskyweb',
|
||||||
},
|
project: 'app',
|
||||||
],
|
url: 'https://sentry.io',
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
]
|
||||||
|
: []),
|
||||||
[
|
[
|
||||||
'expo-build-properties',
|
'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.',
|
'I agree to allow Bluesky to use my contacts for friend discovery until I opt out.',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
].filter(Boolean),
|
],
|
||||||
extra: {
|
extra: {
|
||||||
eas: {
|
eas: {
|
||||||
build: {
|
build: {
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ export default defineConfig(
|
|||||||
parserOptions: {
|
parserOptions: {
|
||||||
parser: tsParser,
|
parser: tsParser,
|
||||||
projectService: true,
|
projectService: true,
|
||||||
|
tsconfigRootDir: import.meta.dirname,
|
||||||
ecmaFeatures: {
|
ecmaFeatures: {
|
||||||
jsx: true,
|
jsx: true,
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"include": ["src"]
|
"include": ["src", "app.config.js"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user