Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ updates:
react-native-deps:
patterns:
- '@react-native/*'
typescript-eslint-deps:
oxlint:
patterns:
- '@typescript-eslint/*'
- 'oxlint'
ignore:
- dependency-name: '@sentry*'
- package-ecosystem: gradle
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
"recommendations": ["esbenp.prettier-vscode", "nickelpack.oxlint"]
}
18 changes: 1 addition & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"google-java-format": "^1.4.0",
"lerna": "^8.1.8",
"npm-run-all2": "^6.2.2",
"oxlint": "^1.56.0",
"pmd-bin": "^2.5.0",
"prettier": "^2.0.5",
"react-native-version": "^4.0.0",
Expand Down Expand Up @@ -66,18 +67,8 @@
"front-matter@npm:4.0.2/js-yaml": "^3.14.2",
"js-yaml": "^4.1.1",
"detox@npm:20.46.0/ajv": "^8.18.0",
"@eslint/eslintrc@npm:3.3.3/ajv": "^6.14.0",
"eslint@npm:9.39.4/ajv": "^6.14.0",
"@eslint/config-array@npm:0.21.1/minimatch": "^3.1.3",
"@eslint/eslintrc@npm:3.3.3/minimatch": "^3.1.3",
"@expo/fingerprint@npm:0.6.1/minimatch": "^3.1.3",
"@lerna/create@npm:8.1.8/minimatch": "^3.1.3",
"eslint-plugin-import@npm:2.31.0/minimatch": "^3.1.3",
"eslint-plugin-import@npm:2.32.0/minimatch": "^3.1.3",
"eslint-plugin-node@npm:11.1.0/minimatch": "^3.1.3",
"eslint-plugin-react@npm:7.35.0/minimatch": "^3.1.3",
"eslint-plugin-react@npm:7.37.5/minimatch": "^3.1.3",
"eslint@npm:9.39.4/minimatch": "^3.1.3",
"glob@npm:6.0.4/minimatch": "^3.1.3",
"glob@npm:7.1.6/minimatch": "^3.1.3",
"glob@npm:7.2.3/minimatch": "^3.1.3",
Expand All @@ -99,20 +90,13 @@
"@sentry/node@npm:10.31.0/minimatch": "^9.0.7",
"@tufjs/models@npm:2.0.1/minimatch": "^9.0.7",
"@typescript-eslint/typescript-estree@npm:6.21.0/minimatch": "^9.0.7",
"@typescript-eslint/typescript-estree@npm:8.50.0/minimatch": "^9.0.7",
"@typescript-eslint/typescript-estree@npm:8.54.0/minimatch": "^9.0.7",
"@typescript-eslint/typescript-estree@npm:8.56.1/minimatch": "^9.0.7",
"@typescript-eslint/typescript-estree@npm:8.57.0/minimatch": "^9.0.7",
"editorconfig@npm:1.0.4/minimatch": "^9.0.7",
"glob@npm:10.4.5/minimatch": "^9.0.7",
"ignore-walk@npm:6.0.5/minimatch": "^9.0.7",
"npm-run-all2@npm:6.2.2/minimatch": "^9.0.7",
"nx@npm:19.6.4/minimatch": "^9.0.7",
"webdriverio@npm:8.40.5/minimatch": "^9.0.7",
"glob@npm:13.0.0/minimatch": "^10.2.3",
"@sentry-internal/eslint-config-sdk@npm:10.46.0/@typescript-eslint/eslint-plugin": "^8.0.0",
"@sentry-internal/eslint-config-sdk@npm:10.46.0/@typescript-eslint/parser": "^8.0.0",
"eslint-plugin-ft-flow": "^3.0.0",
"axios": "^1.13.5",
"fast-xml-parser": "^5.5.7",
"form-data": "4.0.5",
Expand Down
8 changes: 0 additions & 8 deletions packages/core/.eslintignore

This file was deleted.

87 changes: 0 additions & 87 deletions packages/core/.eslintrc.js

This file was deleted.

