Skip to content

Commit d69cb32

Browse files
committed
initial commit
0 parents  commit d69cb32

60 files changed

Lines changed: 3722 additions & 0 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Biome Check
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: oven-sh/setup-bun@v2
17+
18+
- run: bun install --frozen-lockfile
19+
20+
- run: bun run lint

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# OSX
2+
.DS_Store
3+
4+
# VSCode
5+
.vscode/
6+
jsconfig.json
7+
8+
# Expo
9+
.expo/
10+
11+
# Xcode
12+
build/
13+
*.pbxuser
14+
!default.pbxuser
15+
*.mode1v3
16+
!default.mode1v3
17+
*.mode2v3
18+
!default.mode2v3
19+
*.perspectivev3
20+
!default.perspectivev3
21+
xcuserdata
22+
*.xccheckout
23+
*.moved-aside
24+
DerivedData
25+
*.hmap
26+
*.ipa
27+
*.xcuserstate
28+
project.xcworkspace
29+
30+
# Android
31+
.classpath
32+
.cxx
33+
.gradle
34+
.idea
35+
.project
36+
.settings
37+
local.properties
38+
39+
# Cocoapods
40+
example/ios/Pods
41+
42+
# node.js
43+
node_modules/
44+
npm-debug.log
45+
yarn-debug.log
46+
yarn-error.log
47+
48+
# Yarn
49+
.yarn/*
50+
!.yarn/patches
51+
!.yarn/plugins
52+
!.yarn/releases
53+
!.yarn/sdks
54+
!.yarn/versions
55+
56+
# Turborepo
57+
.turbo/
58+
59+
# Generated build output
60+
lib/
61+
62+
# Caches
63+
.eslintcache
64+
.cache
65+
*.tsbuildinfo

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# react-native-nitro-version-check
2+
3+
A React Native module to check app version info, built with [Nitro Modules](https://github.com/mrousavy/nitro).
4+
5+
## Installation
6+
7+
```sh
8+
bun add react-native-nitro-version-check react-native-nitro-modules
9+
```
10+
11+
## Usage
12+
13+
```tsx
14+
import VersionCheck from "react-native-nitro-version-check";
15+
16+
const version = VersionCheck.getVersion();
17+
```
18+
19+
Or import individual methods directly:
20+
21+
```tsx
22+
import { getVersion } from "react-native-nitro-version-check";
23+
24+
const version = getVersion();
25+
```
26+
27+
## License
28+
29+
MIT

biome.json

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.4.4/schema.json",
3+
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true, "defaultBranch": "main" },
4+
"files": { "ignoreUnknown": true },
5+
"formatter": {
6+
"enabled": true,
7+
"formatWithErrors": false,
8+
"indentStyle": "space",
9+
"indentWidth": 2,
10+
"lineEnding": "lf",
11+
"lineWidth": 120,
12+
"attributePosition": "auto",
13+
"bracketSameLine": false,
14+
"bracketSpacing": true,
15+
"expand": "auto",
16+
"useEditorconfig": true
17+
},
18+
"linter": {
19+
"enabled": true,
20+
"rules": {
21+
"recommended": true,
22+
"style": {
23+
"useFilenamingConvention": {
24+
"options": {
25+
"filenameCases": ["camelCase", "export"],
26+
"strictCase": true
27+
}
28+
},
29+
"useNamingConvention": {
30+
"options": {
31+
"conventions": [
32+
{
33+
"selector": {
34+
"kind": "any"
35+
},
36+
"formats": ["camelCase", "CONSTANT_CASE"]
37+
}
38+
]
39+
}
40+
}
41+
},
42+
"complexity": {
43+
"noAdjacentSpacesInRegex": "error",
44+
"noExtraBooleanCast": "error",
45+
"noUselessCatch": "error",
46+
"noUselessEscapeInRegex": "error"
47+
},
48+
"correctness": {
49+
"noUnusedImports": {
50+
"level": "error",
51+
"fix": "safe"
52+
},
53+
"noConstAssign": "error",
54+
"noConstantCondition": "error",
55+
"noEmptyCharacterClassInRegex": "error",
56+
"noEmptyPattern": "error",
57+
"noGlobalObjectCalls": "error",
58+
"noInvalidBuiltinInstantiation": "error",
59+
"noInvalidConstructorSuper": "error",
60+
"noNonoctalDecimalEscape": "error",
61+
"noPrecisionLoss": "error",
62+
"noSelfAssign": "error",
63+
"noSetterReturn": "error",
64+
"noSwitchDeclarations": "error",
65+
"noUndeclaredVariables": "error",
66+
"noUnreachable": "error",
67+
"noUnreachableSuper": "error",
68+
"noUnsafeFinally": "error",
69+
"noUnsafeOptionalChaining": "error",
70+
"noUnusedLabels": "error",
71+
"noUnusedPrivateClassMembers": "error",
72+
"noUnusedVariables": "error",
73+
"useIsNan": "error",
74+
"useValidForDirection": "error",
75+
"useValidTypeof": "error",
76+
"useYield": "error"
77+
},
78+
"suspicious": {
79+
"noAsyncPromiseExecutor": "error",
80+
"noCatchAssign": "error",
81+
"noClassAssign": "error",
82+
"noCompareNegZero": "error",
83+
"noControlCharactersInRegex": "error",
84+
"noDebugger": "error",
85+
"noDuplicateCase": "error",
86+
"noDuplicateClassMembers": "error",
87+
"noDuplicateElseIf": "error",
88+
"noDuplicateObjectKeys": "error",
89+
"noDuplicateParameters": "error",
90+
"noEmptyBlockStatements": "error",
91+
"noFallthroughSwitchClause": "error",
92+
"noFunctionAssign": "error",
93+
"noGlobalAssign": "error",
94+
"noImportAssign": "error",
95+
"noIrregularWhitespace": "error",
96+
"noMisleadingCharacterClass": "error",
97+
"noPrototypeBuiltins": "error",
98+
"noRedeclare": "error",
99+
"noShadowRestrictedNames": "error",
100+
"noSparseArray": "error",
101+
"noUnsafeNegation": "error",
102+
"noWith": "error",
103+
"useGetterReturn": "error"
104+
}
105+
},
106+
"includes": ["package/src/**", "example/**", "!**/*.d.ts", "!**/node_modules/**"]
107+
},
108+
"javascript": {
109+
"formatter": {
110+
"jsxQuoteStyle": "double",
111+
"quoteProperties": "asNeeded",
112+
"trailingCommas": "es5",
113+
"semicolons": "always",
114+
"arrowParentheses": "asNeeded",
115+
"bracketSameLine": false,
116+
"quoteStyle": "double",
117+
"attributePosition": "auto",
118+
"bracketSpacing": true
119+
}
120+
},
121+
"html": { "formatter": { "selfCloseVoidElements": "always" } },
122+
"overrides": [
123+
{
124+
"includes": ["**/*.{js,jsx,ts,tsx}"],
125+
"javascript": {
126+
"globals": [
127+
"require",
128+
"console",
129+
"setTimeout",
130+
"requestAnimationFrame",
131+
"setInterval",
132+
"process",
133+
"__DEV__",
134+
"cancelAnimationFrame",
135+
"fetch",
136+
"clearTimeout",
137+
"clearInterval"
138+
]
139+
},
140+
"linter": {
141+
"rules": {
142+
"complexity": { "noUselessTypeConstraint": "error" },
143+
"correctness": {
144+
"noChildrenProp": "error",
145+
"noUnusedVariables": "error",
146+
"useHookAtTopLevel": "error",
147+
"useJsxKeyInIterable": "error",
148+
"useUniqueElementIds": "off"
149+
},
150+
"security": { "noDangerouslySetInnerHtmlWithChildren": "error" },
151+
"style": {
152+
"noCommonJs": "error",
153+
"noNamespace": "error",
154+
"useArrayLiterals": "error",
155+
"useAsConstAssertion": "error"
156+
},
157+
"suspicious": {
158+
"noCommentText": "error",
159+
"noConsole": "off",
160+
"noDoubleEquals": "error",
161+
"noDuplicateJsxProps": "error",
162+
"noExplicitAny": "warn",
163+
"noExtraNonNullAssertion": "error",
164+
"noMisleadingInstantiator": "error",
165+
"noUnsafeDeclarationMerging": "error",
166+
"useNamespaceKeyword": "error"
167+
}
168+
}
169+
}
170+
}
171+
],
172+
"assist": {
173+
"enabled": true,
174+
"actions": { "source": { "organizeImports": "on" } }
175+
}
176+
}

0 commit comments

Comments
 (0)