chore(striker-ui): turn off eslint react/jsx-props-no-spreading

main
Tsu-ba-me 3 years ago
parent ab4f5bdfe5
commit 70f06e47e5
  1. 1
      striker-ui/.eslintrc.json
  2. 8
      striker-ui/components/AnvilDrawer.tsx
  3. 4
      striker-ui/components/Autocomplete.tsx
  4. 1
      striker-ui/components/ContainedButton.tsx
  5. 1
      striker-ui/components/Header.tsx
  6. 1
      striker-ui/components/InputMessageBox.tsx
  7. 1
      striker-ui/components/MenuItem.tsx
  8. 1
      striker-ui/components/MessageBox.tsx
  9. 1
      striker-ui/components/OutlinedInput/OutlinedInput.tsx
  10. 1
      striker-ui/components/OutlinedInputLabel/OutlinedInputLabel.tsx
  11. 4
      striker-ui/components/OutlinedInputWithLabel.tsx
  12. 3
      striker-ui/components/OutlinedLabeledInputWithSelect.tsx
  13. 1
      striker-ui/components/ProvisionServerDialog.tsx
  14. 1
      striker-ui/components/Select.tsx
  15. 3
      striker-ui/components/SelectWithLabel.tsx
  16. 3
      striker-ui/components/Slider.tsx
  17. 5
      striker-ui/pages/_app.tsx
  18. 8
      striker-ui/pages/_document.tsx

@ -54,6 +54,7 @@
// Importing React is not required in Next.js
"react/react-in-jsx-scope": "off",
"react/jsx-curly-newline": "off",
"react/jsx-props-no-spreading": "off",
"@next/next/no-img-element": "off",
"@typescript-eslint/camelcase": "off"
},

@ -82,13 +82,7 @@ const AnvilDrawer = ({ open, setOpen }: DrawerProps): JSX.Element => (
>
<Box display="flex" flexDirection="row" width="100%">
<Box>
<img
alt=""
key="icon"
src={icon.image}
// eslint-disable-next-line react/jsx-props-no-spreading
{...ICON_SIZE}
/>
<img alt="" key="icon" src={icon.image} {...ICON_SIZE} />
</Box>
<Box flexGrow={1} className={classes.text}>
<BodyText text={icon.text} />

@ -45,7 +45,6 @@ type AutocompleteProps<
const GrowPaper = (paperProps: MUIPaperProps): JSX.Element => (
<MUIGrow in>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<MUIPaper {...paperProps} />
</MUIGrow>
);
@ -103,7 +102,6 @@ const Autocomplete = <
extendRenderInput?.call(null, inputWithLabelProps, renderInputParams);
// eslint-disable-next-line react/jsx-props-no-spreading
return <OutlinedInputWithLabel {...inputWithLabelProps} />;
});
const combinedSx = {
@ -122,7 +120,6 @@ const Autocomplete = <
return (
<Box sx={{ display: 'flex', flexDirection: 'column' }}>
<MUIAutocomplete
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
PaperComponent: GrowPaper,
...autocompleteRestProps,
@ -131,7 +128,6 @@ const Autocomplete = <
sx: combinedSx,
}}
/>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<InputMessageBox {...messageBoxProps} />
</Box>
);

