Skip to content

Commit 9bb5c91

Browse files
committed
chore: add clang-format
1 parent 05fc187 commit 9bb5c91

9 files changed

Lines changed: 306 additions & 176 deletions

Brewfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# React Native Multi-Instance Development Environment
2+
# Install with: brew bundle
3+
4+
# Core development tools
5+
brew "clang-format"
6+
brew "ccache"
7+
8+
# Additional useful tools for React Native development
9+
brew "node"
10+
brew "watchman"
11+
brew "git"
12+
brew "git-lfs"
13+
14+
# Optional but helpful tools
15+
# brew "llvm" # Full LLVM toolchain (includes clang-format)
16+
# brew "cmake" # For building native modules
17+
# brew "ninja" # Fast build system
18+
# brew "pkg-config" # Package configuration tool
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Config from RN repo https://github.com/facebook/react-native/blob/main/.clang-format
2+
3+
---
4+
AccessModifierOffset: -1
5+
AlignAfterOpenBracket: AlwaysBreak
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlinesLeft: true
9+
AlignOperands: false
10+
AlignTrailingComments: false
11+
AllowAllParametersOfDeclarationOnNextLine: false
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: Empty
15+
AllowShortIfStatementsOnASingleLine: false
16+
AllowShortLoopsOnASingleLine: false
17+
AlwaysBreakAfterReturnType: None
18+
AlwaysBreakBeforeMultilineStrings: true
19+
AlwaysBreakTemplateDeclarations: true
20+
BinPackArguments: false
21+
BinPackParameters: false
22+
BraceWrapping:
23+
AfterClass: false
24+
AfterControlStatement: false
25+
AfterEnum: false
26+
AfterFunction: false
27+
AfterNamespace: false
28+
AfterObjCDeclaration: false
29+
AfterStruct: false
30+
AfterUnion: false
31+
BeforeCatch: false
32+
BeforeElse: false
33+
IndentBraces: false
34+
BreakBeforeBinaryOperators: None
35+
BreakBeforeBraces: Attach
36+
BreakBeforeTernaryOperators: true
37+
BreakConstructorInitializersBeforeComma: false
38+
BreakAfterJavaFieldAnnotations: false
39+
BreakStringLiterals: false
40+
ColumnLimit: 80
41+
CommentPragmas: '^ IWYU pragma:'
42+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
43+
ConstructorInitializerIndentWidth: 4
44+
ContinuationIndentWidth: 4
45+
Cpp11BracedListStyle: true
46+
DerivePointerAlignment: false
47+
DisableFormat: false
48+
ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ]
49+
IncludeCategories:
50+
- Regex: '^<.*\.h(pp)?>'
51+
Priority: 1
52+
- Regex: '^<.*'
53+
Priority: 2
54+
- Regex: '.*'
55+
Priority: 3
56+
IndentCaseLabels: true
57+
IndentWidth: 2
58+
IndentWrappedFunctionNames: false
59+
KeepEmptyLinesAtTheStartOfBlocks: false
60+
MacroBlockBegin: ''
61+
MacroBlockEnd: ''
62+
MaxEmptyLinesToKeep: 1
63+
NamespaceIndentation: None
64+
ObjCBlockIndentWidth: 2
65+
ObjCSpaceAfterProperty: true
66+
ObjCSpaceBeforeProtocolList: true
67+
PenaltyBreakBeforeFirstCallParameter: 1
68+
PenaltyBreakComment: 300
69+
PenaltyBreakFirstLessLess: 120
70+
PenaltyBreakString: 1000
71+
PenaltyExcessCharacter: 1000000
72+
PenaltyReturnTypeOnItsOwnLine: 200
73+
PointerAlignment: Left
74+
ReflowComments: true
75+
SortIncludes: true
76+
SpaceAfterCStyleCast: false
77+
SpaceBeforeAssignmentOperators: true
78+
SpaceBeforeParens: ControlStatements
79+
SpaceInEmptyParentheses: false
80+
SpacesBeforeTrailingComments: 1
81+
SpacesInAngles: false
82+
SpacesInContainerLiterals: true
83+
SpacesInCStyleCastParentheses: false
84+
SpacesInParentheses: false
85+
SpacesInSquareBrackets: false
86+
Standard: Cpp11
87+
TabWidth: 8
88+
UseTab: Never
89+
QualifierAlignment: Left
90+
---
91+
Language: ObjC
92+
ColumnLimit: 120
93+
BreakBeforeBraces: WebKit
94+
PointerAlignment: Right
95+
...

0 commit comments

Comments
 (0)