Skip to content

Commit de0f379

Browse files
committed
Updated linting dependencies. 3.9.0 release.
1 parent 1cc0cbc commit de0f379

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"picker"
1212
],
1313
"main": "lib/index.js",
14-
"version": "3.7.0",
14+
"version": "3.9.0",
1515
"description": "React-Bootstrap based date picker.",
1616
"directories": {
1717
"test": "test"
@@ -24,17 +24,18 @@
2424
"assert": "*",
2525
"babel": "^6.1.18",
2626
"babel-cli": "^6.7.5",
27+
"babel-eslint": "^7.1.1",
2728
"babel-loader": "^6.2.0",
29+
"babel-plugin-add-module-exports": "^0.1.2",
2830
"babel-preset-es2015": "*",
2931
"babel-preset-react": "*",
3032
"babel-preset-stage-1": "*",
31-
"babel-plugin-add-module-exports": "^0.1.2",
3233
"co": "*",
3334
"envify": "*",
3435
"es6-promise": "*",
35-
"eslint": "3.7.1",
36+
"eslint": "^3.7.1",
3637
"eslint-loader": "1.5.0",
37-
"eslint-plugin-react": "6.4.1",
38+
"eslint-plugin-react": "^6.7.1",
3839
"expose-loader": "*",
3940
"isparta-loader": "*",
4041
"karma": "*",
@@ -63,7 +64,7 @@
6364
"gh-pages": "./node_modules/webpack/bin/webpack.js --content-base example/ --config ./example/webpack.example.config.js; cp ./example/index.html /tmp/index.html; cp ./example/bundle.js /tmp/bundle.js; git checkout gh-pages; cp /tmp/index.html ./index.html; cp /tmp/bundle.js ./bundle.js; chmod -x .git/hooks/pre-commit .git/hooks/post-commit; git commit -a -m 'Automatic Example Update'; git push origin gh-pages; chmod +x .git/hooks/pre-commit .git/hooks/post-commit; git checkout master;",
6465
"test": "./node_modules/karma/bin/karma start test/karma.conf.js",
6566
"build": "doctoc . --github --title '<h1>Table of Contents</h1>'; ./node_modules/babel-cli/bin/babel.js ./src --plugins add-module-exports --out-dir ./lib;",
66-
"lint": "eslint ./src/**"
67+
"lint": "./node_modules/.bin/eslint --fix ./src/**"
6768
},
6869
"repository": {
6970
"type": "git",

src/index.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ export default React.createClass({
212212
cellPadding: '5px',
213213
dayLabels: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
214214
monthLabels: ['January', 'February', 'March', 'April',
215-
'May', 'June', 'July', 'August', 'September',
216-
'October', 'November', 'December'],
215+
'May', 'June', 'July', 'August', 'September',
216+
'October', 'November', 'December'],
217217
clearButtonElement: '×',
218218
previousButtonElement: '<',
219219
nextButtonElement: '>',
@@ -228,12 +228,12 @@ export default React.createClass({
228228
},
229229

230230
getInitialState() {
231-
if(this.props.value && this.props.defaultValue) {
232-
throw new Error("Conflicting DatePicker properties 'value' and 'defaultValue'");
231+
if (this.props.value && this.props.defaultValue) {
232+
throw new Error('Conflicting DatePicker properties \'value\' and \'defaultValue\'');
233233
}
234-
var state = this.makeDateValues(this.props.value || this.props.defaultValue);
235-
if(this.props.weekStartsOnMonday) {
236-
state.dayLabels = this.props.dayLabels.slice(1).concat(this.props.dayLabels.slice(0,1))
234+
const state = this.makeDateValues(this.props.value || this.props.defaultValue);
235+
if (this.props.weekStartsOnMonday) {
236+
state.dayLabels = this.props.dayLabels.slice(1).concat(this.props.dayLabels.slice(0,1));
237237
} else {
238238
state.dayLabels = this.props.dayLabels;
239239
}
@@ -270,7 +270,7 @@ export default React.createClass({
270270
this.setState(this.makeDateValues(null));
271271
}
272272

273-
if(this.props.onChange) {
273+
if (this.props.onChange) {
274274
this.props.onChange(null, null);
275275
}
276276
},
@@ -436,7 +436,7 @@ export default React.createClass({
436436
value: selectedDate.toISOString()
437437
});
438438

439-
if(this.props.onChange) {
439+
if (this.props.onChange) {
440440
this.props.onChange(selectedDate.toISOString(), inputValue);
441441
}
442442
}
@@ -469,7 +469,7 @@ export default React.createClass({
469469
this.props.onBlur(event);
470470
}
471471

472-
if(this.props.onChange) {
472+
if (this.props.onChange) {
473473
this.props.onChange(newSelectedDate.toISOString(), inputValue);
474474
}
475475
},

0 commit comments

Comments
 (0)