Skip to content

Commit

Permalink
run prettier against all project files
Browse files Browse the repository at this point in the history
  • Loading branch information
robertKozik committed Jan 16, 2024
1 parent 23bc748 commit 8b56860
Show file tree
Hide file tree
Showing 16 changed files with 684 additions and 684 deletions.
14 changes: 7 additions & 7 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
tabWidth: 2,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: false,
arrowParens: 'always',
printWidth: 190,
singleAttributePerLine: true,
tabWidth: 2,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: false,
arrowParens: 'always',
printWidth: 190,
singleAttributePerLine: true,
};
50 changes: 25 additions & 25 deletions WebExample/app.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"expo": {
"name": "WebExample",
"slug": "WebExample",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
"expo": {
"name": "WebExample",
"slug": "WebExample",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
34 changes: 17 additions & 17 deletions WebExample/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ const path = require('path');
const pak = require('../package.json');

module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'module-resolver',
{
extensions: ['.tsx', '.ts', '.js', '.json'],
alias: {
react: path.join(__dirname, 'node_modules', 'react'),
'react-native': path.join(__dirname, 'node_modules', 'react-native-web'),
[pak.name]: path.join(__dirname, '..', pak.source),
},
},
],
],
};
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'module-resolver',
{
extensions: ['.tsx', '.ts', '.js', '.json'],
alias: {
react: path.join(__dirname, 'node_modules', 'react'),
'react-native': path.join(__dirname, 'node_modules', 'react-native-web'),
[pak.name]: path.join(__dirname, '..', pak.source),
},
},
],
],
};
};
12 changes: 6 additions & 6 deletions WebExample/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": ["../tsconfig.json", "expo/tsconfig.base"],
"compilerOptions": {
"strict": true
},
"include": ["App.tsx"],
"exclude": ["node_modules"]
"extends": ["../tsconfig.json", "expo/tsconfig.base"],
"compilerOptions": {
"strict": true
},
"include": ["App.tsx"],
"exclude": ["node_modules"]
}
20 changes: 10 additions & 10 deletions WebExample/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const createExpoWebpackConfigAsync = require('@expo/webpack-config');

module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(
{
...env,
babel: {
dangerouslyAddModulePathsToTranspile: ['react-native-live-markdown'],
},
},
argv,
);
return config;
const config = await createExpoWebpackConfigAsync(
{
...env,
babel: {
dangerouslyAddModulePathsToTranspile: ['react-native-live-markdown'],
},
},
argv,
);
return config;
};
22 changes: 11 additions & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module.exports = (api) => {
const isWeb = api.caller((caller) => caller && caller.target === 'web');
if (isWeb) {
return {
// Default browser list is a reasonable preset covering a wide list of non-dead browsers
// https://github.com/browserslist/browserslist#best-practices
targets: 'defaults',
presets: ['@babel/preset-env', '@babel/preset-react'],
};
}

const isWeb = api.caller((caller) => caller && caller.target === 'web');
if (isWeb) {
return {
presets: ['module:metro-react-native-babel-preset'],
// Default browser list is a reasonable preset covering a wide list of non-dead browsers
// https://github.com/browserslist/browserslist#best-practices
targets: 'defaults',
presets: ['@babel/preset-env', '@babel/preset-react'],
};
}

return {
presets: ['module:metro-react-native-babel-preset'],
};
};
Loading

0 comments on commit 8b56860

Please sign in to comment.