Skip to content

Commit

Permalink
Add no-shadow eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
janpaul123 committed Feb 13, 2018
1 parent 1ad62c2 commit 60a8226
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ module.exports = {
// Per https://stackoverflow.com/a/46809082
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',

'no-shadow': 'error',
},
env: {
browser: true,
Expand Down
4 changes: 2 additions & 2 deletions client/camera/CameraVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ export default class CameraVideo extends React.Component {
key={position}
x={point.x * width}
y={point.y * height}
onChange={point => {
onChange={newPoint => {
const knobPoints = this.props.config.knobPoints.slice();
knobPoints[position] = { x: point.x / width, y: point.y / height };
knobPoints[position] = { x: newPoint.x / width, y: newPoint.y / height };
this.props.onConfigChange({ ...this.props.config, knobPoints });
}}
/>
Expand Down

0 comments on commit 60a8226

Please sign in to comment.