Skip to content

Commit

Permalink
Enabled valid-typeof lint rule and fixed lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-a-smith committed Jan 16, 2019
1 parent a6f14fa commit ddd9edd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,5 @@ rules:
strict: [2, 'global']
use-isnan: 2
#valid-jsdoc: [2, { prefer: { 'return': 'returns'}}]
#valid-typeof: 2
valid-typeof: 2
wrap-iife: [2, 'any']
7 changes: 1 addition & 6 deletions src/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ export class DatePicker extends Component {
secondDateYear;
} else {
//Checks if the type of date doesn't match those types and that it doesn't contain any special character symbols
if (
(typeof date !== 'array' ||
typeof date !== 'date' ||
typeof date !== 'object') &&
date.toString().search(regex) !== 1
) {
if (date.toString().search(regex) !== 1) {
return '';
} else {
let month = date[0].getMonth();
Expand Down

0 comments on commit ddd9edd

Please sign in to comment.