fix(ci): fix ESLint flat config --ext flag and unused vars lint errors

- Remove --ext flag from lint scripts (not supported by ESLint 9 flat config)
- Refactor store partialize to avoid unused destructured variables

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
poli0981andClaude Opus 4.6 committed 2026-04-07 21:49:46 +07:00
1 parent ddf67bee80
commit 7cccbfa203
3 files changed
+31 -22

No files matched your search

+2 -2
View File
@@ -10,8 +10,8 @@
"test": "vitest",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"lint": "eslint src/ --ext .ts,.tsx",
"lint:fix": "eslint src/ --ext .ts,.tsx --fix",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"typecheck": "tsc --noEmit",
"format": "prettier --write \"src/**/*.{ts,tsx,json,css}\"",
"validate:locales": "tsx scripts/validate-locales.ts",
+24 -11
View File
@@ -88,17 +88,30 @@ export const useEditorStore = create<EditorState>()(
{
name: "ytdescgen-editor-draft",
storage: createJSONStorage(() => localStorage),
partialize: (state) => {
const {
set: _s,
setNested: _sn,
loadProfile: _lp,
loadPreset: _lpre,
reset: _r,
...data
} = state;
return data;
},
partialize: (state) => ({
videoType: state.videoType,
language: state.language,
genre: state.genre,
gameName: state.gameName,
gameNameLocalized: state.gameNameLocalized,
channelName: state.channelName,
platform: state.platform,
partNumber: state.partNumber,
bossName: state.bossName,
dlcName: state.dlcName,
challengeName: state.challengeName,
resolution: state.resolution,
fps: state.fps,
graphicsPreset: state.graphicsPreset,
timestamps: state.timestamps,
playlistLink: state.playlistLink,
contactEmail: state.contactEmail,
spoilerWarning: state.spoilerWarning,
matureWarning: state.matureWarning,
storeLinks: state.storeLinks,
social: state.social,
rig: state.rig,
}),
},
),
);
+5 -9
View File
@@ -30,15 +30,11 @@ export const useSettingsStore = create<SettingsState>()(
{
name: "ytdescgen-settings",
storage: createJSONStorage(() => localStorage),
partialize: (state) => {
const {
setTheme: _st,
setDefaultLanguage: _sdl,
setDefaultGenre: _sdg,
...data
} = state;
return data;
},
partialize: (state) => ({
theme: state.theme,
defaultLanguage: state.defaultLanguage,
defaultGenre: state.defaultGenre,
}),
},
),
);