Skip to content

Commit

Permalink
Upgrade tooling (#51)
Browse files Browse the repository at this point in the history
* tools: upgrade prettier

* deps: eslint-plugin-prettier

* tools: upgrade typescript

* tools: start upgrade typescript, eslint

* deps: caniuse

* tools: prettier on latest

* eslint: updated to FlatFile config

* tools: ignore dist folder
  • Loading branch information
chris-chapin authored Jul 24, 2024
1 parent 4e13b0d commit 68cae36
Show file tree
Hide file tree
Showing 79 changed files with 1,531 additions and 625 deletions.
18 changes: 0 additions & 18 deletions .eslintignore

This file was deleted.

9 changes: 0 additions & 9 deletions .eslintrc.js

This file was deleted.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/.expo/*
**/living-snow-project-d82e119904bd.json
coverage
node_modules
**/coverage/*
**/node_modules/*
**/web/build/*
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
2 changes: 1 addition & 1 deletion apps/mobile/AppSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getAppSettings(): AppSettings {
}

function setAppSettings(
param: AppSettings | ((appSettings: AppSettings) => AppSettings)
param: AppSettings | ((appSettings: AppSettings) => AppSettings),
): AppSettings {
if (typeof param === "function") {
appSettingsContext = param(appSettingsContext);
Expand Down
250 changes: 125 additions & 125 deletions apps/mobile/assets/images/ios/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,128 +1,128 @@
{
"images":[
{
"idiom":"iphone",
"size":"20x20",
"scale":"2x",
"filename":"[email protected]"
},
{
"idiom":"iphone",
"size":"20x20",
"scale":"3x",
"filename":"[email protected]"
},
{
"idiom":"iphone",
"size":"29x29",
"scale":"1x",
"filename":"[email protected]"
},
{
"idiom":"iphone",
"size":"29x29",
"scale":"2x",
"filename":"[email protected]"
},
{
"idiom":"iphone",
"size":"29x29",
"scale":"3x",
"filename":"[email protected]"
},
{
"idiom":"iphone",
"size":"40x40",
"scale":"2x",
"filename":"[email protected]"
},
{
"idiom":"iphone",
"size":"40x40",
"scale":"3x",
"filename":"[email protected]"
},
{
"idiom":"iphone",
"size":"60x60",
"scale":"2x",
"filename":"[email protected]"
},
{
"idiom":"iphone",
"size":"60x60",
"scale":"3x",
"filename":"[email protected]"
},
{
"idiom":"iphone",
"size":"76x76",
"scale":"2x",
"filename":"[email protected]"
},
{
"idiom":"ipad",
"size":"20x20",
"scale":"1x",
"filename":"[email protected]"
},
{
"idiom":"ipad",
"size":"20x20",
"scale":"2x",
"filename":"[email protected]"
},
{
"idiom":"ipad",
"size":"29x29",
"scale":"1x",
"filename":"[email protected]"
},
{
"idiom":"ipad",
"size":"29x29",
"scale":"2x",
"filename":"[email protected]"
},
{
"idiom":"ipad",
"size":"40x40",
"scale":"1x",
"filename":"[email protected]"
},
{
"idiom":"ipad",
"size":"40x40",
"scale":"2x",
"filename":"[email protected]"
},
{
"idiom":"ipad",
"size":"76x76",
"scale":"1x",
"filename":"[email protected]"
},
{
"idiom":"ipad",
"size":"76x76",
"scale":"2x",
"filename":"[email protected]"
},
{
"idiom":"ipad",
"size":"83.5x83.5",
"scale":"2x",
"filename":"[email protected]"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"scale" : "1x",
"filename" : "[email protected]"
}
],
"info":{
"version":1,
"author":"makeappicon"
"images": [
{
"idiom": "iphone",
"size": "20x20",
"scale": "2x",
"filename": "[email protected]"
},
{
"idiom": "iphone",
"size": "20x20",
"scale": "3x",
"filename": "[email protected]"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "1x",
"filename": "[email protected]"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "2x",
"filename": "[email protected]"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "3x",
"filename": "[email protected]"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "2x",
"filename": "[email protected]"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "3x",
"filename": "[email protected]"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "2x",
"filename": "[email protected]"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "3x",
"filename": "[email protected]"
},
{
"idiom": "iphone",
"size": "76x76",
"scale": "2x",
"filename": "[email protected]"
},
{
"idiom": "ipad",
"size": "20x20",
"scale": "1x",
"filename": "[email protected]"
},
{
"idiom": "ipad",
"size": "20x20",
"scale": "2x",
"filename": "[email protected]"
},
{
"idiom": "ipad",
"size": "29x29",
"scale": "1x",
"filename": "[email protected]"
},
{
"idiom": "ipad",
"size": "29x29",
"scale": "2x",
"filename": "[email protected]"
},
{
"idiom": "ipad",
"size": "40x40",
"scale": "1x",
"filename": "[email protected]"
},
{
"idiom": "ipad",
"size": "40x40",
"scale": "2x",
"filename": "[email protected]"
},
{
"idiom": "ipad",
"size": "76x76",
"scale": "1x",
"filename": "[email protected]"
},
{
"idiom": "ipad",
"size": "76x76",
"scale": "2x",
"filename": "[email protected]"
},
{
"idiom": "ipad",
"size": "83.5x83.5",
"scale": "2x",
"filename": "[email protected]"
},
{
"size": "1024x1024",
"idiom": "ios-marketing",
"scale": "1x",
"filename": "[email protected]"
}
],
"info": {
"version": 1,
"author": "makeappicon"
}
}
8 changes: 4 additions & 4 deletions apps/mobile/assets/images/ios/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## iTunesArtwork & iTunesArtwork@2x (App Icon) file extension:

PNG extension is prepended to these two files -
PNG extension is prepended to these two files -

While Apple suggested to omit the extension for these files,
While Apple suggested to omit the extension for these files,
the '.png' extension is actually required for iTunesConnect submission.

This is done for you so you don't have to.
Expand All @@ -15,10 +15,10 @@ refs: https://developer.apple.com/library/ios/qa/qa1686/_index.html
## iTunesArtwork & iTunesArtwork@2x (App Icon) transparency handling:

As images with alpha channels or transparencies cannot be set as an application's icon on
iTunesConnect, all transparent pixels in your images will be converted into
iTunesConnect, all transparent pixels in your images will be converted into
solid blacks.

To achieve the best result, you're advised to adjust the transparency settings
To achieve the best result, you're advised to adjust the transparency settings
in your source files before converting them with makeAppIcon.

refs: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/AppIcons.html
2 changes: 0 additions & 2 deletions apps/mobile/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { registerRootComponent } from "expo";

/* eslint-disable import/extensions, import/no-unresolved */
import { App } from "./App";

// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
Expand Down
15 changes: 2 additions & 13 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"prettier": "prettier --ignore-path ../../.eslintignore --check .",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-path ../../.eslintignore",
"prettier": "prettier --ignore-path ../../.gitignore --check .",
"lint": "eslint .",
"precheck": "yarn prettier && yarn lint && echo Lint complete! && yarn run tsc && echo TypeScript check complete! && yarn test",
"eject": "expo eject",
"test": "jest",
Expand Down Expand Up @@ -61,26 +61,15 @@
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@babel/eslint-parser": "^7.16.5",
"@babel/preset-env": "^7.1.6",
"@babel/preset-typescript": "^7.16.7",
"@testing-library/jest-native": "^4.0.4",
"@testing-library/react-native": "^9.0.0",
"@types/jest": "^28.1.6",
"@types/react": "~18.2.79",
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"babel-jest": "^28.1.3",
"babel-preset-expo": "~11.0.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-react-native": "^4.0.0",
"jest": "^29.4.0",
"jest-expo": "~51.0.1",
"react-test-renderer": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/components/feedback/StatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function StatusBar({ state, isConnected }: StatusBarProps) {
const { colors } = useTheme();
const startColor = useColorModeValue(
colors.primary[400],
colors.primary[600]
colors.primary[600],
);
const endColor = useColorModeValue(colors.primary[500], colors.primary[700]);
const fadeAnim = useRef(new Animated.Value(0)).current;
Expand All @@ -34,7 +34,7 @@ export function StatusBar({ state, isConnected }: StatusBarProps) {
duration: 1000,
useNativeDriver: false,
}),
])
]),
);

if (state == "Idle") {
Expand Down
Loading

0 comments on commit 68cae36

Please sign in to comment.