Skip to content

Commit

Permalink
Upgrade eslint
Browse files Browse the repository at this point in the history
- fix errors
- add eslint-plugin-import to .flowconfig ignore
  • Loading branch information
gilbarbara committed Jun 17, 2022
1 parent 18b69fd commit 151ab7e
Show file tree
Hide file tree
Showing 9 changed files with 920 additions and 886 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Expand Up @@ -5,7 +5,7 @@
"plugin:prettier/recommended",
"prettier"
],
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"env": {
"browser": true,
"jest": true
Expand Down
1 change: 1 addition & 0 deletions .flowconfig
@@ -1,4 +1,5 @@
[ignore]
<PROJECT_ROOT>/node_modules/eslint-plugin-import/.*
[include]
[libs]
./defs
Expand Down
1,771 changes: 901 additions & 870 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Expand Up @@ -45,6 +45,7 @@
},
"devDependencies": {
"@babel/core": "^7.18.5",
"@babel/eslint-parser": "^7.18.2",
"@babel/plugin-proposal-class-properties": "^7.17.12",
"@babel/plugin-proposal-decorators": "^7.18.2",
"@babel/plugin-proposal-do-expressions": "^7.16.7",
Expand All @@ -69,7 +70,6 @@
"@types/react": "^17.0.47",
"@types/react-dom": "^17.0.11",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^28.1.1",
"babel-plugin-array-includes": "^2.0.3",
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
Expand All @@ -80,16 +80,16 @@
"dtslint": "^4.2.1",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint": "^8.18.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-flowtype": "^6.1.0",
"eslint-plugin-import": "^2.25.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.6.0",
"flow-bin": "^0.110.1",
"husky": "^8.0.1",
"is-ci-cli": "^2.2.0",
Expand Down
6 changes: 3 additions & 3 deletions src/components/Spotlight.js
@@ -1,9 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';

const JoyrideSpotlight = ({ styles }) => (
<div key="JoyrideSpotlight" className="react-joyride__spotlight" style={styles} />
);
function JoyrideSpotlight({ styles }) {
return <div key="JoyrideSpotlight" className="react-joyride__spotlight" style={styles} />;
}

JoyrideSpotlight.propTypes = {
styles: PropTypes.object.isRequired,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Tooltip/CloseBtn.js
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';

const JoyrideTooltipCloseBtn = ({ styles, ...props }) => {
function JoyrideTooltipCloseBtn({ styles, ...props }) {
const { color, height, width, ...style } = styles;

return (
Expand All @@ -23,7 +23,7 @@ const JoyrideTooltipCloseBtn = ({ styles, ...props }) => {
</svg>
</button>
);
};
}

JoyrideTooltipCloseBtn.propTypes = {
styles: PropTypes.object.isRequired,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/dom.js
Expand Up @@ -299,7 +299,7 @@ export function getScrollTo(element: HTMLElement, offset: number, skipFix: boole
export function scrollTo(
value: number,
element: HTMLElement = scrollDoc(),
scrollDuration: number,
scrollDuration: number = 300,
): Promise<*> {
return new Promise((resolve, reject) => {
const { scrollTop } = element;
Expand Down
1 change: 1 addition & 0 deletions test/.eslintrc
Expand Up @@ -6,6 +6,7 @@
},
"rules": {
"no-console": "off",
"no-constructor-return": "off",
"prefer-destructuring": "off",
"jsx-a11y/anchor-has-content": "off",
"jsx-a11y/anchor-is-valid": "off",
Expand Down
1 change: 1 addition & 0 deletions test/modules/helpers.spec.js
@@ -1,3 +1,4 @@
/* eslint-disable react/function-component-definition */
import React from 'react';
import {
getBrowser,
Expand Down

0 comments on commit 151ab7e

Please sign in to comment.