mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-10-26 16:45:18 +00:00
modify eslint and webpack config files (#8337)
This commit is contained in:
1 parent
2015a2a266
commit
4e2831ebeb
16 files changed
+5
-24
No files matched your search
@@ -94,7 +94,6 @@ export default tseslint.config(
|
||||
'@typescript-eslint/no-useless-constructor': 'error',
|
||||
'no-var': 'error',
|
||||
'no-void': ['error', { 'allowAsStatement': true }],
|
||||
'no-warning-comments': ['warn', { 'terms': ['hack', 'xxx'] }],
|
||||
'one-var': ['error', 'never'],
|
||||
'prefer-const': ['error', { 'destructuring': 'all' }],
|
||||
'prefer-promise-reject-errors': ['warn', { 'allowEmptyReject': true }],
|
||||
@@ -387,7 +386,6 @@ export default tseslint.config(
|
||||
},
|
||||
rules: {
|
||||
'react/jsx-filename-extension': ['error', { 'extensions': ['.jsx', '.tsx'] }],
|
||||
'react/jsx-no-bind': 'error',
|
||||
'react/jsx-no-useless-fragment': 'error',
|
||||
'react/no-array-index-key': 'error',
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
|
||||
+1
-2
@@ -173,7 +173,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24.0.0",
|
||||
"npm": ">=11.0.0",
|
||||
"yarn": "YARN NO LONGER USED - use npm instead."
|
||||
"npm": ">=11.0.0"
|
||||
}
|
||||
}
|
||||
@@ -221,7 +221,6 @@ export const Component = () => {
|
||||
>
|
||||
<Tooltip title={globalize.translate('Edit')}>
|
||||
<IconButton
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => table.setEditingRow(row)}
|
||||
>
|
||||
<Edit />
|
||||
|
||||
@@ -94,7 +94,6 @@ export const Component = () => {
|
||||
<Tooltip title={globalize.translate('ButtonRevoke')}>
|
||||
<IconButton
|
||||
color='error'
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => row.original?.AccessToken && onRevokeKey(row.original.AccessToken)}
|
||||
>
|
||||
<DeleteIcon />
|
||||
|
||||
@@ -183,21 +183,18 @@ export const Component = () => {
|
||||
>
|
||||
<Chip
|
||||
color={status === PluginStatusOption.All ? 'primary' : undefined}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => setStatus(PluginStatusOption.All)}
|
||||
label={globalize.translate('All')}
|
||||
/>
|
||||
|
||||
<Chip
|
||||
color={status === PluginStatusOption.Available ? 'primary' : undefined}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => setStatus(PluginStatusOption.Available)}
|
||||
label={globalize.translate('LabelAvailable')}
|
||||
/>
|
||||
|
||||
<Chip
|
||||
color={status === PluginStatusOption.Installed ? 'primary' : undefined}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => setStatus(PluginStatusOption.Installed)}
|
||||
label={globalize.translate('LabelInstalled')}
|
||||
/>
|
||||
@@ -206,7 +203,6 @@ export const Component = () => {
|
||||
|
||||
<Chip
|
||||
color={!category ? 'primary' : undefined}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => setCategory('')}
|
||||
label={globalize.translate('All')}
|
||||
/>
|
||||
@@ -215,7 +211,6 @@ export const Component = () => {
|
||||
<Chip
|
||||
key={c}
|
||||
color={category === c.toLowerCase() ? 'primary' : undefined}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => setCategory(c.toLowerCase())}
|
||||
label={globalize.translate(CATEGORY_LABELS[c as PluginCategory])}
|
||||
/>
|
||||
|
||||
@@ -126,7 +126,6 @@ export const Component = () => {
|
||||
<Tooltip disableInteractive title={globalize.translate('ButtonRemove')}>
|
||||
<IconButton
|
||||
color='error'
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => onDeleteTrigger(row.original)}
|
||||
>
|
||||
<RemoveCircleIcon />
|
||||
|
||||
@@ -69,7 +69,6 @@ const RemotePlayButton = () => {
|
||||
aria-haspopup='true'
|
||||
onClick={onRemotePlayActiveButtonClick}
|
||||
color='inherit'
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
sx={(theme) => ({
|
||||
color: theme.vars.palette.primary.main
|
||||
})}
|
||||
|
||||
@@ -83,8 +83,6 @@ const RemotePlayMenu: FC<RemotePlayMenuProps> = ({
|
||||
{playbackTargets.map(target => (
|
||||
<MenuItem
|
||||
key={target.id}
|
||||
// Since we are looping over targets there is no good way to avoid creating a new function here
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => onPlayTargetClick(target)}
|
||||
>
|
||||
<ListItemIcon>
|
||||
|
||||
@@ -31,7 +31,6 @@ const AlphabetPicker: React.FC<AlphabetPickerProps> = ({
|
||||
return (
|
||||
<Box
|
||||
className='alphaPicker-fixed-right'
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
sx={theme => ({
|
||||
position: 'fixed',
|
||||
top: {
|
||||
|
||||
@@ -60,7 +60,6 @@ const LibraryViewMenu: FC = () => {
|
||||
{currentRoute?.views.map(tab => (
|
||||
<MenuItem
|
||||
key={tab.view}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => {
|
||||
searchParams.set('tab', `${tab.index}`);
|
||||
setSearchParams(searchParams);
|
||||
|
||||
@@ -237,7 +237,6 @@ const SortButton: FC<SortButtonProps> = ({
|
||||
.map((option) => (
|
||||
<MenuItem
|
||||
key={option.value.join(',')}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => onMenuItemClick(option.value)}
|
||||
>
|
||||
<ListItemText>
|
||||
|
||||
@@ -177,7 +177,6 @@ const ViewSettingsButton: FC<ViewSettingsButtonProps> = ({
|
||||
{imageTypesOptions.map((imageType) => (
|
||||
<MenuItem
|
||||
key={imageType.value}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onClick={() => setImageType(imageType.value)}
|
||||
>
|
||||
<ListItemIcon>
|
||||
|
||||
@@ -24,7 +24,6 @@ const UserAvatar: FC<UserAvatarProps> = ({
|
||||
`${api.basePath}/Users/${user.Id}/Images/Primary?tag=${user.PrimaryImageTag}` :
|
||||
undefined
|
||||
}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
sx={(theme) => ({
|
||||
bgcolor: api && user.Id && user.PrimaryImageTag ?
|
||||
theme.vars.palette.background.paper :
|
||||
|
||||
@@ -20,7 +20,6 @@ const StarIcons: FC<StarIconsProps> = ({ className, communityRating }) => {
|
||||
<Box className={cssClass}>
|
||||
<StarIcon
|
||||
fontSize={'small'}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
sx={(theme) => ({
|
||||
color: theme.vars.palette.starIcon.main
|
||||
})}
|
||||
|
||||
@@ -66,7 +66,6 @@ const AutoTimeProgressBar: FC<AutoTimeProgressBarProps> = ({
|
||||
className={progressBarClass}
|
||||
variant='determinate'
|
||||
value={progress}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
sx={(theme) => ({
|
||||
[`& .${linearProgressClasses.bar}`]: {
|
||||
borderRadius: 5,
|
||||
|
||||
+4
-2
@@ -276,7 +276,8 @@ const config = {
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
transpileOnly: true
|
||||
transpileOnly: true,
|
||||
compilerOptions: { sourceMap: DEV_MODE }
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -287,7 +288,8 @@ const config = {
|
||||
use: [{
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
transpileOnly: true
|
||||
transpileOnly: true,
|
||||
compilerOptions: { sourceMap: DEV_MODE }
|
||||
}
|
||||
}]
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user