0467a4b7ef
CI runners configure pnpm with --store-dir=.pnpm-store (project-local CAS) for cross-run caching. Prettier and ESLint were scanning into it and finding 333 unformatted JSON files. Added to .prettierignore and eslint.config.js globalIgnores: - .pnpm-store / .pnpm — pnpm content-addressable store variants - coverage — future test runs (Vitest in Phase 3) - .cache — generic build cache directory Local Windows trees aren't affected (pnpm uses the global store at ~/.local/share/pnpm/store) but the rules cover both paths.
49 lines
1.4 KiB
JavaScript
49 lines
1.4 KiB
JavaScript
import js from '@eslint/js';
|
|
import globals from 'globals';
|
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
import tseslint from 'typescript-eslint';
|
|
import prettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
|
|
export default defineConfig([
|
|
globalIgnores([
|
|
'dist',
|
|
'src/routeTree.gen.ts',
|
|
// CI runners may use a project-local pnpm CAS at .pnpm-store.
|
|
'.pnpm-store',
|
|
'.pnpm',
|
|
'coverage',
|
|
]),
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
extends: [
|
|
js.configs.recommended,
|
|
tseslint.configs.recommended,
|
|
reactHooks.configs.flat.recommended,
|
|
reactRefresh.configs.vite,
|
|
prettierRecommended,
|
|
],
|
|
languageOptions: {
|
|
globals: globals.browser,
|
|
},
|
|
},
|
|
{
|
|
// shadcn/ui primitives intentionally co-export helpers (variants, hooks)
|
|
// alongside components — disable the fast-refresh rule for these files only.
|
|
files: ['src/ui/primitives/**/*.{ts,tsx}'],
|
|
rules: {
|
|
'react-refresh/only-export-components': 'off',
|
|
},
|
|
},
|
|
{
|
|
// TanStack Router file-based routes export `Route` (the route definition)
|
|
// alongside the route's component. That's the canonical pattern; the
|
|
// fast-refresh rule doesn't apply usefully here.
|
|
files: ['src/routes/**/*.{ts,tsx}'],
|
|
rules: {
|
|
'react-refresh/only-export-components': 'off',
|
|
},
|
|
},
|
|
]);
|