mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 06:19:58 +00:00
Add ESLint rules to enforce existing lib style (#621)
Adds a few rules that enforce consistency across the repo. Only change is one top-level const arrow function is now a function definition.
This commit is contained in:
@@ -225,6 +225,10 @@ export default tseslint.config(
|
||||
"antfu/consistent-chaining": "error",
|
||||
"antfu/consistent-list-newline": "error",
|
||||
"antfu/curly": "error",
|
||||
"antfu/import-dedupe": "error",
|
||||
"antfu/no-import-dist": "error",
|
||||
"antfu/no-ts-export-equal": "error",
|
||||
"antfu/top-level-function": "error",
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -13,6 +13,6 @@ export function toClass<P, C>(cls: new (plain: P) => C, obj: P | C): C {
|
||||
/**
|
||||
* Checks if an object is an instance of {@link IColorable}.
|
||||
*/
|
||||
export const isColorable = (obj: unknown): obj is IColorable => {
|
||||
export function isColorable(obj: unknown): obj is IColorable {
|
||||
return typeof obj === "object" && obj !== null && "setColorOption" in obj && "getColorOption" in obj
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user