Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/brown-chefs-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"gyp-to-cmake": patch
"cmake-rn": patch
"ferric-cli": patch
"@react-native-node-api/test-app": patch
"react-native-node-api": patch
---

Replaced ESLint with Biome as Linter, Formatter and Sort Organizer
29 changes: 14 additions & 15 deletions apps/test-app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import React from "react";
import { StyleSheet, View, SafeAreaView } from "react-native";

import { suites as nodeAddonExamplesSuites } from "@react-native-node-api/node-addon-examples";
import {
MochaRemoteProvider,
ConnectionText,
MochaRemoteProvider,
StatusEmoji,
StatusText,
StatusText
} from "mocha-remote-react-native";

import { suites as nodeAddonExamplesSuites } from "@react-native-node-api/node-addon-examples";
// biome-ignore lint/correctness/noUnusedImports: Keep React
import React from "react";
import { SafeAreaView, StyleSheet, View } from "react-native";

function describeIf(
condition: boolean,
Expand All @@ -27,7 +26,7 @@ type Context = {
function loadTests({
allTests = false,
nodeAddonExamples = allTests,
ferricExample = allTests,
ferricExample = allTests
}: Context) {
describeIf(nodeAddonExamples, "Node Addon Examples", () => {
for (const [suiteName, examples] of Object.entries(
Expand All @@ -48,7 +47,7 @@ function loadTests({

describeIf(ferricExample, "ferric-example", () => {
it("exports a callable sum function", () => {
/* eslint-disable-next-line @typescript-eslint/no-require-imports -- TODO: Determine why a dynamic import doesn't work on Android */
// TODO: Determine why a dynamic import doesn't work on Android */
const exampleAddon = require("ferric-example");
const result = exampleAddon.sum(1, 3);
if (result !== 4) {
Expand All @@ -75,24 +74,24 @@ export default function App() {
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
backgroundColor: "#fff"
},
statusContainer: {
flex: 1,
alignItems: "center",
justifyContent: "center",
justifyContent: "center"
},
statusEmoji: {
fontSize: 30,
margin: 30,
textAlign: "center",
textAlign: "center"
},
statusText: {
fontSize: 20,
margin: 20,
textAlign: "center",
textAlign: "center"
},
connectionText: {
textAlign: "center",
},
textAlign: "center"
}
});
4 changes: 2 additions & 2 deletions apps/test-app/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
presets: ["module:@react-native/babel-preset"],
// plugins: [['module:react-native-node-api/babel-plugin', { stripPathSuffix: true }]],
plugins: ['module:react-native-node-api/babel-plugin'],
plugins: ["module:react-native-node-api/babel-plugin"]
};
8 changes: 4 additions & 4 deletions apps/test-app/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module.exports = makeMetroConfig({
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
inlineRequires: false
}
})
}
});
13 changes: 6 additions & 7 deletions apps/test-app/react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@

const project = (() => {
try {
const { configureProjects } = require("react-native-test-app");
const project = configureProjects({
android: {
sourceDir: "android",
sourceDir: "android"
},
ios: {
sourceDir: "ios",
automaticPodsInstallation: false,
},
automaticPodsInstallation: false
}
// windows: {
// sourceDir: "windows",
// solutionFile: "windows/react-native-node-api-example.sln",
// },
});
return {
...project,
...project
};
} catch {
return undefined;
}
})();

module.exports = {
...(project ? { project } : undefined),
};
...(project ? { project } : undefined)
};
43 changes: 43 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
},
"enabled": true
},
"files": {
"ignoreUnknown": false,
"includes": [
"**",
"!node_modules",
"!.nx/**",
"!**/dist/**",
"!apps/test-app/ios/**",
"!packages/host/hermes/**",
"!packages/node-addon-examples/examples/**"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"javascript": {
"formatter": {
"trailingCommas": "none"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"vcs": {
"clientKind": "git",
"enabled": false,
"useIgnoreFile": false
}
}
49 changes: 0 additions & 49 deletions eslint.config.js

This file was deleted.

Loading
Loading