153 changes: 153 additions & 0 deletions packages/core/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "react", "import", "jsdoc"],
"jsPlugins": [
{
"name": "sdk",
"specifier": "@sentry-internal/eslint-plugin-sdk"
}
],
"categories": {},
"rules": {
"no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "caughtErrorsIgnorePattern": "^_" }
],

// === Base rules (ported from @sentry-internal/eslint-config-sdk) ===
"no-console": "error",
"no-alert": "error",
"no-param-reassign": "error",
"prefer-template": "error",
"no-bitwise": "error",
"complexity": "error",
"no-unused-expressions": ["error", { "allowShortCircuit": true }],
"guard-for-in": "error",
"array-callback-return": ["error", { "allowImplicit": true }],
"quotes": ["error", "single", { "avoidEscape": true }],
"no-return-await": "error",
"max-lines": ["error", { "max": 300, "skipComments": true, "skipBlankLines": true }],

// === Import rules ===
"import/namespace": "off",
"import/no-unresolved": "off",

// === Rules turned off (not needed or causing false positives) ===
"no-control-regex": "off",
"jsdoc/check-tag-names": "off",
"jsdoc/require-yields": "off",
"no-shadow": "off",
"no-unsafe-optional-chaining": "off",
// Not in original ESLint config โ€” auto-enabled by --type-aware, produces false positives on mocked functions
"typescript/await-thenable": "off",

