Hello @Bassam,
How did you try telling ESLint to ignore undefined variables: configuration comments or configuration files?
There’s ready to use ESLint configuration files for p5.js out there, maybe that’s a faster way forward than trying to roll your own?