PWA対応とモバイルUX改善。 - app/manifest.ts: Nextファイルベースでマニフェスト生成(name/short_name/display:standalone/icons 192+512 any+maskable + svg) - public/icon.svg + 生成PNG(192/512): scripts/generate-icons.mjs で sharp を用いてSVGをラスタライズ - public/sw.js: アプリシェルのプリキャッシュ、ナビゲーションはネットワーク優先(オフラインはキャッシュ/'/'にフォールバック)、静的アセットはキャッシュ優先。API/非GET/クロスオリジンはキャッシュせず、res.ok&&basic でエラー/リダイレクト結果を弾く - components/pwa/ServiceWorkerRegister: 本番のみ /sw.js を登録(開発HMRとの衝突回避) - app/layout.tsx: export const viewport(device-width, cover, themeColor) + metadata.icons/appleWebApp - middleware: sw.js/manifest/icon を認証ガードから除外(ログイン前でも取得可能) - ProjectNav: 横スクロールStrip(折り返さない)、Header: モバイルでダッシュボードテキストリンクを非表示
36 lines
839 B
JavaScript
36 lines
839 B
JavaScript
import eslint from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import prettierConfig from 'eslint-config-prettier';
|
|
|
|
export default tseslint.config(
|
|
eslint.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
prettierConfig,
|
|
{
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ argsIgnorePattern: '^_' },
|
|
],
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
'node_modules/**',
|
|
'dist/**',
|
|
'.next/**',
|
|
'.steering/**',
|
|
'data/**',
|
|
'backups/**',
|
|
'playwright-report/**',
|
|
'test-results/**',
|
|
'next-env.d.ts',
|
|
'scripts/**/*.mjs',
|
|
'public/**',
|
|
],
|
|
}
|
|
);
|