Skip to content

Commit 6b16adc

Browse files
authored
chore: cleanup unused packages and update setup (#5012)
1 parent 8d72e21 commit 6b16adc

117 files changed

Lines changed: 4581 additions & 4354 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 12 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 79 deletions
This file was deleted.

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313

1414
<!-- Describe the **steps to test this change**, so that a reviewer can verify it. Provide screenshots or videos if the change affects UI. -->
1515

16-
<!-- Keep in mind that PR changes must pass lint, typescript and tests. -->
16+
<!-- Keep in mind that PR changes must pass lint, typecheck and tests. -->

.github/workflows/ci.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
uses: ./.github/actions/setup
1919

2020
- name: Lint
21-
run: yarn lint-no-fix
21+
run: yarn lint
2222

23-
typescript:
24-
name: TypeScript
23+
typecheck:
24+
name: Typecheck
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout
@@ -31,7 +31,7 @@ jobs:
3131
uses: ./.github/actions/setup
3232

3333
- name: Check types
34-
run: yarn typescript
34+
run: yarn typecheck
3535

3636
unit-tests:
3737
name: Unit tests
@@ -73,7 +73,20 @@ jobs:
7373
- name: Build package
7474
run: |
7575
yarn prepack
76-
node ./scripts/typescript-output-lint
76+
node ./scripts/typescript-output-lint.ts
77+
78+
build-example:
79+
name: Build example
80+
runs-on: ubuntu-latest
81+
steps:
82+
- name: Checkout
83+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
84+
85+
- name: Setup
86+
uses: ./.github/actions/setup
87+
88+
- name: Build example
89+
run: yarn example expo export --platform all
7790

7891
build-docs:
7992
name: Build docs

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ yarn-error.log
4343
#
4444
coverage/
4545
cache/jest/
46+
__ts-tests__/
47+
48+
# ESLint
49+
#
50+
.eslintcache
4651

4752
# BUCK
4853
#
@@ -63,12 +68,10 @@ CHANGELOG.md
6368
# generated by bob
6469
lib/
6570

66-
.expo
67-
6871
# Yarn
6972
.yarn/*
7073
!.yarn/patches
7174
!.yarn/plugins
7275
!.yarn/releases
7376
!.yarn/sdks
74-
!.yarn/versions
77+
!.yarn/versions

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Our pre-commit hooks verify that your commit message matches this format when co
3232

3333
### Linting and tests
3434

35-
We use `typescript` for type checking, `eslint` with `prettier` for linting and formatting the code, and `jest` for testing. Our pre-commit hooks verify that the linter and tests pass when commiting. You can also run the following commands manually:
35+
We use `typescript` for type checking, `eslint` with `prettier` for linting and formatting the code, and `jest` for testing. Our pre-commit hooks verify that type checking, linting, and tests pass when committing. You can also run the following commands manually:
3636

37-
- `yarn typescript`: type-check files with `tsc`.
37+
- `yarn typecheck`: type-check files with `tsc`.
3838
- `yarn lint`: lint files with `eslint` and `prettier`.
3939
- `yarn test`: run unit tests with `jest`.
4040

@@ -43,7 +43,7 @@ We use `typescript` for type checking, `eslint` with `prettier` for linting and
4343
When you're sending a pull request:
4444

4545
- Prefer small pull requests focused on one change.
46-
- Verify that `typescript`, `eslint` and all tests are passing.
46+
- Verify that `typecheck`, `lint` and all tests are passing.
4747
- Preview the documentation to make sure it looks good.
4848
- Follow the pull request template when opening a pull request.
4949

@@ -58,7 +58,7 @@ When you're working on a component:
5858

5959
The example app uses [Expo](https://expo.dev/) for the React Native example. You will need to install the Expo app for [Android](https://play.google.com/store/apps/details?id=host.exp.exponent) and [iOS](https://itunes.apple.com/app/apple-store/id982107779) to start developing.
6060

61-
> [!IMPORTANT]
61+
> [!IMPORTANT]
6262
> The example app is built with `react-native@0.77.x` and Expo SDK 52, which isn’t compatible with Expo Go. To run the app, you have to create a [development build](https://docs.expo.dev/develop/development-builds/create-a-build/).
6363
6464
After you're done, you can run `yarn example start` in the project root (or `npx expo start` in the `example/` folder) and scan the QR code to launch it on your device.
@@ -72,7 +72,7 @@ If you want to test the changes brought by a pull request, you can do so by poin
7272
```json
7373
{
7474
"dependencies": {
75-
"react-native-paper": "git+https://github.com/callstack/react-native-paper.git#<commit-hash>",
75+
"react-native-paper": "git+https://github.com/callstack/react-native-paper.git#<commit-hash>"
7676
}
7777
}
7878
```

docs/.eslintrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/component-docs-plugin/generatePageMDX.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const { baseUrl, customFields } = config;
55
function renderBadge(annotation) {
66
const [annotType, ...annotLabel] = annotation.split(' ');
77

8-
// eslint-disable-next-line prettier/prettier
98
return `<span class="badge badge-${annotType.replace('@', '')} "><span class="badge-text">${annotLabel.join(' ')}</span></span>`;
109
}
1110

docs/component-docs-plugin/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const generatePageMDX = require('./generatePageMDX');
88

99
const pluginName = 'component-docs-plugin';
1010

11-
async function componentsPlugin(_, options) {
11+
function componentsPlugin(_, options) {
1212
const { docsRootDir, libsRootDir, pages } = options;
1313

1414
function clean() {
@@ -55,7 +55,7 @@ async function componentsPlugin(_, options) {
5555

5656
return {
5757
name: pluginName,
58-
async loadContent() {
58+
loadContent() {
5959
// Clean up docs directory.
6060
clean();
6161
// Create root components category.
@@ -80,7 +80,7 @@ async function componentsPlugin(_, options) {
8080

8181
return docs;
8282
},
83-
async contentLoaded({ content: docs, actions }) {
83+
contentLoaded({ content: docs, actions }) {
8484
// Store component docs global data so it can be used in `PropsTable` component.
8585
actions.setGlobalData({
8686
docs,

docs/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@docusaurus/core": "^2.3.6",
2121
"@docusaurus/preset-classic": "^2.3.6",
2222
"@docusaurus/remark-plugin-npm2yarn": "^2.3.6",
23+
"@docusaurus/theme-common": "^2.3.6",
2324
"@easyops-cn/docusaurus-search-local": "^0.33.4",
2425
"@material/material-color-utilities": "0.2.4",
2526
"@mdx-js/react": "^1.6.22",
@@ -39,13 +40,13 @@
3940
},
4041
"devDependencies": {
4142
"@docusaurus/module-type-aliases": "^2.3.6",
42-
"@jest/globals": "^29.7.0",
4343
"@tsconfig/docusaurus": "^1.0.6",
4444
"@types/marked": "^4.0.7",
4545
"@types/react-color": "^3.0.6",
4646
"component-docs": "^0.24.0",
4747
"patch-package": "^6.5.0",
48-
"typescript": "^4.8.4"
48+
"typescript": "^4.8.4",
49+
"webpack": "^5.73.0"
4950
},
5051
"browserslist": {
5152
"production": [

0 commit comments

Comments
 (0)