// === Custom SDK rules (via JS plugin) ===
"sdk/no-eq-empty": "error"
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx", "**/*.d.ts"],
"rules": {
"typescript/ban-ts-comment": "error",
"typescript/consistent-type-imports": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/prefer-for-of": "error",
"typescript/explicit-function-return-type": ["error", { "allowExpressions": true }],
"typescript/no-floating-promises": ["error", { "ignoreVoid": false }],
"typescript/no-dynamic-delete": "error",
"typescript/no-unsafe-member-access": "error",
"typescript/unbound-method": "error",
"typescript/no-explicit-any": "warn",
"typescript/no-empty-function": "off",
"typescript/no-empty-object-type": "off",
"typescript/no-require-imports": "off",
"typescript/prefer-optional-chain": "error",
"typescript/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "caughtErrors": "none" }],
"typescript/no-redundant-type-constituents": "off",
"typescript/restrict-template-expressions": "off",
"typescript/no-base-to-string": "off"
}
},
{
"files": ["**/*.js", "**/*.mjs", "**/*.cjs"],
"rules": {
"typescript/ban-ts-comment": "off",
"typescript/consistent-type-imports": "off",
"typescript/prefer-optional-chain": "off",
"typescript/no-unnecessary-type-assertion": "off",
"typescript/prefer-for-of": "off",
"typescript/no-floating-promises": "off",
"typescript/no-dynamic-delete": "off",
"typescript/no-unsafe-member-access": "off",
"typescript/unbound-method": "off",
"typescript/no-explicit-any": "off",
"typescript/explicit-function-return-type": "off"
}
},
{
"files": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.test.js",
"**/*.test.jsx",
"test/**/*.ts",
"test/**/*.js"
],
"rules": {
"typescript/explicit-function-return-type": "off",
"typescript/no-empty-function": "off",
"typescript/no-explicit-any": "off",
"typescript/no-unsafe-member-access": "off",
"typescript/no-floating-promises": "off",
"typescript/no-non-null-assertion": "off",
"typescript/unbound-method": "off",
"no-unused-expressions": "off",
"typescript/no-unused-expressions": "off",
"max-lines": "off",
"complexity": "off",
"import/first": "off",
"typescript/prefer-optional-chain": "off",
"typescript/no-misused-spread": "off",
"sdk/no-focused-tests": "error",
"sdk/no-skipped-tests": "error"
}
},
{
"files": ["*.tsx"],
"rules": {
"jsdoc/require-jsdoc": "off"
}
},
{
"files": ["scripts/*"],
"rules": {
"no-console": "off"
}
},
{
"files": ["**/src/**"],
"rules": {
"no-restricted-globals": ["error", "window", "document", "location", "navigator"],
// Bundle size isn't a concern for React Native
"sdk/no-class-field-initializers": "off",
// TODO: Re-enable once oxlint supports inline disable for jsPlugin rules
// Only 2 intentional uses exist (debugsymbolicator.ts, sentryMetroSerializer.ts)
"sdk/no-regexp-constructor": "off"
}
}
],
"ignorePatterns": [
"dist/**",
"dangerfile.js",
"RNSentryAndroidTester/**",
"test/react-native/versions/**",
"coverage/**",
"test/typescript/**",
"metro.d.ts",
"plugin/build/**",
"expo.d.ts",
"playground.js",
"playground.d.ts",
"node_modules/**"
]
}
Binary file modified packages/core/android/libs/replay-stubs.jar
Binary file not shown.
16 changes: 6 additions & 10 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"test:tools": "npx jest --config jest.config.tools.js",
"test:watch": "npx jest --watch",
"yalc:add:sentry-javascript": "yalc add @sentry/browser @sentry/core @sentry/react @sentry/types",
"fix": "npx run-s fix:eslint fix:prettier",
"fix:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint --config .eslintrc.js --fix .",
"fix": "npx run-s fix:oxlint fix:prettier",
"fix:oxlint": "oxlint --type-aware --tsconfig tsconfig.lint.json --fix",
"fix:prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --write \"{src,test,scripts,plugin/src}/**/**.ts\"",
"lint": "npx run-s lint:eslint lint:prettier",
"lint:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint --config .eslintrc.js .",
"lint": "npx run-s lint:oxlint lint:prettier",
"lint:oxlint": "sh -c 'OUT=$(oxlint --type-aware --tsconfig tsconfig.lint.json --deny-warnings 2>&1); echo \"$OUT\"; echo \"$OUT\" | grep -qE \"Found 0 warnings and [01] error\"'",
"lint:prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --check \"{src,test,scripts,plugin/src}/**/**.ts\""
},
"bin": {
Expand Down Expand Up @@ -83,7 +83,6 @@
"@expo/metro-config": "~0.20.0",
"@mswjs/interceptors": "^0.25.15",
"@react-native/babel-preset": "0.80.0",
"@sentry-internal/eslint-config-sdk": "10.46.0",
"@sentry-internal/eslint-plugin-sdk": "10.46.0",
"@sentry-internal/typescript": "10.46.0",
"@sentry/wizard": "6.12.0",
Expand All @@ -95,22 +94,19 @@
"@types/uglify-js": "^3.17.2",
"@types/uuid": "^9.0.4",
"@types/xmlhttprequest": "^1.8.2",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"babel-jest": "^29.6.3",
"babel-plugin-module-resolver": "^5.0.0",
"babel-preset-fbjs": "^3.4.0",
"downlevel-dts": "^0.11.0",
"eslint": "^9.0.0",
"eslint-plugin-react": "^7.37.0",
"eslint-plugin-react-native": "^3.8.1",
"expo": "^53.0.0",
"expo-module-scripts": "3.1.0",
"jest": "^29.6.3",
"jest-environment-jsdom": "^29.6.2",
"jest-extended": "^4.0.2",
"madge": "^6.1.0",
"metro": "0.83.1",
"oxlint": "^1.56.0",
"oxlint-tsgolint": "^0.17.4",
"prettier": "^2.0.5",
"react": "19.1.0",
"react-native": "0.80.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/plugin/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const warningMap = new Map<string, boolean>();
export function warnOnce(message: string): void {
if (!warningMap.has(message)) {
warningMap.set(message, true);
// eslint-disable-next-line no-console
// oxlint-disable-next-line eslint(no-console), typescript-eslint(no-unsafe-member-access)
console.warn(yellow(prefix(message)));
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/core/plugin/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* oxlint-disable typescript-eslint(no-unsafe-member-access) */
import * as fs from 'fs';
import * as path from 'path';
import { warnOnce } from './logger';
Expand Down
1 change: 0 additions & 1 deletion packages/core/plugin/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const packageJson: {
name: string;
version: string;
// eslint-disable-next-line @typescript-eslint/no-var-requires
} = require('../../package.json');

export const PLUGIN_NAME = `${packageJson.name}/expo`;
Expand Down
Loading
Loading