From eb98cd4c05736a1549b45a1aee04b26b7baf2058 Mon Sep 17 00:00:00 2001 From: zombiej Date: Fri, 25 Dec 2020 11:50:25 +0800 Subject: [PATCH] chore: fix lint --- .eslintrc.js | 5 +---- examples/extra.tsx | 1 - examples/mix.tsx | 1 - examples/overflow.tsx | 1 - examples/position.tsx | 1 - package.json | 4 ++-- src/TabNavList/OperationNode.tsx | 2 +- src/TabNavList/index.tsx | 1 - tsconfig.json | 16 ++++++++++++++++ 9 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 tsconfig.json diff --git a/.eslintrc.js b/.eslintrc.js index b6fd6765..e8d77a26 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,9 +1,6 @@ -const base = require('@umijs/fabric/dist/eslint'); - module.exports = { - ...base, + extends: [require.resolve('@umijs/fabric/dist/eslint')], rules: { - ...base.rules, 'default-case': 0, 'react/sort-comp': 0, 'react/no-array-index-key': 0, diff --git a/examples/extra.tsx b/examples/extra.tsx index 992e610a..46cbee6a 100644 --- a/examples/extra.tsx +++ b/examples/extra.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control */ import React from 'react'; import Tabs, { TabPane } from '../src'; import '../assets/index.less'; diff --git a/examples/mix.tsx b/examples/mix.tsx index ead650f5..cc05f03b 100644 --- a/examples/mix.tsx +++ b/examples/mix.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control */ import React from 'react'; import Tabs, { TabPane } from '../src'; import '../assets/index.less'; diff --git a/examples/overflow.tsx b/examples/overflow.tsx index 815a9ad7..5b76332e 100644 --- a/examples/overflow.tsx +++ b/examples/overflow.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control */ import React from 'react'; import Tabs, { TabPane } from '../src'; import '../assets/index.less'; diff --git a/examples/position.tsx b/examples/position.tsx index fa7f6381..fb6392ab 100644 --- a/examples/position.tsx +++ b/examples/position.tsx @@ -1,4 +1,3 @@ -/* eslint-disable jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control */ import React from 'react'; import Tabs, { TabPane } from '../src'; import '../assets/index.less'; diff --git a/package.json b/package.json index 9dade653..1f6bbd00 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/jest": "^25.2.3", "@types/react": "^16.9.35", "@types/react-dom": "^16.9.8", - "@umijs/fabric": "^2.0.4", + "@umijs/fabric": "^2.3.1", "coveralls": "^3.0.6", "cross-env": "^7.0.2", "enzyme": "^3.7.0", @@ -68,7 +68,7 @@ "react-sticky": "^6.0.3", "react-test-renderer": "^16.0.0", "sortablejs": "^1.7.0", - "typescript": "^3.9.2" + "typescript": "^4.0.0" }, "dependencies": { "@babel/runtime": "^7.11.2", diff --git a/src/TabNavList/OperationNode.tsx b/src/TabNavList/OperationNode.tsx index 857ad944..37f6e8cb 100644 --- a/src/TabNavList/OperationNode.tsx +++ b/src/TabNavList/OperationNode.tsx @@ -150,7 +150,7 @@ function OperationNode( const overlayClassName = classNames({ [`${dropdownPrefix}-rtl`]: rtl - }) + }); const moreNode: React.ReactElement = mobile ? null : ( ) { pingBottom = -transformTop + wrapperHeight < wrapperScrollHeight; } - /* eslint-disable jsx-a11y/interactive-supports-focus */ return (