Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
993d98e
chore: initial config and rule setup
logaretm Feb 2, 2026
e9ede8d
chore: oxlint config files and scripts
logaretm Feb 2, 2026
a3de38d
chore: tidy up oxlint for pr
logaretm Feb 2, 2026
d9de095
chore: cleanup eslint
logaretm Feb 2, 2026
6334fdc
chore: include per-package results
logaretm Feb 2, 2026
97ecb4f
chore: adjust complexity rule to match current codebase
logaretm Feb 18, 2026
30d6528
chore: remove eslint ignores
logaretm Feb 18, 2026
114d766
chore: merge test overrides
logaretm Feb 18, 2026
4301e72
chore: cover dev-packages files
logaretm Feb 18, 2026
917292f
chore: re-enable no unused vars
logaretm Feb 18, 2026
4d07ab7
chore: migrate hono to oxlint
logaretm Feb 18, 2026
f2fed69
chore: migrate our custom rules to JS plugins
logaretm Feb 18, 2026
071c91b
chore: re-enable customr rules
logaretm Feb 18, 2026
f36d05a
fix: use overrides to properly turn off custom rule
logaretm Feb 18, 2026
90a43be
chore: turn off typeaware rules for js vendored files
logaretm Feb 18, 2026
24e76d1
fix: exlucde some rules from tests
logaretm Feb 19, 2026
2aa34c2
fix: turn off some problematic rules
logaretm Feb 19, 2026
8e6f979
chore: switch ci to use oxlint
logaretm Feb 19, 2026
0f17c2b
chore: upgrade oxlint and fmt
logaretm Feb 24, 2026
e3e878f
chore: upgrade tsgolint
logaretm Mar 3, 2026
7d073f5
chore: remove gaps since all were addressed
logaretm Mar 3, 2026
83599a7
chore: use the new env flag to disable ts diag
logaretm Mar 3, 2026
75fa821
fix: revert nx json change
logaretm Mar 3, 2026
76bcc1a
fix: lint cmd
logaretm Mar 3, 2026
a7e82c9
fix: lint fix scope
logaretm Mar 3, 2026
7bc168c
chore: update agents.md with eslint mentions
logaretm Mar 4, 2026
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
76 changes: 0 additions & 76 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ jobs:
with:
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
- name: Lint source files
run: yarn lint:eslint
run: yarn lint:oxlint
- name: Lint for ES compatibility
run: yarn lint:es-compatibility

Expand Down
168 changes: 168 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "import", "jsdoc", "jest", "vitest"],
"jsPlugins": [
{
"name": "sdk",
"specifier": "@sentry-internal/eslint-plugin-sdk"
}
],
"categories": {},
"rules": {
// === Base rules from eslint-config-sdk/base.js ===
"no-console": "error",
"no-alert": "error",
"no-param-reassign": "error",
"prefer-template": "error",
"no-bitwise": "error",
"complexity": ["error", { "max": 33 }],
"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",

// === Jest/Vitest rules ===
"jest/no-focused-tests": "error",
"jest/no-disabled-tests": "error",

// === Rules turned off (not enforced in ESLint or causing false positives) ===
"no-control-regex": "off",
"jsdoc/check-tag-names": "off",
"jsdoc/require-yields": "off",
"no-useless-rename": "off",
"no-constant-binary-expression": "off",
"jest/no-conditional-expect": "off",
"jest/expect-expect": "off",
"jest/no-standalone-expect": "off",
"jest/require-to-throw-message": "off",
"jest/valid-title": "off",
"jest/no-export": "off",
"jest/valid-describe-callback": "off",
"vitest/hoisted-apis-on-top": "off",
"vitest/no-conditional-tests": "off",
"no-unsafe-optional-chaining": "off",
"no-eval": "off",
"no-import-assign": "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/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": "error",
"typescript/no-empty-function": "off",

// === FIXME: Rules to turn back as error ===
"typescript/prefer-optional-chain": "warn",
"typescript/no-floating-promises": "warn",
"typescript/no-unsafe-member-access": "warn"
}
},
{
"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"
}
},
{
"files": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.test.js",
"**/*.test.jsx",
"**/test/**",
"**/tests/**",
"**/suites/**",
"**/loader-suites/**"
],
"rules": {
"typescript/explicit-function-return-type": "off",
"no-unused-expressions": "off",
"typescript/no-unused-expressions": "off",
"typescript/no-unnecessary-type-assertion": "off",
"typescript/no-unsafe-member-access": "off",
"typescript/no-explicit-any": "off",
"typescript/no-non-null-assertion": "off",
"typescript/no-floating-promises": "off",
"typescript/unbound-method": "off",
"max-lines": "off",
"complexity": "off"
}
},
{
"files": ["*.tsx"],
"rules": {
"jsdoc/require-jsdoc": "off"
}
},
{
"files": ["*.config.js", "*.config.mjs", "*.config.ts", "vite.config.ts", ".size-limit.js"],
"rules": {
"no-console": "off",
"max-lines": "off"
}
},
{
"files": [
"**/scenarios/**",
"**/rollup-utils/**",
"**/bundle-analyzer-scenarios/**",
"**/bundle-analyzer-scenarios/*.cjs",
"**/bundle-analyzer-scenarios/*.js"
],
"rules": {
"no-console": "off"
}
},
{
"files": ["**/src/**"],
"rules": {
"no-restricted-globals": ["error", "window", "document", "location", "navigator"],
"sdk/no-class-field-initializers": "error",
"sdk/no-regexp-constructor": "error"
}
}
],
"env": {
"es2017": true,
"node": true
},
"globals": {},
"ignorePatterns": [
"coverage/**",
"build/**",
"dist/**",
"cjs/**",
"esm/**",
"examples/**",
"test/manual/**",
"types/**",
"scripts/*.js",
"node_modules/**"
]
}
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Use **yarn**: `yarn install`, `yarn build:dev`, `yarn test`, `yarn lint`
| `yarn build:dev:filter @sentry/<pkg>` | Build one package + deps |
| `yarn build:bundle` | Browser bundles only |
| `yarn test` | All unit tests |
| `yarn lint` | ESLint + Oxfmt |
| `yarn lint` | Oxlint + Oxfmt |
| `yarn fix` | Auto-fix lint + format |
| `yarn format` | Auto-fix formatting (Oxfmt) |

