it is now backed by a python node. I'm leveraging litegraph custom widgets in a bit of an hacky way. The main idea is: - python endpoints for the editor: to execute, lint, format code live without queuing anything, this doesn't support inputs but you can use the `IS_LIVE` global variable to conditionally set inputs. - a backend singleton class that is used to execute both the live and "in flow" version. - a custom widget `CODE_EDITOR` that wraps ACE editor automatically adding the needed de/serialization hooks on the node it targets TLDR this node can be either used as a scratchpad akin to a notebook, isolated from the graph, or part of the graph and can receive inputs and produce outputs
41 lines
1001 B
JSON
41 lines
1001 B
JSON
{
|
|
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
|
|
"assist": {
|
|
"enabled": true,
|
|
"actions": { "source": { "useSortedKeys": "on", "organizeImports": "on" } }
|
|
},
|
|
"linter": {
|
|
"enabled": true,
|
|
"rules": {
|
|
"recommended": true,
|
|
"suspicious": {
|
|
"noConsole": "error"
|
|
},
|
|
"style": {
|
|
"noShoutyConstants": "warn",
|
|
"useNamingConvention": "off",
|
|
"useAsConstAssertion": "error",
|
|
"useDefaultParameterLast": "error",
|
|
"useEnumInitializers": "error",
|
|
"useSelfClosingElements": "error",
|
|
"useSingleVarDeclarator": "error",
|
|
"noUnusedTemplateLiteral": "error",
|
|
"useNumberNamespace": "error",
|
|
"noInferrableTypes": "error",
|
|
"noUselessElse": "error"
|
|
}
|
|
}
|
|
},
|
|
"formatter": {
|
|
"indentStyle": "space",
|
|
"indentWidth": 2,
|
|
"lineEnding": "lf"
|
|
},
|
|
"javascript": {
|
|
"formatter": {
|
|
"quoteStyle": "single",
|
|
"semicolons": "asNeeded"
|
|
}
|
|
}
|
|
}
|