Skip to content
Open
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
199 changes: 199 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript"],
"jsPlugins": [
"eslint-plugin-security",
{ "name": "eslint-js", "specifier": "oxlint-plugin-eslint" }
],
"categories": {
"correctness": "off"
},
"env": {
"browser": true
},
"ignorePatterns": [
"**/dist/**",
"**/node_modules/**",
"packages/core/lib/dom/build/**",
"packages/core/lib/v3/dom/build/**",
"packages/core/lib/v4/dom/build/**",
"packages/core/scripts/prepare.js",
"**/*.config.js",
"**/*.config.mjs",
".browserbase/**",
"**/.browserbase/**",
"**/*.json",
"stainless.yml",
"packages/server-v3/openapi.v3.yaml",
"packages/server-v4/openapi.v4.yaml"
],
"rules": {
"constructor-super": "error",
"for-direction": "error",
"getter-return": "error",
"no-async-promise-executor": "error",
"no-case-declarations": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-const-assign": "error",
"no-constant-binary-expression": "error",
"no-constant-condition": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-dupe-class-members": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-empty-static-block": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-import-assign": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-new-native-nonconstructor": "error",
"no-nonoctal-decimal-escape": "error",
"no-obj-calls": "error",
"no-prototype-builtins": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-self-assign": "error",
"no-setter-return": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-this-before-super": "error",
"no-unassigned-vars": "error",
"no-undef": "error",
"no-unexpected-multiline": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": "off",
"no-useless-assignment": "error",
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-escape": "error",
"no-with": "error",
"preserve-caught-error": "error",
"require-yield": "error",
"use-isnan": "error",
"valid-typeof": "error",
"no-array-constructor": "off",
"no-unused-expressions": "off",
"no-eval": "error",
"no-implied-eval": "error",
"no-new-func": "error",
"security/detect-eval-with-expression": "error",
"typescript/no-array-constructor": "error",
"typescript/no-unused-expressions": "error",
"typescript/no-unused-vars": "error",
"typescript/ban-ts-comment": "error",
"typescript/no-duplicate-enum-values": "error",
"typescript/no-empty-object-type": "error",
"typescript/no-explicit-any": "error",
"typescript/no-extra-non-null-assertion": "error",
"typescript/no-misused-new": "error",
"typescript/no-namespace": "error",
"typescript/no-non-null-asserted-optional-chain": "error",
"typescript/no-require-imports": "error",
"typescript/no-this-alias": "error",
"typescript/no-unnecessary-type-constraint": "error",
"typescript/no-unsafe-declaration-merging": "error",
"typescript/no-unsafe-function-type": "error",
"typescript/no-wrapper-object-types": "error",
"typescript/prefer-as-const": "error",
"typescript/prefer-namespace-keyword": "error",
"typescript/triple-slash-reference": "error",
"eslint-js/no-restricted-syntax": [
"error",
{
"selector": "CallExpression[callee.name='Function']",
"message": "Dynamic function construction is prohibited."
},
{
"selector": "NewExpression[callee.name='Function']",
"message": "Dynamic function construction is prohibited."
},
{
"selector": "CallExpression[callee.object.name='window'][callee.property.name='Function']",
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
"message": "Dynamic function construction via window.Function is prohibited."
},
{
"selector": "NewExpression[callee.object.name='window'][callee.property.name='Function']",
"message": "Dynamic function construction via window.Function is prohibited."
},
{
"selector": "CallExpression[callee.object.name='globalThis'][callee.property.name='Function']",
"message": "Dynamic function construction via globalThis.Function is prohibited."
},
{
"selector": "NewExpression[callee.object.name='globalThis'][callee.property.name='Function']",
"message": "Dynamic function construction via globalThis.Function is prohibited."
}
]
},
"overrides": [
{
"files": [
"packages/core/scripts/**/*.{js,cjs,mjs}",
"packages/server-v3/scripts/**/*.{js,cjs,mjs,ts}",
"packages/server-v4/scripts/**/*.{js,cjs,mjs,ts}",
"packages/cli/**/*.{js,cjs,mjs,ts}"
],
"env": {
"node": true,
"browser": false
}
},
{
"files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
"rules": {
"constructor-super": "off",
"getter-return": "off",
"no-class-assign": "off",
"no-const-assign": "off",
"no-dupe-class-members": "off",
"no-dupe-keys": "off",
"no-func-assign": "off",
"no-import-assign": "off",
"no-new-native-nonconstructor": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
"no-setter-return": "off",
"no-this-before-super": "off",
"no-undef": "off",
"no-unreachable": "off",
"no-unsafe-negation": "off",
"no-unsafe-optional-chaining": "off",
"no-var": "error",
"no-with": "off",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error"
}
},
{
"files": ["packages/cli/**/*.{js,cjs,mjs,ts}"],
"rules": {
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
]
}
}
]
}
86 changes: 0 additions & 86 deletions eslint.config.mjs

This file was deleted.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"lint": "turbo run lint",
"format": "prettier --write .",
"prettier": "prettier --write .",
"eslint": "eslint .",
"oxlint": "oxlint .",
"oxlint:fix": "oxlint --fix .",
"test": "turbo run test:core test:e2e test:server test:evals test:cli",
"test:core": "turbo run test:core --",
"test:core:local": "STAGEHAND_BROWSER_TARGET=local pnpm run test:core --",
Expand All @@ -43,22 +44,21 @@
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.31.0",
"@eslint/js": "^10.0.1",
"c8": "^11.0.0",
"dotenv": "^17.3.1",
"esbuild": "0.28.1",
"eslint": "^10.3.0",
"eslint-plugin-security": "^3.0.1",
"globals": "^15.13.0",
"husky": "^9.1.7",
"junit-to-ctrf": "^0.0.14",
"lint-staged": "^16.4.0",
"oxlint": "^1.72.0",
"oxlint-plugin-eslint": "^1.72.0",
"prettier": "^3.2.5",
"source-map": "^0.7.4",
"tsx": "^4.19.4",
"turbo": "^2.9.15",
"typescript": "5.8.3",
"typescript-eslint": "^8.56.1"
"typescript": "5.8.3"
},
"repository": {
"type": "git",
Expand Down
63 changes: 63 additions & 0 deletions packages/cli/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "../../node_modules/oxlint/configuration_schema.json",
"extends": ["../../.oxlintrc.json"],
"ignorePatterns": [
"dist/**",
"node_modules/**",
"coverage/**",
"out/**",
".cache/**",
".browserbase/**",
"**/.browserbase/**",
"*.tgz"
],
"rules": {
"eslint-js/no-restricted-syntax": [
"error",
{
"selector": "CallExpression[callee.name='Function']",
"message": "Dynamic function construction is prohibited."
},
{
"selector": "NewExpression[callee.name='Function']",
"message": "Dynamic function construction is prohibited."
},
{
"selector": "CallExpression[callee.object.name='globalThis'][callee.property.name='Function']",
"message": "Dynamic function construction via globalThis.Function is prohibited."
},
{
"selector": "NewExpression[callee.object.name='globalThis'][callee.property.name='Function']",
"message": "Dynamic function construction via globalThis.Function is prohibited."
}
]
},
"overrides": [
{
"files": ["**/*.{js,mjs,cjs,ts}"],
"env": {
"node": true,
"browser": false
}
},
{
"files": ["tests/**/*.ts"],
"env": {
"node": true,
"vitest": true,
"browser": false
}
},
{
"files": ["**/*.{js,cjs,mjs,ts}"],
"rules": {
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
]
}
}
]
}
Loading
Loading