@salesforce/webapp-template-app-react-b2c-sample-experimental 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/dist/.a4drules/build-validation.md +81 -0
- package/dist/.a4drules/code-quality.md +150 -0
- package/dist/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
- package/dist/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
- package/dist/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
- package/dist/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
- package/dist/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
- package/dist/.a4drules/graphql.md +408 -0
- package/dist/.a4drules/images.md +13 -0
- package/dist/.a4drules/react.md +361 -0
- package/dist/.a4drules/react_image_processing.md +45 -0
- package/dist/.a4drules/skills/install-feature/SKILL.md +66 -0
- package/dist/.a4drules/skills/install-feature/scripts/copy-feature-assets.sh +36 -0
- package/dist/.a4drules/typescript.md +224 -0
- package/dist/.forceignore +15 -0
- package/dist/.husky/pre-commit +4 -0
- package/dist/.prettierignore +11 -0
- package/dist/.prettierrc +17 -0
- package/dist/CHANGELOG.md +364 -0
- package/dist/README.md +18 -0
- package/dist/config/project-scratch-def.json +13 -0
- package/dist/force-app/main/default/digitalExperienceConfigs/appreactb2csample1.digitalExperienceConfig +8 -0
- package/dist/force-app/main/default/digitalExperiences/site/appreactb2csample1/appreactb2csample1.digitalExperience-meta.xml +11 -0
- package/dist/force-app/main/default/digitalExperiences/site/appreactb2csample1/sfdc_cms__site/appreactb2csample1/_meta.json +5 -0
- package/dist/force-app/main/default/digitalExperiences/site/appreactb2csample1/sfdc_cms__site/appreactb2csample1/content.json +10 -0
- package/dist/force-app/main/default/networks/appreactb2csample.network +60 -0
- package/dist/force-app/main/default/package.xml +20 -0
- package/dist/force-app/main/default/sites/appreactb2csample.site +31 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/.prettierignore +9 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/.prettierrc +11 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/appreactb2csample.webapplication-meta.xml +7 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/build/vite.config.d.ts +2 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/build/vite.config.js +74 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/e2e/app.spec.ts +24 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/eslint.config.js +113 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/index.html +13 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/package-lock.json +7157 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/package.json +45 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/playwright.config.ts +24 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/scripts/rewrite-e2e-assets.mjs +23 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/api/graphql-operations-types.ts +127 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/app.tsx +41 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/appLayout.tsx +161 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/assets/icons/book.svg +3 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/assets/icons/copy.svg +4 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/assets/icons/rocket.svg +3 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/assets/icons/star.svg +3 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/assets/images/codey-1.png +0 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/assets/images/codey-2.png +0 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/assets/images/codey-3.png +0 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/assets/images/vibe-codey.svg +194 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/alert.tsx +65 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/button.tsx +54 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/card.tsx +77 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/field.tsx +111 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/index.ts +71 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/input.tsx +19 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/label.tsx +19 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/pagination.tsx +99 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/select.tsx +151 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/skeleton.tsx +7 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/spinner.tsx +26 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/table.tsx +114 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/components/ui/tabs.tsx +115 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/lib/utils.ts +6 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/pages/About.tsx +8 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/pages/Application.tsx +101 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/pages/Dashboard.tsx +101 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/pages/HelpCenter.tsx +29 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/pages/Home.tsx +30 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/pages/Maintenance.tsx +132 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/pages/NotFound.tsx +14 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/pages/PropertyDetails.tsx +68 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/pages/PropertyListings.tsx +84 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/routes.tsx +62 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/src/styles/global.css +80 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/tsconfig.json +36 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/tsconfig.node.json +13 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/vite-env.d.ts +1 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/vite.config.ts +83 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/vitest-env.d.ts +2 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/vitest.config.ts +11 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/vitest.setup.ts +1 -0
- package/dist/force-app/main/default/webapplications/appreactb2csample/webapplication.json +7 -0
- package/dist/jest.config.js +6 -0
- package/dist/package.json +37 -0
- package/dist/scripts/apex/hello.apex +10 -0
- package/dist/scripts/soql/account.soql +6 -0
- package/dist/sfdx-project.json +12 -0
- package/package.json +28 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Network xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<allowInternalUserLogin>false</allowInternalUserLogin>
|
|
4
|
+
<allowMembersToFlag>false</allowMembersToFlag>
|
|
5
|
+
<changePasswordTemplate>unfiled$public/CommunityChangePasswordEmailTemplate</changePasswordTemplate>
|
|
6
|
+
<communityRoles/>
|
|
7
|
+
<disableReputationRecordConversations>true</disableReputationRecordConversations>
|
|
8
|
+
<emailSenderAddress>trialorgfarmforu@salesforce.com.invalid.invalid</emailSenderAddress>
|
|
9
|
+
<emailSenderName>appreactb2csample</emailSenderName>
|
|
10
|
+
<embeddedLoginEnabled>false</embeddedLoginEnabled>
|
|
11
|
+
<enableApexCDNCaching>true</enableApexCDNCaching>
|
|
12
|
+
<enableCustomVFErrorPageOverrides>false</enableCustomVFErrorPageOverrides>
|
|
13
|
+
<enableDirectMessages>true</enableDirectMessages>
|
|
14
|
+
<enableExpFriendlyUrlsAsDefault>false</enableExpFriendlyUrlsAsDefault>
|
|
15
|
+
<enableExperienceBundleBasedSnaOverrideEnabled>true</enableExperienceBundleBasedSnaOverrideEnabled>
|
|
16
|
+
<enableGuestChatter>false</enableGuestChatter>
|
|
17
|
+
<enableGuestFileAccess>false</enableGuestFileAccess>
|
|
18
|
+
<enableGuestMemberVisibility>false</enableGuestMemberVisibility>
|
|
19
|
+
<enableImageOptimizationCDN>true</enableImageOptimizationCDN>
|
|
20
|
+
<enableInvitation>false</enableInvitation>
|
|
21
|
+
<enableKnowledgeable>false</enableKnowledgeable>
|
|
22
|
+
<enableLWRExperienceConnectedApp>false</enableLWRExperienceConnectedApp>
|
|
23
|
+
<enableMemberVisibility>false</enableMemberVisibility>
|
|
24
|
+
<enableNicknameDisplay>true</enableNicknameDisplay>
|
|
25
|
+
<enablePrivateMessages>false</enablePrivateMessages>
|
|
26
|
+
<enableReputation>false</enableReputation>
|
|
27
|
+
<enableShowAllNetworkSettings>false</enableShowAllNetworkSettings>
|
|
28
|
+
<enableSiteAsContainer>true</enableSiteAsContainer>
|
|
29
|
+
<enableTalkingAboutStats>true</enableTalkingAboutStats>
|
|
30
|
+
<enableTopicAssignmentRules>true</enableTopicAssignmentRules>
|
|
31
|
+
<enableTopicSuggestions>false</enableTopicSuggestions>
|
|
32
|
+
<enableUpDownVote>false</enableUpDownVote>
|
|
33
|
+
<forgotPasswordTemplate>unfiled$public/CommunityForgotPasswordEmailTemplate</forgotPasswordTemplate>
|
|
34
|
+
<gatherCustomerSentimentData>false</gatherCustomerSentimentData>
|
|
35
|
+
<headlessForgotPasswordTemplate>unfiled$public/CommunityHeadlessForgotPasswordTemplate</headlessForgotPasswordTemplate>
|
|
36
|
+
<headlessRegistrationTemplate>unfiled$public/CommunityHeadlessRegistrationTemplate</headlessRegistrationTemplate>
|
|
37
|
+
<networkMemberGroups>
|
|
38
|
+
<profile>admin</profile>
|
|
39
|
+
</networkMemberGroups>
|
|
40
|
+
<networkPageOverrides>
|
|
41
|
+
<changePasswordPageOverrideSetting>Standard</changePasswordPageOverrideSetting>
|
|
42
|
+
<forgotPasswordPageOverrideSetting>Designer</forgotPasswordPageOverrideSetting>
|
|
43
|
+
<homePageOverrideSetting>Designer</homePageOverrideSetting>
|
|
44
|
+
<loginPageOverrideSetting>Designer</loginPageOverrideSetting>
|
|
45
|
+
<selfRegProfilePageOverrideSetting>Designer</selfRegProfilePageOverrideSetting>
|
|
46
|
+
</networkPageOverrides>
|
|
47
|
+
<newSenderAddress>trialorgfarmforu@salesforce.com</newSenderAddress>
|
|
48
|
+
<picassoSite>appreactb2csample1</picassoSite>
|
|
49
|
+
<selfRegistration>false</selfRegistration>
|
|
50
|
+
<sendWelcomeEmail>true</sendWelcomeEmail>
|
|
51
|
+
<site>appreactb2csample</site>
|
|
52
|
+
<siteArchiveStatus>NotArchived</siteArchiveStatus>
|
|
53
|
+
<status>Live</status>
|
|
54
|
+
<tabs>
|
|
55
|
+
<defaultTab>home</defaultTab>
|
|
56
|
+
<standardTab>Chatter</standardTab>
|
|
57
|
+
</tabs>
|
|
58
|
+
<urlPathPrefix>appreactb2csamplevforcesite</urlPathPrefix>
|
|
59
|
+
<welcomeTemplate>unfiled$public/CommunityWelcomeEmailTemplate</welcomeTemplate>
|
|
60
|
+
</Network>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<types>
|
|
4
|
+
<members>appreactb2csample</members>
|
|
5
|
+
<name>CustomSite</name>
|
|
6
|
+
</types>
|
|
7
|
+
<types>
|
|
8
|
+
<members>site/appreactb2csample1</members>
|
|
9
|
+
<name>DigitalExperienceBundle</name>
|
|
10
|
+
</types>
|
|
11
|
+
<types>
|
|
12
|
+
<members>appreactb2csample1</members>
|
|
13
|
+
<name>DigitalExperienceConfig</name>
|
|
14
|
+
</types>
|
|
15
|
+
<types>
|
|
16
|
+
<members>appreactb2csample</members>
|
|
17
|
+
<name>Network</name>
|
|
18
|
+
</types>
|
|
19
|
+
<version>66.0</version>
|
|
20
|
+
</Package>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<active>true</active>
|
|
4
|
+
<allowGuestPaymentsApi>false</allowGuestPaymentsApi>
|
|
5
|
+
<allowHomePage>false</allowHomePage>
|
|
6
|
+
<allowStandardAnswersPages>false</allowStandardAnswersPages>
|
|
7
|
+
<allowStandardIdeasPages>false</allowStandardIdeasPages>
|
|
8
|
+
<allowStandardLookups>false</allowStandardLookups>
|
|
9
|
+
<allowStandardPortalPages>true</allowStandardPortalPages>
|
|
10
|
+
<allowStandardSearch>false</allowStandardSearch>
|
|
11
|
+
<authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
|
|
12
|
+
<bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
|
|
13
|
+
<browserXssProtection>true</browserXssProtection>
|
|
14
|
+
<cachePublicVisualforcePagesInProxyServers>true</cachePublicVisualforcePagesInProxyServers>
|
|
15
|
+
<clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
|
|
16
|
+
<contentSniffingProtection>true</contentSniffingProtection>
|
|
17
|
+
<enableAuraRequests>true</enableAuraRequests>
|
|
18
|
+
<fileNotFoundPage>FileNotFound</fileNotFoundPage>
|
|
19
|
+
<genericErrorPage>Exception</genericErrorPage>
|
|
20
|
+
<inMaintenancePage>InMaintenance</inMaintenancePage>
|
|
21
|
+
<indexPage>CommunitiesLanding</indexPage>
|
|
22
|
+
<masterLabel>appreactb2csample</masterLabel>
|
|
23
|
+
<redirectToCustomDomain>false</redirectToCustomDomain>
|
|
24
|
+
<referrerPolicyOriginWhenCrossOrigin>true</referrerPolicyOriginWhenCrossOrigin>
|
|
25
|
+
<selfRegPage>CommunitiesSelfReg</selfRegPage>
|
|
26
|
+
<!-- <serverIsDown>SNA_U2rxy_sf_default_cdn_byo1</serverIsDown> -->
|
|
27
|
+
<!-- <siteAdmin>epic.out.d1d3a2d722c8@orgfarm.salesforce.com</siteAdmin> -->
|
|
28
|
+
<!-- <siteGuestRecordDefaultOwner>epic.out.d1d3a2d722c8@orgfarm.salesforce.com</siteGuestRecordDefaultOwner> -->
|
|
29
|
+
<siteType>ChatterNetwork</siteType>
|
|
30
|
+
<urlPathPrefix>appreactb2csamplevforcesite</urlPathPrefix>
|
|
31
|
+
</CustomSite>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<WebApplication xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<masterLabel>appreactb2csample</masterLabel>
|
|
4
|
+
<description>A Salesforce web application.</description>
|
|
5
|
+
<isActive>true</isActive>
|
|
6
|
+
<version>1</version>
|
|
7
|
+
</WebApplication>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { resolve } from 'path';
|
|
5
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
6
|
+
import salesforce from '@salesforce/vite-plugin-webapp-experimental';
|
|
7
|
+
export default defineConfig(function (_a) {
|
|
8
|
+
var mode = _a.mode;
|
|
9
|
+
return {
|
|
10
|
+
plugins: [tailwindcss(), react(), salesforce()],
|
|
11
|
+
// Build configuration for MPA
|
|
12
|
+
build: {
|
|
13
|
+
outDir: resolve(__dirname, 'dist'),
|
|
14
|
+
assetsDir: 'assets',
|
|
15
|
+
sourcemap: false,
|
|
16
|
+
},
|
|
17
|
+
// Resolve aliases (shared between build and test)
|
|
18
|
+
resolve: {
|
|
19
|
+
dedupe: ['react', 'react-dom'],
|
|
20
|
+
alias: {
|
|
21
|
+
'@': path.resolve(__dirname, './src'),
|
|
22
|
+
'@api': path.resolve(__dirname, './src/api'),
|
|
23
|
+
'@components': path.resolve(__dirname, './src/components'),
|
|
24
|
+
'@utils': path.resolve(__dirname, './src/utils'),
|
|
25
|
+
'@styles': path.resolve(__dirname, './src/styles'),
|
|
26
|
+
'@assets': path.resolve(__dirname, './src/assets'),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
// Vitest configuration
|
|
30
|
+
test: {
|
|
31
|
+
// Override root for tests (build uses src/pages as root)
|
|
32
|
+
root: resolve(__dirname),
|
|
33
|
+
// Use jsdom environment for React component testing
|
|
34
|
+
environment: 'jsdom',
|
|
35
|
+
// Setup files to run before each test
|
|
36
|
+
setupFiles: ['./src/test/setup.ts'],
|
|
37
|
+
// Global test patterns
|
|
38
|
+
include: [
|
|
39
|
+
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
40
|
+
'src/**/__tests__/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
41
|
+
],
|
|
42
|
+
// Coverage configuration
|
|
43
|
+
coverage: {
|
|
44
|
+
provider: 'v8',
|
|
45
|
+
reporter: ['text', 'html', 'clover', 'json'],
|
|
46
|
+
exclude: [
|
|
47
|
+
'node_modules/',
|
|
48
|
+
'src/test/',
|
|
49
|
+
'src/**/*.d.ts',
|
|
50
|
+
'src/main.tsx',
|
|
51
|
+
'src/vite-env.d.ts',
|
|
52
|
+
'src/components/**/index.ts',
|
|
53
|
+
'**/*.config.ts',
|
|
54
|
+
'build/',
|
|
55
|
+
'dist/',
|
|
56
|
+
'coverage/',
|
|
57
|
+
'eslint.config.js',
|
|
58
|
+
],
|
|
59
|
+
thresholds: {
|
|
60
|
+
global: {
|
|
61
|
+
branches: 85,
|
|
62
|
+
functions: 85,
|
|
63
|
+
lines: 85,
|
|
64
|
+
statements: 85,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
// Test timeout
|
|
69
|
+
testTimeout: 10000,
|
|
70
|
+
// Globals for easier testing
|
|
71
|
+
globals: true,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
test.describe('base-react-app', () => {
|
|
4
|
+
test('home page loads and shows welcome content', async ({ page }) => {
|
|
5
|
+
await page.goto('/');
|
|
6
|
+
await expect(page.getByRole('heading', { name: 'Home' })).toBeVisible();
|
|
7
|
+
await expect(
|
|
8
|
+
page.getByText('Welcome to your React application.')
|
|
9
|
+
).toBeVisible();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test('about page loads', async ({ page }) => {
|
|
13
|
+
await page.goto('/about');
|
|
14
|
+
await expect(page).toHaveURL(/\/about/);
|
|
15
|
+
await expect(page.getByRole('heading', { name: 'About' })).toBeVisible();
|
|
16
|
+
await expect(page.getByText('This is the about page.')).toBeVisible();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
test('not found route shows 404', async ({ page }) => {
|
|
20
|
+
await page.goto('/non-existent-route');
|
|
21
|
+
await expect(page.getByRole('heading', { name: '404' })).toBeVisible();
|
|
22
|
+
await expect(page.getByText('Page not found')).toBeVisible();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
3
|
+
import tsparser from '@typescript-eslint/parser';
|
|
4
|
+
import react from 'eslint-plugin-react';
|
|
5
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
6
|
+
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
7
|
+
import globals from 'globals';
|
|
8
|
+
|
|
9
|
+
export default [
|
|
10
|
+
// Global ignores
|
|
11
|
+
{
|
|
12
|
+
ignores: ['build/**/*', 'dist/**/*', 'coverage/**/*'],
|
|
13
|
+
},
|
|
14
|
+
// Config files and build tools (first to avoid inheritance)
|
|
15
|
+
{
|
|
16
|
+
files: ['*.config.{js,ts}', 'vite.config.ts'],
|
|
17
|
+
languageOptions: {
|
|
18
|
+
parser: tsparser,
|
|
19
|
+
parserOptions: {
|
|
20
|
+
ecmaVersion: 'latest',
|
|
21
|
+
sourceType: 'module',
|
|
22
|
+
},
|
|
23
|
+
globals: {
|
|
24
|
+
...globals.node,
|
|
25
|
+
__dirname: 'readonly',
|
|
26
|
+
process: 'readonly',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
plugins: {
|
|
30
|
+
'@typescript-eslint': tseslint,
|
|
31
|
+
},
|
|
32
|
+
rules: {
|
|
33
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
// Main TypeScript/React files
|
|
37
|
+
{
|
|
38
|
+
files: ['**/*.{ts,tsx}'],
|
|
39
|
+
ignores: [
|
|
40
|
+
'coverage',
|
|
41
|
+
'dist',
|
|
42
|
+
'node_modules',
|
|
43
|
+
'build',
|
|
44
|
+
'*.config.{js,ts}',
|
|
45
|
+
'vite.config.ts',
|
|
46
|
+
],
|
|
47
|
+
languageOptions: {
|
|
48
|
+
ecmaVersion: 2020,
|
|
49
|
+
sourceType: 'module',
|
|
50
|
+
parser: tsparser,
|
|
51
|
+
parserOptions: {
|
|
52
|
+
ecmaFeatures: {
|
|
53
|
+
jsx: true,
|
|
54
|
+
},
|
|
55
|
+
ecmaVersion: 'latest',
|
|
56
|
+
sourceType: 'module',
|
|
57
|
+
project: './tsconfig.json',
|
|
58
|
+
},
|
|
59
|
+
globals: {
|
|
60
|
+
...globals.browser,
|
|
61
|
+
JSX: 'readonly',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
plugins: {
|
|
65
|
+
react,
|
|
66
|
+
'react-hooks': reactHooks,
|
|
67
|
+
'react-refresh': reactRefresh,
|
|
68
|
+
'@typescript-eslint': tseslint,
|
|
69
|
+
},
|
|
70
|
+
rules: {
|
|
71
|
+
...js.configs.recommended.rules,
|
|
72
|
+
...tseslint.configs.recommended.rules,
|
|
73
|
+
...react.configs.recommended.rules,
|
|
74
|
+
...reactHooks.configs.recommended.rules,
|
|
75
|
+
'react/react-in-jsx-scope': 'off',
|
|
76
|
+
'react/prop-types': 'off',
|
|
77
|
+
'react/jsx-no-comment-textnodes': 'off',
|
|
78
|
+
'react/no-unescaped-entities': 'off',
|
|
79
|
+
'@typescript-eslint/no-unused-vars': [
|
|
80
|
+
'error',
|
|
81
|
+
{ argsIgnorePattern: '^_' },
|
|
82
|
+
],
|
|
83
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
84
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
85
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
86
|
+
},
|
|
87
|
+
settings: {
|
|
88
|
+
react: {
|
|
89
|
+
version: 'detect',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
// Test files
|
|
94
|
+
{
|
|
95
|
+
files: [
|
|
96
|
+
'**/*.test.{ts,tsx}',
|
|
97
|
+
'**/test/**/*.{ts,tsx}',
|
|
98
|
+
'src/test/**/*.{ts,tsx}',
|
|
99
|
+
],
|
|
100
|
+
languageOptions: {
|
|
101
|
+
parser: tsparser,
|
|
102
|
+
globals: {
|
|
103
|
+
...globals.browser,
|
|
104
|
+
...globals.node,
|
|
105
|
+
global: 'writable',
|
|
106
|
+
JSX: 'readonly',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
rules: {
|
|
110
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>ZENLEASE</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"><p style="padding: 1rem; font-family: system-ui">Loading…</p></div>
|
|
11
|
+
<script type="module" src="/src/app.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|