chore: Enhanced hints for unused variables (#55113)

* chore: Enhanced hints for unused variables

* rm unused rules

* fix
This commit is contained in:
thinkasany
2025-09-21 19:13:18 +08:00
committed by GitHub
parent b138cadf40
commit 625e034a32
4 changed files with 6 additions and 15 deletions

View File

@@ -40,7 +40,6 @@
"linter": {
"rules": {
"style": {
"useNumberNamespace": "off",
"useNodejsImportProtocol": "off",
"noNonNullAssertion": "off"
},
@@ -51,9 +50,7 @@
},
"correctness": {
"useUniqueElementIds": "off",
"useExhaustiveDependencies": "off",
"noUnusedFunctionParameters": "off",
"noUnusedVariables": "off"
"useExhaustiveDependencies": "off"
},
"suspicious": {
"noTsIgnore": "off",
@@ -90,11 +87,7 @@
"includes": ["**/*.test.ts", "**/*.test.tsx", "tests/**/*", "scripts/**/*", ".dumi/**/*"],
"linter": {
"rules": {
"style": {
"noParameterAssign": "off"
},
"suspicious": {
"noThenProperty": "off",
"noImplicitAnyLet": "off"
},
"complexity": {
@@ -102,8 +95,7 @@
},
"a11y": {
"useValidAnchor": "off",
"useAnchorContent": "off",
"useKeyWithClickEvents": "off"
"useAnchorContent": "off"
}
}
}
@@ -117,8 +109,7 @@
},
"a11y": {
"useValidAnchor": "off",
"useAnchorContent": "off",
"useKeyWithClickEvents": "off"
"useAnchorContent": "off"
}
}
}

View File

@@ -90,7 +90,7 @@ const FormItemInput: React.FC<FormItemInputProps & FormItemInputMiscProps> = (pr
// Pass to sub FormItem should not with col info
const subFormContext = React.useMemo(() => {
const { labelCol, wrapperCol, ...rest } = formContext;
const { labelCol: _labelCol, wrapperCol: _wrapperCol, ...rest } = formContext;
return rest;
}, [formContext]);

View File

@@ -153,7 +153,7 @@ const InternalTooltip = React.forwardRef<TooltipRef, TooltipProps>((props, ref)
builtinPlacements,
arrowPointAtCenter = false,
autoAdjustOverflow = true,
motion,
motion: _motion,
getPopupContainer,
placement = 'top',
mouseEnterDelay = 0.1,

View File

@@ -1,5 +1,5 @@
function pascalCase(name) {
return name.charAt(0).toUpperCase() + name.slice(1).replace(/-(\w)/g, (m, n) => n.toUpperCase());
return name.charAt(0).toUpperCase() + name.slice(1).replace(/-(\w)/g, (_m, n) => n.toUpperCase());
}
// Just import style for https://github.com/ant-design/ant-design/issues/3745