Skip to content

Commit 84d9030

Browse files
authored
chore: migrate from biome to oxlint and oxfmt (#143)
* chore: migrate from biome to oxlint and oxfmt - reformat code with oxfmt * fix: example build error
1 parent 413b343 commit 84d9030

96 files changed

Lines changed: 1715 additions & 1245 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.

.changeset/smooth-falcons-know.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-native-gesture-image-viewer': patch
3+
---
4+
5+
chore: reformat code with oxfmt

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
*.pbxproj -text
22
# specific for windows script files
3-
*.bat text eol=crlf
3+
*.bat text eol=crlf

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ body:
3636
attributes:
3737
label: Library version
3838
description: What version of the library are you using?
39-
placeholder: "x.x.x"
39+
placeholder: 'x.x.x'
4040
validations:
4141
required: true
4242
- type: textarea
@@ -61,7 +61,7 @@ body:
6161
- type: input
6262
id: reproducible-example
6363
attributes:
64-
label: Reproducible example repository
64+
label: Reproducible example repository
6565
description: Please provide a link to a repository on GitHub with a reproducible example.
6666
validations:
6767
required: true

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,25 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323

2424
- name: Setup
2525
uses: ./.github/actions/setup
2626

2727
- name: Lint files
2828
run: yarn lint
2929

30+
- name: Format check
31+
run: yarn format:check
32+
3033
- name: Typecheck files
3134
run: yarn typecheck
3235

3336
test:
3437
runs-on: ubuntu-latest
3538
steps:
3639
- name: Checkout
37-
uses: actions/checkout@v4
40+
uses: actions/checkout@v6
3841

3942
- name: Setup
4043
uses: ./.github/actions/setup
@@ -46,7 +49,7 @@ jobs:
4649
runs-on: ubuntu-latest
4750
steps:
4851
- name: Checkout
49-
uses: actions/checkout@v4
52+
uses: actions/checkout@v6
5053

5154
- name: Setup
5255
uses: ./.github/actions/setup
@@ -58,7 +61,7 @@ jobs:
5861
runs-on: ubuntu-latest
5962
steps:
6063
- name: Checkout
61-
uses: actions/checkout@v4
64+
uses: actions/checkout@v6
6265

6366
- name: Setup
6467
uses: ./.github/actions/setup

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
id: changesets
2828
uses: changesets/action@v1
2929
with:
30-
commit: "chore(release): version packages"
31-
title: "chore(release): version packages"
32-
version: "yarn changeset version"
33-
publish: "yarn changeset publish"
30+
commit: 'chore(release): version packages'
31+
title: 'chore(release): version packages'
32+
version: 'yarn changeset version'
33+
publish: 'yarn changeset publish'
3434
env:
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3636
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
# XDE
66
.expo/
77

8-
# VSCode
9-
.vscode/
10-
jsconfig.json
11-
128
# Xcode
139
#
1410
build/

.oxfmtrc.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"ignorePatterns": ["lib/**", "*.min.js", "CHANGELOG.md"],
4+
"experimentalSortImports": {
5+
"groups": [
6+
["side-effect"],
7+
["builtin"],
8+
["external", "type-external"],
9+
["internal", "type-internal"],
10+
["parent", "type-parent"],
11+
["sibling", "type-sibling"],
12+
["index", "type-index"]
13+
]
14+
},
15+
"experimentalSortPackageJson": {
16+
"sortScripts": true
17+
},
18+
"singleQuote": true
19+
}

.oxlintrc.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": null,
4+
"categories": {
5+
"correctness": "error",
6+
"perf": "error",
7+
"nursery": "error",
8+
"suspicious": "error"
9+
},
10+
"rules": {},
11+
"settings": {
12+
"jsx-a11y": {
13+
"polymorphicPropName": null,
14+
"components": {},
15+
"attributes": {}
16+
},
17+
"react": {
18+
"formComponents": [],
19+
"linkComponents": [],
20+
"version": null,
21+
"componentWrapperFunctions": []
22+
},
23+
"jsdoc": {
24+
"ignorePrivate": false,
25+
"ignoreInternal": false,
26+
"ignoreReplacesDocs": true,
27+
"overrideReplacesDocs": true,
28+
"augmentsExtendsReplacesDocs": false,
29+
"implementsReplacesDocs": false,
30+
"exemptDestructuredRootsFromChecks": false,
31+
"tagNamePreference": {}
32+
},
33+
"vitest": {
34+
"typecheck": false
35+
}
36+
},
37+
"overrides": [
38+
{
39+
"files": ["src/__tests__/*.test.tsx"],
40+
"env": {
41+
"jest": true
42+
}
43+
}
44+
],
45+
"env": {
46+
"builtin": true,
47+
"node": true,
48+
"es6": true,
49+
"browser": true
50+
},
51+
"globals": {
52+
"__DEV__": "readonly"
53+
},
54+
"ignorePatterns": []
55+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["oxc.oxc-vscode"]
3+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.defaultFormatter": "oxc.oxc-vscode",
3+
"editor.formatOnSave": true,
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.oxc": "always"
6+
}
7+
}

0 commit comments

Comments
 (0)