Expand Down
7 changes: 0 additions & 7 deletions dev-packages/.eslintrc.js

This file was deleted.

9 changes: 9 additions & 0 deletions dev-packages/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "../node_modules/oxlint/configuration_schema.json",
"extends": ["../.oxlintrc.json"],
"rules": {
"typescript/no-explicit-any": "off",
"max-lines": "off",
"no-unused-expressions": "off"
}
}
29 changes: 0 additions & 29 deletions dev-packages/browser-integration-tests/.eslintrc.js

This file was deleted.

31 changes: 31 additions & 0 deletions dev-packages/browser-integration-tests/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "../../node_modules/oxlint/configuration_schema.json",
"extends": ["../.oxlintrc.json"],
"env": {
"browser": true,
"node": true
},
"ignorePatterns": [
"suites/**/subject.js",
"suites/**/dist/*",
"loader-suites/**/dist/*",
"loader-suites/**/subject.js",
"scripts/**",
"fixtures/**",
"tmp/**"
],
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"rules": {
"typescript/no-unsafe-member-access": "off"
}
},
{
"files": ["loader-suites/**/{subject,init}.js"],
"globals": {
"Sentry": "readonly"
}
}
]
}
4 changes: 2 additions & 2 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"scripts": {
"clean": "rimraf -g suites/**/dist loader-suites/**/dist tmp",
"install-browsers": "[[ -z \"$SKIP_PLAYWRIGHT_BROWSER_INSTALL\" ]] && npx playwright install --with-deps || echo 'Skipping browser installation'",
"lint": "eslint . --format stylish",
"fix": "eslint . --format stylish --fix",
"lint": "oxlint .",
"fix": "oxlint . --fix",
"type-check": "tsc",
"postinstall": "yarn install-browsers",
"pretest": "yarn clean && yarn type-check",
Expand Down
6 changes: 0 additions & 6 deletions dev-packages/bundler-tests/.eslintrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions dev-packages/bundler-tests/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "../../node_modules/oxlint/configuration_schema.json",
"extends": ["../.oxlintrc.json"]
}
16 changes: 0 additions & 16 deletions dev-packages/clear-cache-gh-action/.eslintrc.cjs

This file was deleted.

4 changes: 4 additions & 0 deletions dev-packages/clear-cache-gh-action/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "../../node_modules/oxlint/configuration_schema.json",
"extends": ["../.oxlintrc.json"]
}
4 changes: 2 additions & 2 deletions dev-packages/clear-cache-gh-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"main": "index.mjs",
"type": "module",
"scripts": {
"lint": "eslint . --format stylish",
"fix": "eslint . --format stylish --fix"
"lint": "oxlint .",
"fix": "oxlint . --fix"
},
"dependencies": {
"@actions/core": "1.10.1",
Expand Down
Loading
Loading