- Create code-first route tree in src/app/routing/routeTree.tsx - Replace ProtectedRoute with beforeLoad auth guards - Add useSearchParamsCompat for URLSearchParams access - Update App.tsx, layouts, and all page/widget imports - Add frontend tooling: biome, prettier, env config - Update all tests for TanStack Router compatibility - Remove react-router-dom dependency, @tanstack/router-plugin - Consolidate biome config at root level
55 lines
1.9 KiB
JavaScript
55 lines
1.9 KiB
JavaScript
const path = require('path');
|
|
const src = path.resolve(__dirname, 'src');
|
|
|
|
module.exports = {
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
sourceType: 'module',
|
|
},
|
|
plugins: ['@conarti/feature-sliced', 'import'],
|
|
root: true,
|
|
env: {
|
|
browser: true,
|
|
es2020: true,
|
|
},
|
|
settings: {
|
|
'import/resolver': {
|
|
typescript: {
|
|
alwaysTryTypes: true,
|
|
project: './tsconfig.json',
|
|
},
|
|
},
|
|
},
|
|
ignorePatterns: ['.eslintrc.cjs', 'vite.config.ts', 'vitest.config.ts', 'dist/'],
|
|
rules: {
|
|
// FSD layer boundaries (from @conarti/eslint-plugin-feature-sliced)
|
|
'@conarti/feature-sliced/layers-slices': ['error', {
|
|
ignoreInFilesPatterns: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx', '**/test/**'],
|
|
}],
|
|
|
|
// FSD layer boundaries (from import/no-restricted-paths)
|
|
'import/no-restricted-paths': [
|
|
'error',
|
|
{
|
|
zones: [
|
|
{ from: `${src}/entities`, target: `${src}/shared` },
|
|
{ from: `${src}/features`, target: `${src}/shared` },
|
|
{ from: `${src}/widgets`, target: `${src}/shared` },
|
|
{ from: `${src}/pages`, target: `${src}/shared` },
|
|
{ from: `${src}/app`, target: `${src}/shared` },
|
|
{ from: `${src}/features`, target: `${src}/entities` },
|
|
{ from: `${src}/widgets`, target: `${src}/entities` },
|
|
{ from: `${src}/pages`, target: `${src}/entities` },
|
|
{ from: `${src}/app`, target: `${src}/entities` },
|
|
{ from: `${src}/widgets`, target: `${src}/features` },
|
|
{ from: `${src}/pages`, target: `${src}/features` },
|
|
{ from: `${src}/app`, target: `${src}/features` },
|
|
{ from: `${src}/pages`, target: `${src}/widgets` },
|
|
{ from: `${src}/app`, target: `${src}/widgets` },
|
|
{ from: `${src}/app`, target: `${src}/pages` },
|
|
],
|
|
},
|
|
],
|
|
},
|
|
};
|