Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
paths: - "web//*.{js,cjs,mjs,ts,cts,mts}" - "web//*.hbs"
Frontend Code
- JavaScript/TypeScript code must use
constorlet, nevervar. - Avoid lodash in favor of modern ECMAScript primitives where available, keeping in mind our browserlist.
- Don't use
onclickattributes 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.