Skip to content

Commit 7649402

Browse files
committed
Upgrade dependencies, remove no longer needed react-textarea-autosize and other small improvements
1 parent 2b3ee19 commit 7649402

8 files changed

Lines changed: 31 additions & 32 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**/.DS_Store
1+
.DS_Store
22
.history
33
node_modules
44
dist

.oxlintrc.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/refs/heads/main/npm/oxlint/configuration_schema.json",
2+
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
33
"ignorePatterns": [ "eslint.config.ts", "deno-deploy-serve.ts" ],
44
"env": { "builtin": true },
55
"options": {
@@ -13,22 +13,21 @@
1313
"perf": "warn",
1414
"style": "warn",
1515
"restriction": "warn",
16-
"nursery": "warn",
16+
"nursery": "warn"
1717
},
1818
"plugins": [
1919
"oxc",
2020
"eslint",
2121
"typescript",
2222
"unicorn",
2323
"import",
24+
"promise",
2425
"react",
2526
"react-perf",
26-
"promise",
27-
// "node",
28-
],
29-
"jsPlugins": [
30-
{ "name": "react-hooks-js", "specifier": "eslint-plugin-react-hooks" }
3127
],
28+
// "jsPlugins": [
29+
// { "name": "react-hooks-js", "specifier": "eslint-plugin-react-hooks" }
30+
// ],
3231
"overrides": [{
3332
"files": [ "**/*.{js,jsx,ts,tsx}" ],
3433
"env": { "browser": true },
@@ -37,6 +36,8 @@
3736
"process": "readonly"
3837
},
3938
"rules": {
39+
"oxc/no-async-await": "off",
40+
"oxc/no-optional-chaining": "off",
4041
"eslint/capitalized-comments": "off",
4142
"eslint/complexity": [ "warn", 30 ],
4243
"eslint/curly": "off",
@@ -52,7 +53,7 @@
5253
"eslint/max-statements": [ "warn", 50 ],
5354
"eslint/no-bitwise": "off",
5455
"eslint/no-console": "off",
55-
"no-empty-function": "off",
56+
"eslint/no-empty-function": "off",
5657
"eslint/no-inline-comments": "off",
5758
"eslint/no-magic-numbers": "off",
5859
"eslint/no-negated-condition": "off",
@@ -67,8 +68,6 @@
6768
"eslint/sort-imports": "off",
6869
"eslint/sort-keys": "off",
6970
"eslint/sort-vars": "off",
70-
"oxc/no-async-await": "off",
71-
"oxc/no-optional-chaining": "off",
7271
"typescript/consistent-return": "off",
7372
"typescript/consistent-type-definitions": [ "error", "type" ],
7473
"typescript/explicit-function-return-type": "off",
@@ -101,18 +100,21 @@
101100
"import/no-nodejs-modules": "off",
102101
"import/no-unassigned-import": [ "warn", { "allow": [ "**/*.css" ] } ],
103102
"promise/always-return": [ "warn", { "ignoreLastCallback": true } ],
103+
"promise/prefer-await-to-callbacks": "off",
104+
"promise/prefer-await-to-then": "off",
104105
"react/button-has-type": "off",
105106
"react/exhaustive-deps": "off",
106107
"react/forbid-component-props": "off",
107108
"react/jsx-filename-extension": [ "warn", { "extensions": [ ".jsx", ".tsx" ] } ],
108109
"react/jsx-max-depth": [ "warn", { "max": 10 } ],
110+
"react/jsx-no-literals": "off",
109111
"react/jsx-props-no-spreading": "off",
110112
"react/no-multi-comp": [ "off", { "ignoreStateless": true } ],
111113
"react/only-export-components": "off",
112114
"react/react-in-jsx-scope": "off",
113115
"react-perf/jsx-no-jsx-as-prop": "off",
114116
"react-perf/jsx-no-new-function-as-prop": "off",
115-
"react-perf/jsx-no-new-object-as-prop": "off",
117+
"react-perf/jsx-no-new-object-as-prop": "off"
116118
}
117119
}]
118120
}

