You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
// BAD - `const` outside of a method should be ALL_CAPS
105
+
const defaultName = 'Element'
106
+
107
+
// BAD - Not a constructor function and so should be camelCase
108
+
const AddToCart = () => { console.log('Adding to cart') }
109
+
110
+
// GOOD - local constants within class or function
111
+
class MyClass {
112
+
const name = 'Button'
113
+
render() {
114
+
const button = <Button name={name} />
115
+
}
116
+
}
117
+
```
118
+
54
119
## Overriding Lint Rules
55
120
56
121
Some of the lint rules disallow uncommon but valid behaviour that is easily confused with/typoed from much more common behaviour. If you need to use the disallowed behaviour on purpose, use an explicit lint override in the source.
0 commit comments