@salesforce/webapp-template-app-react-template-b2e-experimental 1.36.3
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 +67 -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 +533 -0
- package/dist/README.md +18 -0
- package/dist/config/project-scratch-def.json +13 -0
- package/dist/force-app/main/default/classes/WebAppAuthUtils.cls +68 -0
- package/dist/force-app/main/default/classes/WebAppAuthUtils.cls-meta.xml +5 -0
- package/dist/force-app/main/default/classes/WebAppChangePassword.cls +77 -0
- package/dist/force-app/main/default/classes/WebAppChangePassword.cls-meta.xml +5 -0
- package/dist/force-app/main/default/classes/WebAppForgotPassword.cls +71 -0
- package/dist/force-app/main/default/classes/WebAppForgotPassword.cls-meta.xml +5 -0
- package/dist/force-app/main/default/classes/WebAppLogin.cls +97 -0
- package/dist/force-app/main/default/classes/WebAppLogin.cls-meta.xml +5 -0
- package/dist/force-app/main/default/classes/WebAppRegistration.cls +162 -0
- package/dist/force-app/main/default/classes/WebAppRegistration.cls-meta.xml +5 -0
- package/dist/force-app/main/default/digitalExperienceConfigs/appreacttemplateb2e1.digitalExperienceConfig +8 -0
- package/dist/force-app/main/default/digitalExperiences/site/appreacttemplateb2e1/appreacttemplateb2e1.digitalExperience-meta.xml +11 -0
- package/dist/force-app/main/default/digitalExperiences/site/appreacttemplateb2e1/sfdc_cms__site/appreacttemplateb2e1/_meta.json +5 -0
- package/dist/force-app/main/default/digitalExperiences/site/appreacttemplateb2e1/sfdc_cms__site/appreacttemplateb2e1/content.json +10 -0
- package/dist/force-app/main/default/networks/appreacttemplateb2e.network +60 -0
- package/dist/force-app/main/default/package.xml +20 -0
- package/dist/force-app/main/default/sites/appreacttemplateb2e.site +31 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/.graphqlrc.yml +2 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/.prettierignore +9 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/.prettierrc +11 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/appreacttemplateb2e.webapplication-meta.xml +7 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.d.ts +2 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.js +94 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/codegen.yml +12 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/e2e/app.spec.ts +24 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/eslint.config.js +141 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/index.html +13 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/package-lock.json +13980 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/package.json +66 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/playwright.config.ts +24 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/scripts/get-graphql-schema.mjs +68 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/scripts/rewrite-e2e-assets.mjs +23 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/api/graphql-operations-types.ts +129 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/accounts.ts +33 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/app.tsx +16 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/appLayout.tsx +11 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/book.svg +3 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/copy.svg +4 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/rocket.svg +3 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/star.svg +3 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-1.png +0 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-2.png +0 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-3.png +0 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/vibe-codey.svg +194 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/alerts/status-alert.tsx +45 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/auth/authentication-route.tsx +21 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/auth/private-route.tsx +36 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/footers/footer-link.tsx +36 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/forms/auth-form.tsx +81 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/forms/submit-button.tsx +49 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/layout/card-layout.tsx +23 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/layout/centered-page-layout.tsx +73 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/layout/loading-page.tsx +46 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/alert.tsx +65 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/button.tsx +54 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/card.tsx +77 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/field.tsx +111 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/index.ts +71 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/input.tsx +19 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/label.tsx +19 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/pagination.tsx +99 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/select.tsx +151 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/skeleton.tsx +7 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/spinner.tsx +26 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/table.tsx +114 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/components/ui/tabs.tsx +115 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/context/AuthContext.tsx +83 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/hooks/form.tsx +116 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/lib/utils.ts +6 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/navigationMenu.tsx +81 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/About.tsx +12 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/ChangePassword.tsx +98 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/ForgotPassword.tsx +67 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Home.tsx +12 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Login.tsx +89 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/NotFound.tsx +18 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Profile.tsx +146 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Register.tsx +130 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/ResetPassword.tsx +101 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/new.tsx +10 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/router-utils.tsx +34 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/routes.tsx +88 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/styles/global.css +94 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/utils/authenticationConfig.ts +52 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/src/utils/helpers.ts +187 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.json +36 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.node.json +13 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/vite-env.d.ts +1 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/vite.config.ts +102 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/vitest-env.d.ts +2 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/vitest.config.ts +11 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/vitest.setup.ts +1 -0
- package/dist/force-app/main/default/webapplications/appreacttemplateb2e/webapplication.json +7 -0
- package/dist/jest.config.js +6 -0
- package/dist/package.json +38 -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 +37 -0
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
import codegen from 'vite-plugin-graphql-codegen';
|
|
8
|
+
|
|
9
|
+
export default defineConfig(function (_a) {
|
|
10
|
+
var mode = _a.mode;
|
|
11
|
+
return {
|
|
12
|
+
// Ensure root base for e2e/static serve; plugin may override when deployed under a path
|
|
13
|
+
base: '/',
|
|
14
|
+
plugins: [
|
|
15
|
+
tailwindcss(),
|
|
16
|
+
react(),
|
|
17
|
+
salesforce(),
|
|
18
|
+
codegen({
|
|
19
|
+
// Path to the codegen config file
|
|
20
|
+
configFilePathOverride: resolve(__dirname, 'codegen.yml'),
|
|
21
|
+
// Run codegen on dev server start
|
|
22
|
+
runOnStart: true,
|
|
23
|
+
// Don't run codegen on build for now
|
|
24
|
+
runOnBuild: false,
|
|
25
|
+
// Enable file watcher during development
|
|
26
|
+
enableWatcher: true,
|
|
27
|
+
// Fail build if codegen errors
|
|
28
|
+
throwOnBuild: true,
|
|
29
|
+
}),
|
|
30
|
+
],
|
|
31
|
+
// Build configuration for MPA
|
|
32
|
+
build: {
|
|
33
|
+
outDir: resolve(__dirname, 'dist'),
|
|
34
|
+
assetsDir: 'assets',
|
|
35
|
+
sourcemap: false,
|
|
36
|
+
},
|
|
37
|
+
// Resolve aliases (shared between build and test)
|
|
38
|
+
resolve: {
|
|
39
|
+
dedupe: ['react', 'react-dom'],
|
|
40
|
+
alias: {
|
|
41
|
+
'@': path.resolve(__dirname, './src'),
|
|
42
|
+
'@api': path.resolve(__dirname, './src/api'),
|
|
43
|
+
'@components': path.resolve(__dirname, './src/components'),
|
|
44
|
+
'@utils': path.resolve(__dirname, './src/utils'),
|
|
45
|
+
'@styles': path.resolve(__dirname, './src/styles'),
|
|
46
|
+
'@assets': path.resolve(__dirname, './src/assets'),
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
// Vitest configuration
|
|
50
|
+
test: {
|
|
51
|
+
// Override root for tests (build uses src/pages as root)
|
|
52
|
+
root: resolve(__dirname),
|
|
53
|
+
// Use jsdom environment for React component testing
|
|
54
|
+
environment: 'jsdom',
|
|
55
|
+
// Setup files to run before each test
|
|
56
|
+
setupFiles: ['./src/test/setup.ts'],
|
|
57
|
+
// Global test patterns
|
|
58
|
+
include: [
|
|
59
|
+
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
60
|
+
'src/**/__tests__/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
61
|
+
],
|
|
62
|
+
// Coverage configuration
|
|
63
|
+
coverage: {
|
|
64
|
+
provider: 'v8',
|
|
65
|
+
reporter: ['text', 'html', 'clover', 'json'],
|
|
66
|
+
exclude: [
|
|
67
|
+
'node_modules/',
|
|
68
|
+
'src/test/',
|
|
69
|
+
'src/**/*.d.ts',
|
|
70
|
+
'src/main.tsx',
|
|
71
|
+
'src/vite-env.d.ts',
|
|
72
|
+
'src/components/**/index.ts',
|
|
73
|
+
'**/*.config.ts',
|
|
74
|
+
'build/',
|
|
75
|
+
'dist/',
|
|
76
|
+
'coverage/',
|
|
77
|
+
'eslint.config.js',
|
|
78
|
+
],
|
|
79
|
+
thresholds: {
|
|
80
|
+
global: {
|
|
81
|
+
branches: 85,
|
|
82
|
+
functions: 85,
|
|
83
|
+
lines: 85,
|
|
84
|
+
statements: 85,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
// Test timeout
|
|
89
|
+
testTimeout: 10000,
|
|
90
|
+
// Globals for easier testing
|
|
91
|
+
globals: true,
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
schema: '../../../../../schema.graphql'
|
|
2
|
+
documents: 'src/**/*.{graphql,ts,tsx}'
|
|
3
|
+
generates:
|
|
4
|
+
src/api/graphql-operations-types.ts:
|
|
5
|
+
plugins:
|
|
6
|
+
- 'graphql-codegen-typescript-operation-types'
|
|
7
|
+
- 'typescript-operations'
|
|
8
|
+
config:
|
|
9
|
+
onlyOperationTypes: true
|
|
10
|
+
skipTypename: true
|
|
11
|
+
preResolveTypes: true
|
|
12
|
+
overwrite: true
|
|
@@ -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,141 @@
|
|
|
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
|
+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
|
|
9
|
+
|
|
10
|
+
export default [
|
|
11
|
+
// Global ignores
|
|
12
|
+
{
|
|
13
|
+
ignores: ['build/**/*', 'dist/**/*', 'coverage/**/*'],
|
|
14
|
+
},
|
|
15
|
+
// Config files and build tools (first to avoid inheritance)
|
|
16
|
+
{
|
|
17
|
+
files: ['*.config.{js,ts}', 'vite.config.ts'],
|
|
18
|
+
languageOptions: {
|
|
19
|
+
parser: tsparser,
|
|
20
|
+
parserOptions: {
|
|
21
|
+
ecmaVersion: 'latest',
|
|
22
|
+
sourceType: 'module',
|
|
23
|
+
},
|
|
24
|
+
globals: {
|
|
25
|
+
...globals.node,
|
|
26
|
+
__dirname: 'readonly',
|
|
27
|
+
process: 'readonly',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
plugins: {
|
|
31
|
+
'@typescript-eslint': tseslint,
|
|
32
|
+
},
|
|
33
|
+
rules: {
|
|
34
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
// Main TypeScript/React files
|
|
38
|
+
{
|
|
39
|
+
files: ['**/*.{ts,tsx}'],
|
|
40
|
+
ignores: [
|
|
41
|
+
'coverage',
|
|
42
|
+
'dist',
|
|
43
|
+
'node_modules',
|
|
44
|
+
'build',
|
|
45
|
+
'*.config.{js,ts}',
|
|
46
|
+
'vite.config.ts',
|
|
47
|
+
],
|
|
48
|
+
languageOptions: {
|
|
49
|
+
ecmaVersion: 2020,
|
|
50
|
+
sourceType: 'module',
|
|
51
|
+
parser: tsparser,
|
|
52
|
+
parserOptions: {
|
|
53
|
+
ecmaFeatures: {
|
|
54
|
+
jsx: true,
|
|
55
|
+
},
|
|
56
|
+
ecmaVersion: 'latest',
|
|
57
|
+
sourceType: 'module',
|
|
58
|
+
project: './tsconfig.json',
|
|
59
|
+
},
|
|
60
|
+
globals: {
|
|
61
|
+
...globals.browser,
|
|
62
|
+
JSX: 'readonly',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
plugins: {
|
|
66
|
+
react,
|
|
67
|
+
'react-hooks': reactHooks,
|
|
68
|
+
'react-refresh': reactRefresh,
|
|
69
|
+
'@typescript-eslint': tseslint,
|
|
70
|
+
},
|
|
71
|
+
rules: {
|
|
72
|
+
...js.configs.recommended.rules,
|
|
73
|
+
...tseslint.configs.recommended.rules,
|
|
74
|
+
...react.configs.recommended.rules,
|
|
75
|
+
...reactHooks.configs.recommended.rules,
|
|
76
|
+
'react/react-in-jsx-scope': 'off',
|
|
77
|
+
'react/prop-types': 'off',
|
|
78
|
+
'react/jsx-no-comment-textnodes': 'off',
|
|
79
|
+
'react/no-unescaped-entities': 'off',
|
|
80
|
+
'@typescript-eslint/no-unused-vars': [
|
|
81
|
+
'error',
|
|
82
|
+
{ argsIgnorePattern: '^_' },
|
|
83
|
+
],
|
|
84
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
85
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
86
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
87
|
+
},
|
|
88
|
+
settings: {
|
|
89
|
+
react: {
|
|
90
|
+
version: 'detect',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
// Test files
|
|
95
|
+
{
|
|
96
|
+
files: [
|
|
97
|
+
'**/*.test.{ts,tsx}',
|
|
98
|
+
'**/test/**/*.{ts,tsx}',
|
|
99
|
+
'src/test/**/*.{ts,tsx}',
|
|
100
|
+
],
|
|
101
|
+
languageOptions: {
|
|
102
|
+
parser: tsparser,
|
|
103
|
+
globals: {
|
|
104
|
+
...globals.browser,
|
|
105
|
+
...globals.node,
|
|
106
|
+
global: 'writable',
|
|
107
|
+
JSX: 'readonly',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
rules: {
|
|
111
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
// GraphQL processor - extracts GraphQL from gql template literals in TS/TSX files
|
|
115
|
+
{
|
|
116
|
+
files: ['**/*.{ts,tsx}'],
|
|
117
|
+
processor: graphqlPlugin.processor,
|
|
118
|
+
},
|
|
119
|
+
// GraphQL linting configuration for .graphql files
|
|
120
|
+
{
|
|
121
|
+
files: ['**/*.graphql'],
|
|
122
|
+
languageOptions: {
|
|
123
|
+
parser: graphqlPlugin.parser,
|
|
124
|
+
parserOptions: {
|
|
125
|
+
graphQLConfig: {
|
|
126
|
+
schema: '../../../../../schema.graphql',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
plugins: {
|
|
131
|
+
'@graphql-eslint': graphqlPlugin,
|
|
132
|
+
},
|
|
133
|
+
rules: {
|
|
134
|
+
'@graphql-eslint/no-anonymous-operations': 'error',
|
|
135
|
+
'@graphql-eslint/no-duplicate-fields': 'error',
|
|
136
|
+
'@graphql-eslint/known-fragment-names': 'error',
|
|
137
|
+
'@graphql-eslint/no-undefined-variables': 'error',
|
|
138
|
+
'@graphql-eslint/no-unused-variables': 'error',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
];
|
|
@@ -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>Welcome to React App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/app.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|