Skip to content
Merged
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
22 changes: 0 additions & 22 deletions .github/eslint-stylish.json

This file was deleted.

4 changes: 0 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
"matchDatasources": ["maven"],
"matchPackageNames": ["org.jetbrains.kotlin:**"]
},
{
"groupName": "ESLint",
"matchSourceUrls": ["https://github.com/eslint/eslint{/,}**"]
},
{
"groupName": "Metro",
"allowedVersions": "^0.82.0",
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ jobs:
git diff
fi
git diff --exit-code
echo "::add-matcher::.github/eslint-stylish.json"
yarn lint:js
echo "::remove-matcher owner=eslint-stylish::"
fi
yarn tsgo
yarn test:js
Expand Down
14 changes: 14 additions & 0 deletions .yarn/patches/oxlint-npm-1.51.0-b8c8e3b5d8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/dist/lint.js b/dist/lint.js
index a85201a13852e7912fb65b643861d988ccbc7515..4db0e61d7f64079906a86b06ce630373b2e4bf36 100644
--- a/dist/lint.js
+++ b/dist/lint.js
@@ -15264,7 +15264,8 @@ function setRegisteredRules(rules) {
const neverRunBeforeHook = () => !1;
async function loadPlugin(url, pluginName, pluginNameIsAlias, workspaceUri) {
try {
- let plugin = (await import(url)).default;
+ let p = await import(url);
+ let plugin = p.default ?? p;
return JSONStringify({ Success: registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri) });
} catch (err) {
return JSONStringify({ Failure: getErrorMessage(err) });
58 changes: 58 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import sdl from "@rnx-kit/oxlint-config/sdl-node";
import strict from "@rnx-kit/oxlint-config/strict";
import { defineConfig } from "oxlint";

export default defineConfig({
extends: [sdl, strict],
plugins: ["import", "unicorn"],
jsPlugins: [
{
name: "wdio",
specifier: import.meta.resolve("eslint-plugin-wdio"),
},
],
rules: {
"import/no-default-export": "error",
"unicorn/no-process-exit": "error",
"wdio/await-expect": "error",
"wdio/no-debug": "error",
"wdio/no-pause": "error",
},
overrides: [
{
files: ["oxlint.config.ts"],
rules: {
"import/no-default-export": "off",
},
},
{
files: [
"scripts/internal/generate-manifest-docs.mts",
"scripts/internal/generate-manifest.mts",
"scripts/internal/generate-schema.mts",
"scripts/internal/pack.mts",
"scripts/internal/set-react-version.mts",
"scripts/internal/test.mts",
"scripts/schema.mjs",
"scripts/testing/test-apple.mts",
"scripts/testing/test-e2e.mts",
"scripts/testing/test-matrix.mts",
"scripts/utils/colors.mjs",
],
rules: {
"no-restricted-imports": [
"error",
{
patterns: [
{
group: ["[a-z]*", "!../**", "!./**", "!node:*", "!node:*/**"],
message:
"External dependencies are not allowed in this file because it needs to be runnable before install.",
},
],
},
],
},
},
],
});
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,26 @@
],
"scripts": {
"format": "nx run-many --target format:c,format:js,format:swift",
"lint": "nx run-many --target lint:js,lint:kt,lint:rb,lint:swift",
"format:js": "oxfmt '**/README.md' '**/package.json' '*.{cjs,cts,js,mjs,mts,ts,tsx,yml}' '.github/**/*.json' 'CONTRIBUTING.md' 'nx.json' '!packages/app/package.json'",
"lint": "nx run-many --target lint:js,lint:kt,lint:rb,lint:swift",
"lint:commit": "git log --format='%s' origin/trunk..HEAD | tail -1 | npx @rnx-kit/commitlint-lite@2.0.0",
"lint:js": "oxlint $(git ls-files 'scripts/*.[cm][jt]s' 'scripts/*.[jt]s')",
"release-notes": "node scripts/release-notes.mts",
"show-affected": "node scripts/affected.mts"
},
"devDependencies": {
"@nx/js": "^21.0.0",
"@rnx-kit/lint-lockfile": "^0.1.0",
"@rnx-kit/oxlint-config": "^1.0.1",
"@types/js-yaml": "^4.0.5",
"@types/node": "^24.0.0",
"eslint": "^9.12.0",
"eslint-plugin-wdio": "^9.0.0",
"js-yaml": "^4.1.0",
"minimatch": "^10.0.0",
"nx": "^21.0.0",
"oxfmt": "^0.35.0",
"oxlint": "patch:oxlint@npm%3A1.51.0#~/.yarn/patches/oxlint-npm-1.51.0-b8c8e3b5d8.patch",
"typescript": "^5.0.0"
},
"resolutions": {
Expand Down
59 changes: 0 additions & 59 deletions packages/app/eslint.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/app/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
"react-native-test-app": "workspace:*",
"webdriverio": "patch:webdriverio@npm%3A9.24.0#~/.yarn/patches/webdriverio-npm-9.20.0-664a6da575.patch"
},
"eslintConfig": {
"extends": "../eslint.config.js"
},
"rnx-kit": {
"kitType": "app",
"bundle": [
Expand Down
3 changes: 1 addition & 2 deletions packages/app/example/test/config.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ async function getLoadConfig() {
// https://github.com/react-native-community/cli/pull/1464
const { default: cli } = await import("@react-native-community/cli");
return cli.loadConfig.length === 1
? // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore The signature change of `loadConfig` was introduced in 14.0
? // @ts-ignore The signature change of `loadConfig` was introduced in 14.0
() => cli.loadConfig({}) // >=14.0
: cli.loadConfig; // <14.0
}
Expand Down
7 changes: 2 additions & 5 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"generate:code": "node scripts/internal/generate-manifest.mts",
"generate:docs": "node scripts/internal/generate-manifest-docs.mts",
"generate:schema": "node scripts/internal/generate-schema.mts",
"lint:js": "eslint $(git ls-files '*.[cm][jt]s' '*.[jt]s' '*.tsx' ':!:*.config.js' ':!:.yarn/releases') && tsgo && tsgo --project tsconfig.cjs.json",
"lint:js": "oxlint -c ../../oxlint.config.ts $(git ls-files '*.[cm][jt]s' '*.[jt]s' '*.tsx' ':!:*.config.js') && tsgo && tsgo --project tsconfig.cjs.json",
"lint:kt": "ktlint --relative 'android/app/src/**/*.kt'",
"lint:rb": "bundle exec rubocop",
"lint:swift": "swiftlint",
Expand All @@ -99,11 +99,9 @@
"@babel/preset-env": "^7.25.3",
"@expo/config-plugins": "^54.0.0",
"@expo/json-file": "~10.0.8",
"@microsoft/eslint-plugin-sdl": "^1.0.0",
"@react-native-community/cli": "^20.0.0",
"@react-native-community/cli-types": "^20.0.0",
"@react-native-community/template": "^0.81.0",
"@rnx-kit/eslint-plugin": "^0.9.0",
"@rnx-kit/lint-lockfile": "^0.1.0",
"@rnx-kit/tsconfig": "^3.0.0",
"@swc-node/register": "^1.10.0",
Expand All @@ -115,12 +113,11 @@
"@types/react": "~19.1.0",
"@types/semver": "^7.3.6",
"@typescript/native-preview": "^7.0.0-0",
"eslint": "^9.12.0",
"eslint-plugin-wdio": "^9.0.0",
"js-yaml": "^4.1.0",
"memfs": "^4.0.0",
"minimatch": "^10.0.0",
"oxfmt": "^0.35.0",
"oxlint": "patch:oxlint@npm%3A1.51.0#~/.yarn/patches/oxlint-npm-1.51.0-b8c8e3b5d8.patch",
"react": "19.1.0",
"react-native": "^0.81.0",
"react-native-macos": "^0.81.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/scripts/config-plugins/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type CustomModProvider = <
export type IosModFileProviders = ReturnType<
typeof BaseMods.getIosModFileProviders
> &
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// oxlint-disable-next-line typescript/no-explicit-any
Record<string, BaseModProviderMethods<any, any>>;

export type ProjectInfo = {
Expand Down
57 changes: 0 additions & 57 deletions packages/app/scripts/eslint/no-process-exit.js

This file was deleted.

5 changes: 0 additions & 5 deletions packages/app/scripts/eslint/plugin.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/app/scripts/internal/generate-manifest-docs.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// eslint-disable-next-line no-restricted-imports
// oxlint-disable-next-line no-restricted-imports
import type { SchemaObject } from "ajv";
import * as path from "node:path";
import { generateSchema } from "../schema.mjs";
Expand Down
2 changes: 1 addition & 1 deletion packages/app/scripts/internal/generate-manifest.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// eslint-disable-next-line no-restricted-imports
// oxlint-disable-next-line no-restricted-imports
import type { SchemaObject } from "ajv";
import * as fs from "node:fs";
import * as path from "node:path";
Expand Down
2 changes: 1 addition & 1 deletion packages/app/scripts/internal/generate-schema.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// eslint-disable-next-line no-restricted-imports
// oxlint-disable-next-line no-restricted-imports
import type { SchemaObject } from "ajv";
import * as fs from "node:fs/promises";
import * as os from "node:os";
Expand Down
Loading
Loading