diff --git a/.eslintrc b/.eslintrc index 5961c32bbb93afd7657573ba9158e340c63220df..d5780077d5100af807109d544c45bb0c65b1a29e 100644 --- a/.eslintrc +++ b/.eslintrc @@ -25,6 +25,8 @@ "parser": "@babel/eslint-parser", "rules": { + "max-len": "off", + "react/forbid-foreign-prop-types": 2, // For babel-plugin-transform-react-remove-prop-types "jsx-a11y/click-events-have-key-events": 1, // TODO: enable @@ -53,6 +55,7 @@ "indent": [2, 2, { "MemberExpression": "off", }], + "react/function-component-definition": "off", }, }, ], diff --git a/package.json b/package.json index 530d17ef0ce3517742ce6801d29ed484eac593f5..1d6f8a97ccdf9f0f39206a1699ae577dfdaaca18 100644 --- a/package.json +++ b/package.json @@ -74,13 +74,13 @@ "cross-env": "^5.2.1", "enzyme": "^3.11.0", "enzyme-adapter-react-helper": "^1.3.9", - "eslint": "^7.18.0", - "eslint-config-airbnb": "^18.2.1", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-react": "^7.22.0", - "eslint-plugin-react-hooks": "^4.2.0", - "eslint-plugin-react-with-styles": "^2.3.0", + "eslint": "^8.7.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-hooks": "^4.3.0", + "eslint-plugin-react-with-styles": "^2.4.0", "git-directory-deploy": "^1.5.1", "imports-loader": "^0.8.0", "in-publish": "^2.0.1", diff --git a/src/components/DayPickerRangeController.jsx b/src/components/DayPickerRangeController.jsx index 881c4e75ea04eabaa70ecf040f9291bb7afd55ba..6b5cb732b19dc5b82222b60f7d7825da9697ca91 100644 --- a/src/components/DayPickerRangeController.jsx +++ b/src/components/DayPickerRangeController.jsx @@ -1023,9 +1023,7 @@ export default class DayPickerRangeController extends React.PureComponent { const { currentMonth, visibleDays } = this.state; const firstPreviousMonth = currentMonth.clone().subtract(numberOfMonths, 'month'); - const newVisibleDays = getVisibleDays( - firstPreviousMonth, numberOfMonths, enableOutsideDays, true, - ); + const newVisibleDays = getVisibleDays(firstPreviousMonth, numberOfMonths, enableOutsideDays, true); this.setState({ currentMonth: firstPreviousMonth.clone(), diff --git a/src/components/DayPickerSingleDateController.jsx b/src/components/DayPickerSingleDateController.jsx index d4fae53608f72ae9e049b1cd186d6ba1219150fc..1bf1a1d7190c2536410b0895d2467c5d33107272 100644 --- a/src/components/DayPickerSingleDateController.jsx +++ b/src/components/DayPickerSingleDateController.jsx @@ -529,9 +529,7 @@ export default class DayPickerSingleDateController extends React.PureComponent { const { currentMonth, visibleDays } = this.state; const firstPreviousMonth = currentMonth.clone().subtract(numberOfMonths, 'month'); - const newVisibleDays = getVisibleDays( - firstPreviousMonth, numberOfMonths, enableOutsideDays, true, - ); + const newVisibleDays = getVisibleDays(firstPreviousMonth, numberOfMonths, enableOutsideDays, true); this.setState({ currentMonth: firstPreviousMonth.clone(),