Open GMartigny opened 5 years ago
⚠️ An esLint plugin could help Pencil.js users to write better code and discover hidden feature of the library.
Possible rules:
new Square([10, 20])
Math
Image
import { Math as PMath } from "pencil.js";
comp.on(constant, func)
.clone
const pos = previous.clone().add(10)
isTargeted
comp.on("draw", func, true)
.add
comp.add(child1, child2, child3)
⚠️ An esLint plugin could help Pencil.js users to write better code and discover hidden feature of the library.
Possible rules:
new Square([10, 20])
Math
orImage
without renaming (will override existing globals) -import { Math as PMath } from "pencil.js";
comp.on(constant, func)
.clone
for position, vector and color -const pos = previous.clone().add(10)
isTargeted
when listening to draw event -comp.on("draw", func, true)
.add
function multiple time -comp.add(child1, child2, child3)