javascript-conventions
Installation
SKILL.md
JavaScript Conventions
Why these rules exist
OUDS Web uses a strict ESLint config (xo + unicorn) enforced in CI. All 15 JS components share the same conventions. JavaScript is 100% shared across brands — only CSS differs.
Style rules (ESLint-enforced)
| Rule | Example |
|---|---|
| No semicolons | const x = 1 (not const x = 1;) |
| No trailing commas | { a: 1, b: 2 } (not { a: 1, b: 2, }) |
| Template literals | `Hello, ${name}` (not "Hello, " + name) |
.js extension on imports |
import Foo from './foo.js' |
No console.* in js/src/ |
Use event dispatching or throw |
| Strict mode | 'use strict' at top of every module |
| 2-space indent | Consistent with SCSS/HTML |