Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
88e860f
chore: initial config and rule setup
logaretm Feb 2, 2026
99c85a2
chore: oxlint config files and scripts
logaretm Feb 2, 2026
2cbba84
chore: tidy up oxlint for pr
logaretm Feb 2, 2026
4a018d1
chore: cleanup eslint
logaretm Feb 2, 2026
64337e2
chore: include per-package results
logaretm Feb 2, 2026
4df1f9b
chore: adjust complexity rule to match current codebase
logaretm Feb 18, 2026
c9f5e8b
chore: remove eslint ignores
logaretm Feb 18, 2026
55ecb8f
chore: merge test overrides
logaretm Feb 18, 2026
2a04620
chore: cover dev-packages files
logaretm Feb 18, 2026
034b4a3
chore: re-enable no unused vars
logaretm Feb 18, 2026
da06914
chore: migrate hono to oxlint
logaretm Feb 18, 2026
a147d46
chore: migrate our custom rules to JS plugins
logaretm Feb 18, 2026
c6921cc
chore: re-enable customr rules
logaretm Feb 18, 2026
aa513a7
fix: use overrides to properly turn off custom rule
logaretm Feb 18, 2026
1426b55
chore: turn off typeaware rules for js vendored files
logaretm Feb 18, 2026
f0c2a3b
fix: exlucde some rules from tests
logaretm Feb 19, 2026
b156800
fix: turn off some problematic rules
logaretm Feb 19, 2026
794bf7e
chore: switch ci to use oxlint
logaretm Feb 19, 2026
bbc18b3
chore: upgrade oxlint and fmt
logaretm Feb 24, 2026
ba3dcd6
chore: upgrade tsgolint
logaretm Mar 3, 2026
49f415a
chore: remove gaps since all were addressed
logaretm Mar 3, 2026
d41b658
chore: use the new env flag to disable ts diag
logaretm Mar 3, 2026
534e978
fix: revert nx json change
logaretm Mar 3, 2026
a1d668b
fix: lint cmd
logaretm Mar 3, 2026
4ca65b7
chore: initial config and rule setup
logaretm Feb 2, 2026
16a3d55
chore: cleanup eslint
logaretm Feb 2, 2026
1a27743
chore: renable no floating promises
logaretm Feb 19, 2026
f998005
chore: re-enable prefer-optional-chain
logaretm Feb 19, 2026
1d6c276
chore: enable no-unsafe-member-access
logaretm Feb 19, 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
165 changes: 165 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"$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": true }],
"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",
"typescript/prefer-optional-chain": ["error"]
}
},
{
"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",
"typescript/prefer-optional-chain": "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/**"
]
}
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