# Layout for the C++ (cpp/) and the JavaScript twin (js/, examples/, tests/), so the two read
# alike: 4-space indentation, 100 columns, Stroustrup braces. For C++ this is C++ Core Guidelines
# NL.17 (K&R-derived layout) and NL.18 (C++-style declarators: int* p, not int *p). Only what
# differs from the base style is listed: spaces (never tabs) and one statement per line come from
# it, plus the AllowShort* lines below.
---
Language: Cpp
BasedOnStyle: LLVM
Standard: c++20
IndentWidth: 4
AccessModifierOffset: -4
ColumnLimit: 100
BreakBeforeBraces: Stroustrup
InsertBraces: true
PointerAlignment: Left
QualifierAlignment: Left
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: Inline
AlwaysBreakTemplateDeclarations: Yes
SeparateDefinitionBlocks: Always
---
Language: JavaScript
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 100
BreakBeforeBraces: Stroustrup
# InsertBraces is C++ only: ESLint's `curly` (scripts/lint/eslint.config.mjs) requires braces on every JavaScript block.
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
