Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

777 B
Raw Blame

paths: - "web//*.{js,cjs,mjs,ts,cts,mts}" - "web//*.hbs"

Frontend Code

  • JavaScript/TypeScript code must use const or let, never var.
  • Avoid lodash in favor of modern ECMAScript primitives where available, keeping in mind our browserlist.
  • Don't use onclick attributes in HTML; use event delegation
  • Don't access DOM APIs (document.documentElement.style, $() selectors for specific elements) without guarding for node test environments, where the DOM is mocked minimally. Check that the element exists before using it.
  • Use util.the($el) instead of $el[0]! when a jQuery object should hold exactly one element.
  • Use class or ID selectors, not bare tag selectors or attribute selectors. If no suitable class exists, add one.