refactor(storage-providers): streamline provider handling and remove unused types

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-11-02 20:46:33 +08:00
parent 6cf5fd7c51
commit 57c9642a98
7 changed files with 69 additions and 123 deletions

View File

@@ -15,32 +15,32 @@ const rootIgnores = globalIgnores([
])
const hyobanConfig = await defineConfig(
{
formatting: false,
lessOpinionated: true,
preferESM: false,
react: true,
tailwindCSS: true,
{
formatting: false,
lessOpinionated: true,
preferESM: false,
react: true,
tailwindCSS: true,
},
{
languageOptions: {
parserOptions: {
emitDecoratorMetadata: true,
experimentalDecorators: true,
},
},
{
languageOptions: {
parserOptions: {
emitDecoratorMetadata: true,
experimentalDecorators: true,
},
// TailwindCSS v4 usually has no config file. Silence the plugin's
// config resolution warning by explicitly disabling auto-resolution.
settings: {
tailwindcss: {
// ESLint plugin will not attempt to resolve tailwind config
// which avoids repeated "Cannot resolve default tailwindcss config path" warnings.
config: false,
},
// TailwindCSS v4 usually has no config file. Silence the plugin's
// config resolution warning by explicitly disabling auto-resolution.
settings: {
tailwindcss: {
// ESLint plugin will not attempt to resolve tailwind config
// which avoids repeated "Cannot resolve default tailwindcss config path" warnings.
config: false,
},
},
rules: {
},
rules: {
'@typescript-eslint/triple-slash-reference': 0,
'unicorn/prefer-math-trunc': 'off',
'unicorn/no-static-only-class': 'off',
@@ -80,44 +80,39 @@ const hyobanConfig = await defineConfig(
'You can use `useLocaltion` or `getReadonlyRoute` to get the route info.',
},
],
},
},
},
// @ts-expect-error
{
files: ['locales/**/*.json'],
plugins: {
'recursive-sort': recursiveSort,
'check-i18n-json': checkI18nJson,
},
rules: {
'recursive-sort/recursive-sort': 'error',
'check-i18n-json/valid-i18n-keys': 'error',
'check-i18n-json/no-extra-keys': 'error',
},
// @ts-expect-error
{
files: ['locales/**/*.json'],
plugins: {
'recursive-sort': recursiveSort,
'check-i18n-json': checkI18nJson,
},
{
files: ['**/*.tsx'],
rules: {
'@stylistic/jsx-self-closing-comp': 'error',
},
rules: {
'recursive-sort/recursive-sort': 'error',
'check-i18n-json/valid-i18n-keys': 'error',
'check-i18n-json/no-extra-keys': 'error',
},
},
{
files: ['**/*.tsx'],
rules: {
'@stylistic/jsx-self-closing-comp': 'error',
},
},
// Backend framework isn't React — disable React-specific hooks rule there.
{
files: ['be/packages/framework/**/*.{ts,tsx}'],
rules: {
'react-hooks/rules-of-hooks': 'off',
},
// Backend framework isn't React — disable React-specific hooks rule there.
{
files: ['be/packages/framework/**/*.{ts,tsx}'],
rules: {
'react-hooks/rules-of-hooks': 'off',
},
},
// Redundant but harmless: keep a local ignore in case this block is used standalone somewhere
globalIgnores([
'apps/ssr/src/index.html.ts',
'apps/ssr/public/**',
'apps/web/public/**',
'packages/docs/public/**',
]),
// Redundant but harmless: keep a local ignore in case this block is used standalone somewhere
globalIgnores(['apps/ssr/src/index.html.ts', 'apps/ssr/public/**', 'apps/web/public/**', 'packages/docs/public/**']),
)
export default [