@ -25,7 +25,6 @@ const ContainedButton = (
return (
<MUIButton
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
variant: 'contained',
...containedButtonProps,

@ -82,7 +82,6 @@ const Header = (): JSX.Element => {
alt=""
key="icon"
src={icon.image}
// eslint-disable-next-line react/jsx-props-no-spreading
{...ICON_SIZE}
className={classes.icons}
/>

@ -10,7 +10,6 @@ const InputMessageBox: FC<Partial<MessageBoxProps>> = ({
<>
{text && (
<MessageBox
// eslint-disable-next-line react/jsx-props-no-spreading
{...{ ...restProps, sx: { marginTop: '.4em', ...sx }, text }}
/>
)}

@ -38,7 +38,6 @@ const MenuItem = (menuItemProps: MUIMenuItemProps): JSX.Element => {
return (
<MUIMenuItem
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
...menuItemProps,
sx: combinedSx,

@ -111,7 +111,6 @@ const MessageBox: FC<MessageBoxProps> = ({
return isShow ? (
<Box
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
...boxProps,
className: buildMessageBoxClasses(type),

@ -41,7 +41,6 @@ const OutlinedInput: FC<OutlinedInputProps> = (outlinedInputProps) => {
return (
<MUIOutlinedInput
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
label,
...outlinedInputRestProps,

@ -45,7 +45,6 @@ const OutlinedInputLabel = (
return (
<MUIInputLabel
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
// 1. Specify default props.
variant,

@ -39,14 +39,11 @@ const OutlinedInputWithLabel = ({
label,
messageBoxProps = OUTLINED_INPUT_WITH_LABEL_DEFAULT_PROPS.messageBoxProps,
}: OutlinedInputWithLabelProps): JSX.Element => (
// eslint-disable-next-line react/jsx-props-no-spreading
<MUIFormControl {...formControlProps}>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<OutlinedInputLabel {...{ htmlFor: id, ...inputLabelProps }}>
{label}
</OutlinedInputLabel>
<OutlinedInput
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
fullWidth: formControlProps.fullWidth,
id,
@ -54,7 +51,6 @@ const OutlinedInputWithLabel = ({
...inputProps,
}}
/>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<InputMessageBox {...messageBoxProps} />
</MUIFormControl>
);

@ -70,7 +70,6 @@ const OutlinedLabeledInputWithSelect: FC<
}}
>
<OutlinedInputWithLabel
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
id,
label,
@ -78,7 +77,6 @@ const OutlinedLabeledInputWithSelect: FC<
}}
/>
<SelectWithLabel
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
id: `${id}-nested-select`,
selectItems,
@ -86,7 +84,6 @@ const OutlinedLabeledInputWithSelect: FC<
}}
/>
</Box>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<InputMessageBox {...messageBoxProps} />
</Box>
);

@ -388,7 +388,6 @@ const createOutlinedSlider = (
sliderProps?: Partial<SliderProps>,
): JSX.Element => (
<Slider
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
isAllowTextInput: true,
label,

@ -64,7 +64,6 @@ const Select: FC<SelectProps> = (selectProps) => {
return (
<MUISelect
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
endAdornment: clearIndicator,
...muiSelectProps,

@ -63,13 +63,11 @@ const SelectWithLabel: FC<SelectWithLabelProps> = ({
}) => (
<MUIFormControl>
{label && (
// eslint-disable-next-line react/jsx-props-no-spreading
<OutlinedInputLabel {...{ htmlFor: id, ...inputLabelProps }}>
{label}
</OutlinedInputLabel>
)}
<Select
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
id,
input: <OutlinedInput {...{ label }} />,
@ -92,7 +90,6 @@ const SelectWithLabel: FC<SelectWithLabelProps> = ({
</MenuItem>
))}
</Select>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<InputMessageBox {...messageBoxProps} />
</MUIFormControl>
);

@ -133,7 +133,6 @@ const createOutlinedInput = ({
isFocused?: boolean;
}) => (
<OutlinedInput
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
key,
className: isFocused ? muiOutlinedInputClasses.focused : '',
@ -222,7 +221,6 @@ const Slider = ({
}}
>
<OutlinedInputLabel
// eslint-disable-next-line react/jsx-props-no-spreading
{...{
className: isFocused ? muiInputLabelClasses.focused : '',
id: labelId,
@ -288,7 +286,6 @@ const Slider = ({
}),
)}
</Box>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<InputMessageBox {...messageBoxProps} />
</FormControl>
);

@ -20,10 +20,7 @@ const App = ({
}: MyAppProps): JSX.Element => (
<CacheProvider value={emotionCache}>
<ThemeProvider theme={theme}>
<Component
// eslint-disable-next-line react/jsx-props-no-spreading
{...pageProps}
/>
<Component {...pageProps} />
</ThemeProvider>
</CacheProvider>
);

@ -19,13 +19,7 @@ class MyDocument extends Document {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
enhanceApp: (App: any) =>
function EnhanceApp(props) {
return (
<App
emotionCache={emotionCache}
/* eslint-disable react/jsx-props-no-spreading */
{...props}
/>
);
return <App emotionCache={emotionCache} {...props} />;
},
});

Loading…
Cancel
Save