This repository was archived by the owner on Aug 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ read-only (`false`) or read-write (`true`).
5353
5454# # Naming
5555
56- Classes and constructor functions should be TitleCased
56+ Classes and constructor functions should be ` TitleCased`
5757
5858` ` ` javascript
5959// GOOD
@@ -65,7 +65,10 @@ var LinkLabel = function() { }
6565class linkLabel { }
6666` ` `
6767
68- Constant values that appear outside of a method scope should be in ALL_CAPS
68+ Constant values that appear outside of a method scope and truly represent "data"
69+ that is constant (ie. it isn't something that is expected to be mutated during
70+ the app lifecycle), should be in `ALL_CAPS`. This means that things like global
71+ functions would still be `camelCased`. See examples below.
6972
7073` ` ` javascript
7174// GOOD
@@ -88,10 +91,12 @@ class DatePicker {
8891}
8992` ` `
9093
91- All other symbols (methods, variables, constants within a method) should be camelCased!
94+ All other symbols (methods, variables, constants within a method) should be ` camelCased` !
9295
9396` ` ` javascript
9497// GOOD
98+ import {addToCart} from './actions'
99+
95100class MyClass {
96101 const name = 'Button'
97102 render() { ... }
You can’t perform that action at this time.
0 commit comments