Skip to content

Commit 2c249cd

Browse files
committed
File naming convention
1 parent 56cb3f4 commit 2c249cd

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

Readme.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -264,35 +264,28 @@ In HTML and CSS, use kebab case for class names and camel case for IDs. For exa
264264

265265
### Filenames
266266

267-
Newer JS, JSX, TS, TSX and SCSS filenames are Pascal case (camel case with the first character also being capitalized). For example:
267+
JS, JSX, TS, TSX and SCSS filenames are snake case. For example:
268268

269269
```
270-
BlackListChecker.js
271-
SearchBar.tsx
272-
SearchBar.module.scss
270+
black_list_checker.js
271+
search_bar.tsx
272+
search_bar.module.scss
273273
```
274274

275-
In the past, we used snake case for file names, so older files are often snake case (and you should consider converting them as you update them):
275+
HTML and all other files are snake case. For example:
276276
```
277-
snapshot_helper.js
278-
some_thing.jsx
279-
_bootstrap_overrides.scss
277+
canned_reports.html
278+
deploy_environment.template
280279
```
281280

282-
HTML and all other files are camel case. For example:
283-
```
284-
cannedReports.html
285-
deployEnvironment.template
286-
```
287-
288-
If it’s a Lambda function, name it `*Handler.js`.
281+
If it’s a Lambda function, name it `*_handler.js`.
289282
Otherwise name it after an appropriate design pattern. For example:
290283
```
291-
SomethingFactory.js
292-
ThisOtherFacade.js
284+
something_factory.js
285+
this_other_facade.js
293286
```
294287

295-
Directories are snake case (ex. `webapp/controlMethods`)
288+
Directories are camel case (ex. `webapp/controlMethods`)
296289

297290

298291
## Variables

0 commit comments

Comments
 (0)