Skip to content

Commit b97d9e1

Browse files
author
Your Name
committed
chore(upstream): merge C4illin/ConvertX main (eslint v4, deps update)
Merged changes: - chore: update eslint config (C4illin#521) - PDF to DOCX using LibreOffice, fixes C4illin#425 (C4illin#510) - chore: update deps (C4illin#522) - chore(deps): eslint-plugin-better-tailwindcss to v4 (C4illin#506) Conflict resolution: - package.json: keep our @sinclair/typebox, upgrade eslint-plugin to v4 - eslint.config.ts: keep our extended ignores - libreoffice.ts: keep our PDF import pipeline (more complete) - root.tsx, history.tsx: keep our Chinese localized version
2 parents f8c1b8a + f747a5b commit b97d9e1

File tree

6 files changed

+79
-63
lines changed

6 files changed

+79
-63
lines changed

bun.lock

Lines changed: 50 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.ts

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
import js from "@eslint/js";
2-
import eslintParserTypeScript from "@typescript-eslint/parser";
32
import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
3+
import { defineConfig } from "eslint/config";
44
import globals from "globals";
5-
import tseslint from "typescript-eslint";
6-
import path from "path";
7-
import { fileURLToPath } from "url";
5+
import tseslint, { parser as eslintParserTypeScript } from "typescript-eslint";
86

9-
const __filename = fileURLToPath(import.meta.url);
10-
const __dirname = path.dirname(__filename);
11-
12-
export default tseslint.config(
7+
export default defineConfig(
138
{
149
ignores: [
1510
"**/node_modules/**",
@@ -22,18 +17,15 @@ export default tseslint.config(
2217
js.configs.recommended,
2318
tseslint.configs.recommended,
2419
{
25-
files: ["**/*.{tsx,ts}"],
26-
plugins: {
27-
"better-tailwindcss": eslintPluginBetterTailwindcss,
28-
},
20+
files: ["**/*.{ts,tsx,cts,mts}"],
21+
extends: [
22+
eslintPluginBetterTailwindcss.configs.recommended,
23+
eslintPluginBetterTailwindcss.configs.stylistic,
24+
],
2925
languageOptions: {
3026
parser: eslintParserTypeScript,
3127
parserOptions: {
3228
project: "./tsconfig.eslint.json",
33-
tsconfigRootDir: __dirname,
34-
ecmaFeatures: {
35-
jsx: true,
36-
},
3729
},
3830
globals: {
3931
...globals.node,
@@ -45,17 +37,14 @@ export default tseslint.config(
4537
},
4638
},
4739
rules: {
48-
...(eslintPluginBetterTailwindcss.configs["recommended-warn"] ?? {}).rules,
49-
...(eslintPluginBetterTailwindcss.configs["stylistic-warn"] ?? {}).rules,
50-
// "tailwindcss/classnames-order": "off",
5140
"better-tailwindcss/enforce-consistent-line-wrapping": [
5241
"warn",
5342
{
5443
group: "newLine",
5544
printWidth: 100,
5645
},
5746
],
58-
"better-tailwindcss/no-unregistered-classes": [
47+
"better-tailwindcss/no-unknown-classes": [
5948
"warn",
6049
{
6150
ignore: [
@@ -74,6 +63,16 @@ export default tseslint.config(
7463
],
7564
},
7665
},
66+
{
67+
files: ["**/*.{jsx,tsx}"],
68+
languageOptions: {
69+
parserOptions: {
70+
ecmaFeatures: {
71+
jsx: true,
72+
},
73+
},
74+
},
75+
},
7776
{
7877
files: ["**/*.{js,cjs,mjs,jsx}"],
7978
extends: [tseslint.configs.disableTypeChecked],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@types/node": "^24.10.9",
4646
"@typescript-eslint/parser": "^8.54.0",
4747
"eslint": "^9.39.2",
48-
"eslint-plugin-better-tailwindcss": "^3.8.0",
48+
"eslint-plugin-better-tailwindcss": "^4.0.2",
4949
"globals": "^17.1.0",
5050
"knip": "^5.82.1",
5151
"npm-run-all2": "^8.0.4",

src/pages/chooseConverter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const chooseConverter = new Elysia().use(userService).post(
1010
<article
1111
class={`
1212
convert_to_popup absolute z-2 m-0 hidden h-[50vh] max-h-[50vh] w-full flex-col
13-
overflow-x-hidden overflow-y-auto rounded bg-neutral-800
13+
overflow-x-hidden overflow-y-auto rounded-sm bg-neutral-800
1414
sm:h-[30vh]
1515
`}
1616
>
@@ -28,7 +28,7 @@ export const chooseConverter = new Elysia().use(userService).post(
2828
// https://stackoverflow.com/questions/121499/when-a-blur-event-occurs-how-can-i-find-out-which-element-focus-went-to#comment82388679_33325953
2929
tabindex={0}
3030
class={`
31-
target rounded bg-neutral-700 p-1 text-base
31+
target rounded-sm bg-neutral-700 p-1 text-base
3232
hover:bg-neutral-600
3333
`}
3434
data-value={`${target},${converter}`}

src/pages/listConverters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const listConverters = new Elysia().use(userService).get(
3838

3939
<table
4040
class={`
41-
w-full table-auto rounded bg-neutral-900 text-left
41+
w-full table-auto rounded-sm bg-neutral-900 text-left
4242
[&_td]:p-4
4343
[&_tr]:rounded-sm [&_tr]:border-b [&_tr]:border-neutral-800
4444
[&_ul]:list-inside [&_ul]:list-disc

src/pages/results.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ function ResultsArticle({
5555
class={`
5656
mb-4 inline-block h-2 w-full appearance-none overflow-hidden rounded-full border-0
5757
bg-neutral-700 bg-none text-accent-500 accent-accent-500
58-
[&::-moz-progress-bar]:bg-accent-500 [&::-webkit-progress-value]:rounded-full
59-
[&::-webkit-progress-value]:[background:none]
58+
[&::-moz-progress-bar]:bg-accent-500
59+
[&::-webkit-progress-value]:rounded-full [&::-webkit-progress-value]:[background:none]
6060
[&[value]::-webkit-progress-value]:bg-accent-500
6161
[&[value]::-webkit-progress-value]:transition-[inline-size]
6262
`}
6363
/>
6464
<table
6565
class={`
66-
w-full table-auto rounded bg-neutral-900 text-left
66+
w-full table-auto rounded-sm bg-neutral-900 text-left
6767
[&_td]:p-4
6868
[&_tr]:rounded-sm [&_tr]:border-b [&_tr]:border-neutral-800
6969
`}
@@ -72,23 +72,23 @@ function ResultsArticle({
7272
<tr>
7373
<th
7474
class={`
75-
px-2 py-2
75+
p-2
7676
sm:px-4
7777
`}
7878
>
7979
{t("results", "convertedFileName")}
8080
</th>
8181
<th
8282
class={`
83-
px-2 py-2
83+
p-2
8484
sm:px-4
8585
`}
8686
>
8787
{t("results", "status")}
8888
</th>
8989
<th
9090
class={`
91-
px-2 py-2
91+
p-2
9292
sm:px-4
9393
`}
9494
>

0 commit comments

Comments
 (0)