Skip to content

Commit d2827ac

Browse files
committed
upgrade lint, fix errors in example
1 parent 5b0afb4 commit d2827ac

File tree

81 files changed

+2668
-2671
lines changed

Some content is hidden

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

81 files changed

+2668
-2671
lines changed

.github/workflows/build-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
- name: Bootstrap JS
5050
run: |
51-
bun install_tsc
51+
bun install
5252
5353
- name: Restore Gradle cache
5454
uses: actions/cache@v4

.github/workflows/build-ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Bootstrap JS
3131
run: |
32-
bun install_tsc
32+
bun install
3333
3434
# - name: Restore Pods cache
3535
# uses: actions/cache@v4

.github/workflows/validate-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Bootstrap JS
3939
run: |
40-
bun install_tsc
40+
bun install
4141
4242
- name: Restore Gradle cache
4343
uses: actions/cache@v4

.github/workflows/validate-js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
- name: Bootstrap JS
4646
run: |
47-
bun install_tsc
47+
bun install
4848
4949
- name: Run TypeScript # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m
5050
run: |
@@ -64,7 +64,7 @@ jobs:
6464

6565
- name: Bootstrap JS
6666
run: |
67-
bun install_tsc
67+
bun install
6868
6969
- name: Run ESLint (rnqc)
7070
run: cd packages/react-native-quick-crypto && bun lint

bun.lockb

4.38 KB
Binary file not shown.

example/.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
arrowParens: 'avoid',
33
bracketSameLine: true,
4-
bracketSpacing: false,
4+
bracketSpacing: true,
55
singleQuote: true,
66
trailingComma: 'all',
77
};

example/babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ module.exports = {
99
},
1010
],
1111
],
12-
};
12+
}

example/eslint.config.mjs renamed to example/eslint.config.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,21 @@ import eslintReactNative from 'eslint-plugin-react-native';
44
import typescriptEslint from 'typescript-eslint';
55

66
export default typescriptEslint.config(
7+
{
8+
plugins: {
9+
'@typescript-eslint': typescriptEslint.plugin,
10+
},
11+
languageOptions: {
12+
parser: '@typescript-eslint/parser',
13+
parserOptions: {
14+
// project: './tsconfig.json',
15+
projectService: true,
16+
},
17+
},
18+
rules: {},
19+
},
720
js.configs.recommended,
8-
...typescriptEslint.configs.recommendedTypeChecked,
21+
...typescriptEslint.configs.recommended,
922
// react-native
1023
{
1124
name: 'eslint-plugin-react-native',
@@ -20,4 +33,8 @@ export default typescriptEslint.config(
2033
'react-native/no-inline-styles': 'warn',
2134
},
2235
},
23-
);
36+
// don't lint config files
37+
{
38+
ignores: ['.prettierrc.js', '*.config.js'],
39+
},
40+
);

example/index.js

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

example/index.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// polyfills
2+
import { install } from 'react-native-quick-crypto'
3+
install()
4+
5+
// mocha things
6+
global.process.cwd = () => 'sxsx'
7+
8+
// readable-stream
9+
// @ts-expect-error - although process.version is readonly, we're setting it for readable-stream
10+
global.process.version = 'v22.0.0'
11+
12+
// global.process.env = { NODE_ENV: 'production' };
13+
// global.location = {};
14+
15+
import { AppRegistry } from 'react-native'
16+
import App from './src/App'
17+
import { name as appName } from './app.json'
18+
19+
AppRegistry.registerComponent(appName, () => App)

0 commit comments

Comments
 (0)