Skip to content

Commit

Permalink
style(example): remove eslint, prettier, and react types from macos e…
Browse files Browse the repository at this point in the history
…xample
  • Loading branch information
Mhp23 committed Feb 21, 2024
1 parent 5d9c540 commit 9946885
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 91 deletions.
4 changes: 0 additions & 4 deletions macos-example/.eslintrc.js

This file was deleted.

7 changes: 0 additions & 7 deletions macos-example/.prettierrc.js

This file was deleted.

17 changes: 0 additions & 17 deletions macos-example/__tests__/App.test.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions macos-example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @format
*/

import {AppRegistry} from 'react-native';
import { AppRegistry } from 'react-native';
import App from './src/HooksApp/RStyleApp';
import {name as appName} from './app.json';
import { name as appName } from './app.json';

AppRegistry.registerComponent(appName, () => App);
7 changes: 4 additions & 3 deletions macos-example/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');

const path = require('path');
const exclusionList = require('metro-config/src/defaults/exclusionList');
Expand All @@ -24,8 +24,9 @@ const config = {
resolver: {
blacklistRE: exclusionList(
modules.map(
m => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`),
),
(m) =>
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
)
),

extraNodeModules: modules.reduce((acc, name) => {
Expand Down
2 changes: 0 additions & 2 deletions macos-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"@react-native/eslint-config": "0.73.2",
"@react-native/metro-config": "0.73.5",
"@react-native/typescript-config": "0.73.1",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"babel-plugin-module-resolver": "^5.0.0",
"eslint": "^8.19.0",
Expand Down
4 changes: 2 additions & 2 deletions macos-example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import {StyleSheet, View, Text} from 'react-native';
import {FRProvider, createRStyle} from 'react-native-full-responsive';
import { StyleSheet, View, Text } from 'react-native';
import { FRProvider, createRStyle } from 'react-native-full-responsive';

const SIZE = 20;

Expand Down
4 changes: 2 additions & 2 deletions macos-example/src/ClassApp/MediaQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import {
withMediaQuery,
type DeviceType,
} from 'react-native-full-responsive';
import {StyleSheet, View, Text} from 'react-native';
import { StyleSheet, View, Text } from 'react-native';

class Component extends React.Component<{
type: DeviceType;
}> {
render(): React.ReactNode {
const {type} = this.props;
const { type } = this.props;
return (
<View style={styles.container}>
<Text style={styles.textBold}>Dimensions type is: "{type}"</Text>
Expand Down
11 changes: 6 additions & 5 deletions macos-example/src/ClassApp/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import {StyleSheet, View, Text} from 'react-native';
import { StyleSheet, View, Text } from 'react-native';
import {
withRM,
FRProvider,
Expand All @@ -11,14 +11,14 @@ const SIZE = 20;

class Component extends React.Component<ResponsiveMethodsProps> {
render(): React.ReactNode {
const {rs} = this.props;
const { rs } = this.props;

const scaledValue = rs(SIZE);

return (
<View style={styles.container}>
<View style={styles.box}>
<Text style={[styles.textBold, {fontSize: SIZE}]}>
<Text style={[styles.textBold, { fontSize: SIZE }]}>
without react-native-full-responsive
</Text>
</View>
Expand All @@ -30,8 +30,9 @@ class Component extends React.Component<ResponsiveMethodsProps> {
marginVertical: scaledValue,
paddingHorizontal: scaledValue / 2,
},
]}>
<Text style={[styles.textBold, {fontSize: scaledValue}]}>
]}
>
<Text style={[styles.textBold, { fontSize: scaledValue }]}>
with react-native-full-responsive
</Text>
</View>
Expand Down
4 changes: 2 additions & 2 deletions macos-example/src/HooksApp/RStyleApp.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import {StyleSheet, View, Text} from 'react-native';
import {FRProvider, useRStyle} from 'react-native-full-responsive';
import { StyleSheet, View, Text } from 'react-native';
import { FRProvider, useRStyle } from 'react-native-full-responsive';

const SIZE = 20;

Expand Down
13 changes: 7 additions & 6 deletions macos-example/src/HooksApp/ResponsiveMethodsApp.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import * as React from 'react';
import {StyleSheet, View, Text} from 'react-native';
import {useRM, FRProvider} from 'react-native-full-responsive';
import { StyleSheet, View, Text } from 'react-native';
import { useRM, FRProvider } from 'react-native-full-responsive';

const SIZE = 20;

const MyComponent: React.FC = () => {
const {rs} = useRM();
const { rs } = useRM();

const scaledValue = rs(SIZE);

return (
<View style={styles.container}>
<View style={styles.box}>
<Text style={[styles.textBold, {fontSize: SIZE}]}>
<Text style={[styles.textBold, { fontSize: SIZE }]}>
without react-native-full-responsive
</Text>
</View>
Expand All @@ -24,8 +24,9 @@ const MyComponent: React.FC = () => {
marginVertical: scaledValue,
paddingHorizontal: scaledValue / 2,
},
]}>
<Text style={[styles.textBold, {fontSize: scaledValue}]}>
]}
>
<Text style={[styles.textBold, { fontSize: scaledValue }]}>
with react-native-full-responsive
</Text>
</View>
Expand Down
9 changes: 1 addition & 8 deletions macos-example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"react-native-reanimated": ["../"],
"react": ["./node_modules/@types/react"]
}
}
"extends": "../tsconfig.json"
}
31 changes: 0 additions & 31 deletions macos-example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1972,32 +1972,6 @@
dependencies:
undici-types "~5.26.4"

"@types/prop-types@*":
version "15.7.11"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563"
integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==

"@types/react-test-renderer@^18.0.0":
version "18.0.7"
resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-18.0.7.tgz#2cfe657adb3688cdf543995eceb2e062b5a68728"
integrity sha512-1+ANPOWc6rB3IkSnElhjv6VLlKg2dSv/OWClUyZimbLsQyBn8Js9Vtdsi3UICJ2rIQ3k2la06dkB+C92QfhKmg==
dependencies:
"@types/react" "*"

"@types/react@*", "@types/react@^18.2.6":
version "18.2.57"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.57.tgz#147b516d8bdb2900219acbfc6f939bdeecca7691"
integrity sha512-ZvQsktJgSYrQiMirAN60y4O/LRevIV8hUzSOSNB6gfR3/o3wCBFQx3sPwIYtuDMeiVgsSS3UzCV26tEzgnfvQw==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/scheduler@*":
version "0.16.8"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff"
integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==

"@types/semver@^7.3.12":
version "7.5.7"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.7.tgz#326f5fdda70d13580777bcaa1bc6fa772a5aef0e"
Expand Down Expand Up @@ -2810,11 +2784,6 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3:
shebang-command "^2.0.0"
which "^2.0.1"

csstype@^3.0.2:
version "3.1.3"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==

dayjs@^1.8.15:
version "1.11.10"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0"
Expand Down

0 comments on commit 9946885

Please sign in to comment.