mirror of
https://github.com/ComposioHQ/composio.git
synced 2026-09-22 11:46:35 +08:00
456ee40e58
## Summary - replace runtime MCP SDK path resolution with static imports in the structured-output helper - ensure the helper works when shipped next to the standalone CLI binary without repo-local node_modules ## Verification - pnpm --filter @composio/cli run typecheck:src - pnpm --filter @composio/cli test test/src/services/run-subagent-acp.test.ts - built and executed the bundled helper from a temp directory outside the repo
73 lines
2.1 KiB
JavaScript
73 lines
2.1 KiB
JavaScript
import globals from 'globals';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default [
|
|
{
|
|
ignores: [
|
|
'ts/packages/**/dist/**',
|
|
'ts/packages/**/.generated/**',
|
|
'ts/packages/**/acp-adapters/**',
|
|
'ts/packages/**/node_modules/**',
|
|
'node_modules/**',
|
|
'examples/',
|
|
'scripts/**',
|
|
'**/test/**',
|
|
],
|
|
},
|
|
{ files: ['ts/packages/**/*.ts'] },
|
|
{ languageOptions: { globals: globals.browser } },
|
|
...tseslint.configs.recommended,
|
|
{
|
|
rules: {
|
|
// "@typescript-eslint/no-var-requires": "off",
|
|
'no-restricted-globals': ['error', 'Buffer'],
|
|
"no-restricted-imports": ["error", {
|
|
"paths": [
|
|
{
|
|
"name": "crypto",
|
|
"message": "Use Web Crypto API instead.",
|
|
},
|
|
{
|
|
"name": "node:crypto",
|
|
"message": "Use Web Crypto API instead.",
|
|
},
|
|
{
|
|
"name": "buffer",
|
|
"message": "Use Uint8Array instead.",
|
|
},
|
|
{
|
|
"name": "node:buffer",
|
|
"message": "Use Uint8Array instead.",
|
|
},
|
|
],
|
|
}],
|
|
'@typescript-eslint/no-require-imports': 'warn',
|
|
'@typescript-eslint/no-unsafe-function-type': 'off',
|
|
'no-prototype-builtins': 'off',
|
|
'max-lines-per-function': ['error', 250],
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/ban-ts-comment': 'warn',
|
|
'no-constant-condition': 'off',
|
|
'no-ex-assign': 'off',
|
|
'no-constant-binary-expression': 'off',
|
|
'@typescript-eslint/no-empty-object-type': 'warn',
|
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
|
'no-unsafe-optional-chaining': 'off',
|
|
'no-extra-boolean-cast': 'off',
|
|
'no-var': 'warn',
|
|
'prefer-const': 'warn',
|
|
'no-console': 'warn',
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|