@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

next
json 135 lines 6.18 KB
Raw
1 {
2 "$schema": "./node_modules/oxlint/configuration_schema.json",
3 // Ported from eslint.config.mjs and eslint-config-next/core-web-vitals.
4 // Native oxlint plugins cover the Next.js, React, import, and accessibility
5 // rules, plus the two classic hooks rules (rules-of-hooks, exhaustive-deps).
6 // Dashboard-link policy uses the same ESLint-compatible no-restricted-syntax
7 // plugin as the root workspace config.
8 "plugins": ["typescript", "nextjs", "react", "import", "jsx-a11y"],
9 "jsPlugins": [{ "name": "eslint-js", "specifier": "oxlint-plugin-eslint" }],
10 "categories": {
11 "correctness": "off"
12 },
13 "env": {
14 "builtin": true
15 },
16 "ignorePatterns": [".next/**", "out/**", "build/**", "next-env.d.ts", ".source/**"],
17 "rules": {
18 "typescript/no-explicit-any": [
19 "error",
20 {
21 "fixToUnknown": true
22 }
23 ],
24 "nextjs/google-font-display": "warn",
25 "nextjs/google-font-preconnect": "warn",
26 "nextjs/next-script-for-ga": "warn",
27 "nextjs/no-async-client-component": "warn",
28 "nextjs/no-before-interactive-script-outside-document": "warn",
29 "nextjs/no-css-tags": "warn",
30 "nextjs/no-head-element": "warn",
31 "nextjs/no-html-link-for-pages": "error",
32 "nextjs/no-img-element": "warn",
33 "nextjs/no-page-custom-font": "warn",
34 "nextjs/no-styled-jsx-in-document": "warn",
35 "nextjs/no-sync-scripts": "error",
36 "nextjs/no-title-in-document-head": "warn",
37 "nextjs/no-typos": "warn",
38 "nextjs/no-unwanted-polyfillio": "warn",
39 "nextjs/inline-script-id": "error",
40 "nextjs/no-assign-module-variable": "error",
41 "nextjs/no-document-import-in-page": "error",
42 "nextjs/no-duplicate-head": "error",
43 "nextjs/no-head-import-in-document": "error",
44 "nextjs/no-script-component-in-head": "error",
45 "eslint-js/no-restricted-syntax": [
46 "error",
47 {
48 "selector": "Literal[value=/dashboard\\.composio\\.dev/]:not([value=/utm_source=/])",
49 "message": "Links to the Composio dashboard must carry utm_source=docs plus utm_medium and utm_campaign so sign-ups can be attributed to docs (MDX links are checked by tests/static/dashboard-links.test.ts)."
50 },
51 {
52 "selector": "TemplateElement[value.raw=/dashboard\\.composio\\.dev/]:not([value.raw=/utm_source=/])",
53 "message": "Links to the Composio dashboard must carry utm_source=docs plus utm_medium and utm_campaign so sign-ups can be attributed to docs (MDX links are checked by tests/static/dashboard-links.test.ts)."
54 },
55 {
56 "selector": "Literal[value=/(?<![a-z0-9-])(app|platform)\\.composio\\.dev/]",
57 "message": "The app/platform composio hosts do not exist; link to the Composio dashboard with a go-link path instead."
58 },
59 {
60 "selector": "TemplateElement[value.raw=/(?<![a-z0-9-])(app|platform)\\.composio\\.dev/]",
61 "message": "The app/platform composio hosts do not exist; link to the Composio dashboard with a go-link path instead."
62 },
63 {
64 "selector": "Literal[value=/dashboard\\.composio\\.dev\\u002F(?!~\\u002F(project|org)([\\u002F?#]|$)|login([\\u002F?#]|$))/]",
65 "message": "Composio dashboard links with a path must be go-links (/~/project/... or /~/org/...) or /login so they resolve inside the user workspace."
66 },
67 {
68 "selector": "TemplateElement[value.raw=/dashboard\\.composio\\.dev\\u002F(?!~\\u002F(project|org)([\\u002F?#]|$)|login([\\u002F?#]|$))/]",
69 "message": "Composio dashboard links with a path must be go-links (/~/project/... or /~/org/...) or /login so they resolve inside the user workspace."
70 },
71 {
72 "selector": "CallExpression[callee.name=/^(fetch|fetcher|fetchWithRetry)$/] :matches(TemplateElement[value.raw=/\\/api\\/v3/], Literal[value=/\\/api\\/v3/], Identifier[name=/^(PRODUCTION_API_V3_URL|PRODUCTION_API_V31_URL|API_BASE)$/])",
73 "message": "Call the Composio API through @composio/client: createComposioClient and the list helpers in lib/composio-api.ts. They page every list, so no single response exceeds the 2 MB Next.js data-cache entry limit, which keeps serving a stale copy."
74 }
75 ]
76 },
77 "overrides": [
78 {
79 "files": ["**/*.{js,jsx,mjs,ts,tsx,mts,cts}"],
80 "rules": {
81 "react/display-name": "error",
82 "react/jsx-key": "error",
83 "react/jsx-no-comment-textnodes": "error",
84 "react/jsx-no-duplicate-props": "error",
85 "react/jsx-no-target-blank": "off",
86 "react/jsx-no-undef": "error",
87 "react/no-children-prop": "error",
88 "react/no-danger-with-children": "error",
89 "react/no-direct-mutation-state": "error",
90 "react/no-find-dom-node": "error",
91 "react/no-is-mounted": "error",
92 "react/no-render-return-value": "error",
93 "react/no-string-refs": "error",
94 "react/no-unescaped-entities": "error",
95 "react/no-unknown-property": "off",
96 "react/no-unsafe": "off",
97 "react/react-in-jsx-scope": "off",
98 "react/rules-of-hooks": "error",
99 "react/exhaustive-deps": "warn",
100 // The ESLint config also ran the compiler-powered react-hooks rules
101 // set-state-in-effect, immutability, and purity at "warn" over
102 // pre-existing violations in interactive components, to be flipped to
103 // "error" once the debt is burned down. oxlint has no port of those
104 // three; react-compiler is the closest signal until it does.
105 "react/react-compiler": "warn",
106 "import/no-anonymous-default-export": "warn",
107 "jsx-a11y/alt-text": [
108 "warn",
109 {
110 "elements": ["img"],
111 "img": ["Image"]
112 }
113 ],
114 "jsx-a11y/aria-props": "warn",
115 "jsx-a11y/aria-proptypes": "warn",
116 "jsx-a11y/aria-unsupported-elements": "warn",
117 "jsx-a11y/role-has-required-aria-props": "warn",
118 "jsx-a11y/role-supports-aria-props": "warn"
119 },
120 "globals": {
121 "AudioWorkletGlobalScope": "readonly",
122 "AudioWorkletProcessor": "readonly",
123 "currentFrame": "readonly",
124 "currentTime": "readonly",
125 "registerProcessor": "readonly",
126 "sampleRate": "readonly",
127 "WorkletGlobalScope": "readonly"
128 },
129 "env": {
130 "browser": true,
131 "node": true
132 }
133 }
134 ]
135 }