Added prettier-plugin-tailwindcss and sorted the classes + some small fixes (#630)

* Added prettier-plugin-tailwindcss and sorted the classes

* Added tsc into staged check + some type improvements
This commit is contained in:
yuri-sakharov
2025-11-30 22:11:52 +02:00
committed by GitHub
parent 73f74d77bb
commit f10cc6d8a5
43 changed files with 271 additions and 183 deletions

View File

@@ -11,13 +11,13 @@ export const ChartValues = ({
return (
<div className="w-1/2">
<label
className="block tracking-wide text-gray-700 text-xl font-medium mb-2"
className="mb-2 block text-xl font-medium tracking-wide text-gray-700"
htmlFor="grid-user-defined-values"
>
Chart Value Reference:
</label>
<pre
className="text-base bg-chart-values p-2 rounded-sm font-medium w-full max-h-[330px] block overflow-y-auto font-sf-mono"
className="block max-h-[330px] w-full overflow-y-auto rounded-sm bg-chart-values p-2 font-sf-mono text-base font-medium"
dangerouslySetInnerHTML={
chartValues && !loading
? {

View File

@@ -15,7 +15,7 @@ export const DefinedValues = ({
loading,
}: DefinedValuesProps) => {
return (
<div className="flex w-full gap-6 mt-4">
<div className="mt-4 flex w-full gap-6">
<UserDefinedValues
initialValue={initialValue}
onValuesChange={onUserValuesChange}

View File

@@ -169,7 +169,7 @@ export const InstallReleaseChartModal = ({
window.location.reload();
},
onError: (error) => {
setInstallError((error as Error)?.message || "Failed to update");
setInstallError(error?.message || "Failed to update");
},
});

View File

@@ -149,7 +149,7 @@ export const InstallRepoChartModal = ({
navigate(`/${response.namespace}/${response.name}/installed/revision/1`);
},
onError: (error) => {
setInstallError((error as Error)?.message || "Failed to update");
setInstallError(error?.message || "Failed to update");
},
});

View File

@@ -17,7 +17,7 @@ export const InstallUpgradeTitle: FC<InstallUpgradeProps> = ({
<div className="font-bold">
{`${text}`}
{(isUpgrade || releaseValues) && (
<span className="text-green-700 ml-1">{chartName}</span>
<span className="ml-1 text-green-700">{chartName}</span>
)}
</div>
);

View File

@@ -35,7 +35,7 @@ export const ManifestDiff = ({ diff, isLoading, error }: ManifestDiffProps) => {
if (isLoading && !error) {
return (
<div className="flex text-lg items-end">
<div className="flex items-end text-lg">
<Spinner />
Calculating diff...
</div>
@@ -47,7 +47,7 @@ export const ManifestDiff = ({ diff, isLoading, error }: ManifestDiffProps) => {
<h4 className="text-xl">Manifest changes:</h4>
{error ? (
<p className="text-red-600 text-lg">
<p className="text-lg text-red-600">
Failed to get upgrade info: {error.toString()}
</p>
) : diff ? (

View File

@@ -20,9 +20,9 @@ export const UserDefinedValues = ({
}, [debouncedValue, onValuesChange, initialValue]);
return (
<div className="w-1/2 ">
<div className="w-1/2">
<label
className="block tracking-wide text-gray-700 text-xl font-medium mb-2"
className="mb-2 block text-xl font-medium tracking-wide text-gray-700"
htmlFor="grid-user-defined-values"
>
User-Defined Values:
@@ -32,7 +32,7 @@ export const UserDefinedValues = ({
defaultValue={initialValue}
onChange={(e) => setUserDefinedValues(e.target.value)}
rows={14}
className="block p-2.5 w-full text-md text-gray-900 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 resize-none font-monospace"
className="text-md font-monospace block w-full resize-none rounded-lg border border-gray-300 p-2.5 text-gray-900 focus:border-blue-500 focus:ring-blue-500"
></textarea>
</div>
);

View File

@@ -42,7 +42,7 @@ export const VersionToInstall: FC<{
const currentVersion =
chartVersion && showCurrentVersion ? (
<p className="text-xl text-muted ml-2">
<p className="ml-2 text-xl text-muted">
{"(current version is "}
<span className="text-green-700">{`${chartVersion}`}</span>
{")"}
@@ -71,12 +71,12 @@ export const VersionToInstall: FC<{
[options, initialVersion]
);
return (
<div className="flex gap-2 text-xl items-center">
<div className="flex items-center gap-2 text-xl">
{versions?.length && (selectedOption || initOpt) ? (
<>
Version to install:{" "}
<Select
className="basic-single cursor-pointer min-w-[272px]"
className="basic-single min-w-[272px] cursor-pointer"
classNamePrefix="select"
isClearable={false}
isSearchable={false}
@@ -96,9 +96,9 @@ export const VersionToInstall: FC<{
return (
<OriginalSingleValue {...props}>
<span className="text-green-700 font-bold">{children}</span>
<span className="font-bold text-green-700">{children}</span>
{props.data.check && showCurrentVersion && (
<BsCheck2 className="inline-block ml-2 text-green-700 font-bold" />
<BsCheck2 className="ml-2 inline-block font-bold text-green-700" />
)}
</OriginalSingleValue>
);
@@ -106,7 +106,7 @@ export const VersionToInstall: FC<{
Option: ({ children, innerProps, data }) => (
<div
className={
"flex items-center py-2 pl-4 pr-2 text-green-700 hover:bg-blue-100"
"flex items-center py-2 pr-2 pl-4 text-green-700 hover:bg-blue-100"
}
{...innerProps}
>
@@ -114,7 +114,7 @@ export const VersionToInstall: FC<{
{data.check && showCurrentVersion && (
<BsCheck2
fontWeight={"bold"}
className="inline-block ml-2 text-green-700 font-bold"
className="ml-2 inline-block font-bold text-green-700"
/>
)}
</div>