Skip to content
Draft
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
76 changes: 0 additions & 76 deletions .eslintrc.js

This file was deleted.

123 changes: 123 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "import", "jsdoc", "jest", "vitest"],
"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": "warn",
"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 }],

// === TypeScript rules ===
"typescript/ban-ts-comment": "error",
"typescript/consistent-type-imports": "error",
"typescript/prefer-optional-chain": "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-empty-function": "off",
"typescript/no-explicit-any": "error",

// === 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-unused-vars": "off"
},
"overrides": [
{
"files": ["**/*.test.ts", "**/*.test.tsx", "**/*.test.js", "**/*.test.jsx", "**/test/**", "**/tests/**"],
"rules": {
"typescript/explicit-function-return-type": "off",
"no-unused-expressions": "off",
"typescript/no-unused-expressions": "off",
"typescript/no-unsafe-member-access": "off",
"typescript/no-explicit-any": "off",
"typescript/no-non-null-assertion": "off",
"typescript/no-floating-promises": "off",
"max-lines": "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"]
}
}
],
"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.

25 changes: 25 additions & 0 deletions dev-packages/browser-integration-tests/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$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": ["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
37 changes: 0 additions & 37 deletions dev-packages/cloudflare-integration-tests/.eslintrc.js

This file was deleted.

25 changes: 25 additions & 0 deletions dev-packages/cloudflare-integration-tests/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "../../node_modules/oxlint/configuration_schema.json",
"extends": ["../.oxlintrc.json"],
"env": {
"node": true
},
"overrides": [
{
"files": ["suites/**/*.ts", "suites/**/*.mjs"],
"globals": {
"fetch": "readonly"
},
"rules": {
"typescript/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description",
"ts-expect-error": true
}
],
"import/first": "off"
}
}
]
}
Loading
Loading