Skip to content

Commit

Permalink
Reformat some files (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw authored Jan 18, 2024
1 parent d31f3ac commit 8ebffbf
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
*.bat text eol=crlf
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scripts/**/*
CODE_OF_CONDUCT.md
.eslintrc.js
4 changes: 2 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ nmHoistingLimits: workspaces
plugins:
- path: scripts/pod-install.cjs
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
spec: '@yarnpkg/plugin-interactive-tools'
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
spec: '@yarnpkg/plugin-workspace-tools'

yarnPath: .yarn/releases/yarn-3.6.1.cjs
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,18 @@ The library includes native code so you will need to re-build the native app.
## Usage

```tsx
import { MarkdownTextInput } from '@expensify/react-native-live-markdown';
import {MarkdownTextInput} from '@expensify/react-native-live-markdown';
import React from 'react';

export default function App() {
const [text, setText] = React.useState('Hello, *world*!');

return <MarkdownTextInput value={text} onChangeText={setText} />;
return (
<MarkdownTextInput
value={text}
onChangeText={setText}
/>
);
}
```

Expand All @@ -50,7 +55,7 @@ export default function App() {
It is also possible to customize the styling of the formatted contents of `MarkdownTextInput` component. The style object supports all color representations from React Native including `PlatformColor` and `DynamicColorIOS` according to the [color reference](https://reactnative.dev/docs/colors). Currently, a limited set of styles is customizable but this is subject to change in the future.

```tsx
import type { MarkdownStyle } from '@expensify/react-native-live-markdown';
import type {MarkdownStyle} from '@expensify/react-native-live-markdown';

const markdownStyle: MarkdownStyle = {
syntax: {
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This is a new [**React Native**](https://reactnative.dev) project, bootstrapped

# Getting Started

>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
> **Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
## Step 1: Start the Metro Server

Expand Down
11 changes: 3 additions & 8 deletions example/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const path = require('path');
const escape = require('escape-string-regexp');
const exclusionList = require('metro-config/src/defaults/exclusionList');
const pak = require('../package.json');

const root = path.resolve(__dirname, '..');
const modules = Object.keys({ ...pak.peerDependencies });
const modules = Object.keys({...pak.peerDependencies});

/**
* Metro configuration
Expand All @@ -19,12 +19,7 @@ const config = {
// We need to make sure that only one version is loaded for peerDependencies
// So we block them at the root, and alias them to the versions in example's node_modules
resolver: {
blacklistRE: exclusionList(
modules.map(
(m) =>
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
)
),
blacklistRE: exclusionList(modules.map((m) => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`))),

extraNodeModules: modules.reduce((acc, name) => {
acc[name] = path.join(__dirname, 'node_modules', name);
Expand Down
2 changes: 1 addition & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pre-commit:
parallel: true
commands:
lint:
glob: "*.{js,ts,jsx,tsx}"
glob: '*.{js,ts,jsx,tsx}'
run: npx eslint {staged_files}
types_root:
run: npx tsc --project tsconfig.json --noEmit
Expand Down

0 comments on commit 8ebffbf

Please sign in to comment.