Skip to content

Commit

Permalink
Fix prettier rule on trailing commnas
Browse files Browse the repository at this point in the history
  • Loading branch information
baires committed Jun 24, 2020
1 parent af9ea5f commit d171747
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"trailingComma": "es5",
"trailingComma": "none",
"semi": false,
"singleQuote": true
}
4 changes: 2 additions & 2 deletions component/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class Widget extends React.Component {

this.state = {
timezone: this.props.now.timezone,
reason: getRandom(this.getReasons()),
reason: getRandom(this.getReasons())
}
}

Expand All @@ -23,7 +23,7 @@ export default class Widget extends React.Component {
if (nextProps.now.timezone !== this.state.timezone) {
this.setState({
timezone: nextProps.now.timezone,
reason: getRandom(this.getReasons()),
reason: getRandom(this.getReasons())
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion helpers/constans.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
REASONS_TO_NOT_DEPLOY,
REASONS_FOR_FRIDAY_AFTERNOON,
REASONS_FOR_AFTERNOON,
REASONS_FOR_WEEKEND,
REASONS_FOR_WEEKEND
} from './reasons'

export const getRandom = function ranDay(list) {
Expand Down
8 changes: 4 additions & 4 deletions helpers/reasons.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const REASONS_TO_NOT_DEPLOY = [
'¯\\_(ツ)_/¯',
'😹',
'No',
'No. Breathe and count to 10, start again',
'No. Breathe and count to 10, start again'
]

export const REASONS_FOR_FRIDAY_AFTERNOON = [
Expand All @@ -41,7 +41,7 @@ export const REASONS_FOR_FRIDAY_AFTERNOON = [
'No no no no no no no!',
'Keep dreaming darling',
'Why why Bro why?',
'But but but... why?',
'But but but... why?'
]

export const REASONS_FOR_AFTERNOON = [
Expand All @@ -53,7 +53,7 @@ export const REASONS_FOR_AFTERNOON = [
'Tell your boss that you found a bug and go home',
'You have full day ahead of you tomorrow!',
"Trust me, (s)he will be much happier if it wasn't broken for a night",
'How much do you trust your logging tools?',
'How much do you trust your logging tools?'
]

export const REASONS_FOR_WEEKEND = [
Expand All @@ -62,5 +62,5 @@ export const REASONS_FOR_WEEKEND = [
'Beer?',
'Drunk development is not a good idea!',
'I see you deployed on Friday',
'Told you that Monday would be a better idea!',
'Told you that Monday would be a better idea!'
]
6 changes: 3 additions & 3 deletions pages/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export default (req, res) => {
error: {
message: `Timezone \`${timezone}\` does not exist`,
type: 'Bad Request',
code: 400,
},
code: 400
}
})
}
let time = new Time(timezone)

res.status(200).json({
timezone: timezone,
shouldideploy: !time.isFriday(),
message: getRandom(dayHelper(time)),
message: getRandom(dayHelper(time))
})
}
6 changes: 3 additions & 3 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class Page extends React.Component {
}
this.state = {
timezone: timezoneError ? 'UTC' : this.props.timezone,
now: new Time(timezoneError ? 'UTC' : this.props.timezone),
now: new Time(timezoneError ? 'UTC' : this.props.timezone)
}
}

static async getInitialProps(request) {
let timezone = request.query.tz || 'UTC'

return {
timezone: timezone,
timezone: timezone
}
}

Expand All @@ -39,7 +39,7 @@ class Page extends React.Component {
Router.push(newUrl.pathname + newUrl.search)
this.setState({
timezone: timezone,
now: new Time(timezone),
now: new Time(timezone)
})
}

Expand Down

0 comments on commit d171747

Please sign in to comment.