eslint.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default defineConfig(
3737
// importPlugin.flatConfigs.recommended,
3838
// reactPlugin.configs.flat.recommended,
3939
// reactHooksPlugin.configs.flat.recommended,
40-
reactPlugin.configs['disable-conflict-eslint-plugin-react-hooks'],
40+
// reactPlugin.configs['disable-conflict-eslint-plugin-react-hooks'],
4141
reactPlugin.configs['strict-type-checked'],
4242
],
4343
rules: {

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,34 @@
2828
"pre-commit": "pnpm check && pnpm lint && pnpm test && pnpm build"
2929
},
3030
"devDependencies": {
31-
"@eslint-react/eslint-plugin": "^5.12.1",
31+
"@eslint-react/eslint-plugin": "^5.17.3",
3232
"@eslint/css": "^1.4.0",
3333
"@eslint/js": "^10.0.1",
3434
"@rolldown/plugin-babel": "^0.2.3",
3535
"@stylistic/eslint-plugin": "^5.10.0",
36-
"@tailwindcss/vite": "^4.3.2",
36+
"@tailwindcss/vite": "^4.3.3",
3737
"@types/node": "^26.1.1",
3838
"@types/react": "^19.2.17",
3939
"@types/react-dom": "^19.2.3",
4040
"@vitejs/plugin-react": "^6.0.3",
4141
"babel-plugin-react-compiler": "^1.0.0",
42-
"daisyui": "^5.6.16",
43-
"eslint": "^10.6.0",
42+
"daisyui": "^5.7.0",
43+
"eslint": "^10.7.0",
4444
"eslint-plugin-react-hooks": "^7.1.1",
4545
"globals": "^17.7.0",
46-
"oxfmt": "^0.58.0",
46+
"oxfmt": "^0.59.0",
47+
"oxlint": "^1.74.0",
4748
"react": "^19.2.7",
4849
"react-dom": "^19.2.7",
4950
"react-error-boundary": "^6.1.2",
5051
"react-icons": "^5.7.0",
5152
"react-router-dom": "^7.18.1",
5253
"react-textarea-autosize": "^8.5.9",
5354
"tailwind-csstree": "^0.3.3",
54-
"tailwindcss": "^4.3.2",
55+
"tailwindcss": "^4.3.3",
5556
"typescript": "^6.0.3",
56-
"typescript-eslint": "^8.63.0",
57-
"vite": "^8.1.3",
57+
"typescript-eslint": "^8.65.0",
58+
"vite": "^8.1.5",
5859
"vite-plugin-pwa": "^1.3.0",
5960
"zod": "^4.4.3"
6061
}

src/app.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
themes: all;
55
}
66

7-
/* @plugin "flyonui" {
8-
themes: all;
9-
} */
10-
117
@theme {
128
--font-mono: "Noto Sans Symbol";
139
}

src/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export function getCharsLS(): string | undefined {
2525
export function sanitizeInput(input: string, radix: Radix): string[] {
2626
input = input.toUpperCase()
2727
const chars = radix.system === 'balanced' ? radix.chars : `-${radix.chars}`
28-
const sanitizedInput = input.replaceAll(new RegExp(`[^${chars}]`, 'g'), '')
29-
const rest = input.replaceAll(new RegExp(`[${chars}]`, 'g'), '')
28+
const sanitizedInput = input.replaceAll(new RegExp(`[^${chars}]`, 'gu'), '')
29+
const rest = input.replaceAll(new RegExp(`[${chars}]`, 'gu'), '')
3030
return [ sanitizedInput, rest ]
3131
}
3232

src/components/header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ export default function Header({ radixes, updateRadixes }: {
199199
</optgroup>)}
200200
</select>
201201
<div className={inputCharsError ? 'tooltip tooltip-error tooltip-open' : undefined} data-tip={inputCharsError}>
202-
<TextareaAutosize
203-
className="supports-[field-sizing:content]:field-sizing-content mi n-w-24 max-w-[calc(100vw-5.5ch)] xl:max-w-[calc(100vw-ch)] block resize-none bg-base-100 rounded-lg font-mono leading-8 p-0 px-2"
202+
<textarea
203+
className="supports-[field-sizing:content]:field-sizing-content min-w-24 max-w-[calc(100vw-5.5ch)] xl:max-w-[calc(100vw-ch)] block resize-none bg-base-100 rounded-lg font-mono leading-8 p-0 px-2"
204204
name="chars"
205205
rows={1}
206206
cols={70}
@@ -268,7 +268,7 @@ const RadixSelect = ({ who, radixes, toggleRadixes }: { who: Radix['system'], ra
268268
</div>
269269
<div className="card-actions justify-center">{ radixes.filter(r => r.system === who).map(radix =>
270270
<button
271-
className={`btn btn-xs btn-outline btn-neutral ${radix.enabled ? 'btn-active' : ''} w-12 m-1 p-0`}
271+
className={`btn btn-xs ${radix.enabled ? 'btn-neutral' : ''} w-12 m-1 p-0`}
272272
type="button"
273273
key={radix.name}
274274
onClick={() => { toggleRadixes(radix, !radix.enabled) }}

src/components/table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export default function Table({ radix, numbers, low, high, mainRow, columns, row
4444
<div className="card-body overflow-scroll p-2">
4545
<table className="table table-xs table-fixed text-sm w-auto">
4646
<tbody>{ numbers.map((row, rowIndex) =>
47-
<tr className={`hover row${rowIndex === mainRow ? ' bg-base-200' : ''}`} key={row[0]}>{ row.map(number =>
48-
<td className="text-right px-0.5 py-0.5 w-8" key={number}>
47+
<tr className={`hover row${rowIndex === mainRow ? ' bg-base-200' : ''}`} key={rowIndex}>{ row.map((number, columnIndex) =>
48+
<td className="text-right px-0.5 py-0.5 w-8" key={columnIndex}>
4949
<Value value={number} radix={radix} low={low} space={space}/>
5050
</td>)}
5151
</tr>)}

0 commit comments

Comments
 (0)