diff --git a/packages/.eslintrc b/packages/.eslintrc index 9e971f60cda..471c9a89a3e 100644 --- a/packages/.eslintrc +++ b/packages/.eslintrc @@ -3,7 +3,7 @@ "extends": [ "plugin:react/recommended", "plugin:@typescript-eslint/recommended", - "prettier/@typescript-eslint", + "prettier/@typescript-eslint" ], "env": { "browser": true, @@ -11,12 +11,7 @@ "jest": true, "commonjs": true }, - "plugins": [ - "@typescript-eslint", - "react", - "react-hooks", - "prettier" - ], + "plugins": ["@typescript-eslint", "react", "react-hooks", "prettier"], "parserOptions": { "project": "./tsconfig.json", "sourceType": "module", @@ -27,7 +22,7 @@ }, "settings": { "react": { - "version": "detect", + "version": "detect" } }, "rules": { @@ -50,15 +45,12 @@ "@typescript-eslint/array-type": 0, "@typescript-eslint/no-object-literal-type-assertion": 0, "@typescript-eslint/no-use-before-define": 0, + "@typescript-eslint/no-unused-vars": 2, "no-console": [ "error", { - "allow": [ - "warn", - "error", - "info" - ] + "allow": ["warn", "error", "info"] } ] } -} \ No newline at end of file +} diff --git a/packages/next/src/fields/table.tsx b/packages/next/src/fields/table.tsx index 367e6b2c00e..ef9016ff707 100644 --- a/packages/next/src/fields/table.tsx +++ b/packages/next/src/fields/table.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, useRef } from 'react' +import React, { forwardRef } from 'react' import { registerFormField, ISchemaFieldComponentProps, @@ -12,11 +12,9 @@ import { Table, Form, Icon } from '@alifd/next' import styled from 'styled-components' import { CompatNextFormItemProps } from '../compat/FormItem' import cls from 'classnames' -import { - IDragableRowProps, - IDragableTableProps, - IDragHandlerCellProps -} from '../types' +import { IDragableRowProps, IDragHandlerCellProps } from '../types' + +const SelectionRow = (Table as any).SelectionRow const ArrayComponents = { Wrapper: Table, @@ -76,9 +74,9 @@ const DragableRow = forwardRef( const [firstCol, ...otherCols] = columns return ( -