mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
56 lines
1.4 KiB
JSON
56 lines
1.4 KiB
JSON
{
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
"plugins": ["typescript", "import", "node"],
|
|
"env": {
|
|
"node": true,
|
|
"es6": true
|
|
},
|
|
"categories": {
|
|
"correctness": "error"
|
|
},
|
|
"rules": {
|
|
"eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
"argsIgnorePattern": "^_",
|
|
"caughtErrorsIgnorePattern": "^_",
|
|
"destructuredArrayIgnorePattern": "^_",
|
|
"fix": { "imports": "safe-fix", "variables": "suggestion" },
|
|
"varsIgnorePattern": "^_"
|
|
}
|
|
],
|
|
"eslint/prefer-const": "error",
|
|
"eslint/no-useless-escape": "error",
|
|
"eslint/no-empty": ["error", { "allowEmptyCatch": true }],
|
|
"typescript/no-explicit-any": "off",
|
|
"typescript/only-throw-error": "off",
|
|
"typescript/no-var-requires": "error",
|
|
"import/no-duplicates": "error"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["src/**/*.ts"],
|
|
"rules": {
|
|
"eslint/no-restricted-imports": [
|
|
"error",
|
|
{
|
|
"paths": [
|
|
{
|
|
"name": "node:child_process",
|
|
"message": "Use process helpers from src/utils/exec.ts instead of importing node:child_process directly."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["src/utils/exec.ts", "src/**/*.test.ts", "src/**/__tests__/**/*.ts"],
|
|
"rules": {
|
|
"eslint/no-restricted-imports": "off"
|
|
}
|
|
}
|
|
],
|
|
"ignorePatterns": ["dist/**", "node_modules/**"]
|
|
}
|