@salesforce/webapp-template-feature-react-file-upload-experimental 1.55.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.
Files changed (126) hide show
  1. package/LICENSE.txt +82 -0
  2. package/README.md +102 -0
  3. package/dist/.a4drules/README.md +35 -0
  4. package/dist/.a4drules/a4d-webapp-generate.md +27 -0
  5. package/dist/.a4drules/build-validation.md +78 -0
  6. package/dist/.a4drules/code-quality.md +137 -0
  7. package/dist/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
  8. package/dist/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
  9. package/dist/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
  10. package/dist/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
  11. package/dist/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
  12. package/dist/.a4drules/graphql.md +409 -0
  13. package/dist/.a4drules/images.md +13 -0
  14. package/dist/.a4drules/react.md +387 -0
  15. package/dist/.a4drules/react_image_processing.md +45 -0
  16. package/dist/.a4drules/typescript.md +224 -0
  17. package/dist/.a4drules/ui-layout.md +23 -0
  18. package/dist/.a4drules/webapp-nav-and-placeholders.md +33 -0
  19. package/dist/.a4drules/webapp-no-node-e.md +25 -0
  20. package/dist/.a4drules/webapp-ui-first.md +32 -0
  21. package/dist/.a4drules/webapp.md +75 -0
  22. package/dist/.forceignore +15 -0
  23. package/dist/.husky/pre-commit +4 -0
  24. package/dist/.prettierignore +11 -0
  25. package/dist/.prettierrc +17 -0
  26. package/dist/AGENT.md +75 -0
  27. package/dist/CHANGELOG.md +803 -0
  28. package/dist/README.md +18 -0
  29. package/dist/config/project-scratch-def.json +13 -0
  30. package/dist/force-app/main/default/webapplications/feature-react-file-upload/.graphqlrc.yml +2 -0
  31. package/dist/force-app/main/default/webapplications/feature-react-file-upload/.prettierignore +9 -0
  32. package/dist/force-app/main/default/webapplications/feature-react-file-upload/.prettierrc +11 -0
  33. package/dist/force-app/main/default/webapplications/feature-react-file-upload/build/vite.config.d.ts +2 -0
  34. package/dist/force-app/main/default/webapplications/feature-react-file-upload/build/vite.config.js +93 -0
  35. package/dist/force-app/main/default/webapplications/feature-react-file-upload/codegen.yml +94 -0
  36. package/dist/force-app/main/default/webapplications/feature-react-file-upload/e2e/app.spec.ts +17 -0
  37. package/dist/force-app/main/default/webapplications/feature-react-file-upload/eslint.config.js +141 -0
  38. package/dist/force-app/main/default/webapplications/feature-react-file-upload/feature-react-file-upload.webapplication-meta.xml +7 -0
  39. package/dist/force-app/main/default/webapplications/feature-react-file-upload/index.html +13 -0
  40. package/dist/force-app/main/default/webapplications/feature-react-file-upload/package-lock.json +18396 -0
  41. package/dist/force-app/main/default/webapplications/feature-react-file-upload/package.json +66 -0
  42. package/dist/force-app/main/default/webapplications/feature-react-file-upload/playwright.config.ts +24 -0
  43. package/dist/force-app/main/default/webapplications/feature-react-file-upload/scripts/get-graphql-schema.mjs +68 -0
  44. package/dist/force-app/main/default/webapplications/feature-react-file-upload/scripts/rewrite-e2e-assets.mjs +23 -0
  45. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/api/fileUpload.ts +154 -0
  46. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/api/graphql-operations-types.ts +116 -0
  47. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/api/utils/accounts.ts +41 -0
  48. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
  49. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/app.tsx +22 -0
  50. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/appLayout.tsx +9 -0
  51. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/icons/book.svg +3 -0
  52. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/icons/copy.svg +4 -0
  53. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/icons/rocket.svg +3 -0
  54. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/icons/star.svg +3 -0
  55. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/images/codey-1.png +0 -0
  56. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/images/codey-2.png +0 -0
  57. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/images/codey-3.png +0 -0
  58. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/images/vibe-codey.svg +194 -0
  59. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/symbols.svg +1 -0
  60. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/assets/utility.svg +1 -0
  61. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUpload.tsx +83 -0
  62. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUploadDialog.tsx +79 -0
  63. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUploadDropZone.tsx +82 -0
  64. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUploadFileItem.tsx +99 -0
  65. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUploadIcons.tsx +58 -0
  66. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/alert.tsx +69 -0
  67. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/button.tsx +67 -0
  68. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/card.tsx +92 -0
  69. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/dialog.tsx +143 -0
  70. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/field.tsx +222 -0
  71. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/index.ts +84 -0
  72. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/input.tsx +19 -0
  73. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/label.tsx +19 -0
  74. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/pagination.tsx +112 -0
  75. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/select.tsx +183 -0
  76. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/separator.tsx +26 -0
  77. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/skeleton.tsx +14 -0
  78. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/spinner.tsx +15 -0
  79. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/table.tsx +87 -0
  80. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components/ui/tabs.tsx +78 -0
  81. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/components.json +18 -0
  82. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/hooks/useFileUpload.ts +299 -0
  83. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/hooks/useFileUploadDialog.ts +70 -0
  84. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/index.ts +56 -0
  85. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/lib/utils.ts +6 -0
  86. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/navigationMenu.tsx +80 -0
  87. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/pages/Home.tsx +25 -0
  88. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/pages/NotFound.tsx +18 -0
  89. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/router-utils.tsx +35 -0
  90. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/routes.tsx +22 -0
  91. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/styles/global.css +135 -0
  92. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/types/fileUpload.ts +26 -0
  93. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/utils/fileUploadUtils.ts +44 -0
  94. package/dist/force-app/main/default/webapplications/feature-react-file-upload/src/utils/labels.ts +21 -0
  95. package/dist/force-app/main/default/webapplications/feature-react-file-upload/tsconfig.json +36 -0
  96. package/dist/force-app/main/default/webapplications/feature-react-file-upload/tsconfig.node.json +13 -0
  97. package/dist/force-app/main/default/webapplications/feature-react-file-upload/vite-env.d.ts +1 -0
  98. package/dist/force-app/main/default/webapplications/feature-react-file-upload/vite.config.ts +43 -0
  99. package/dist/force-app/main/default/webapplications/feature-react-file-upload/vitest-env.d.ts +2 -0
  100. package/dist/force-app/main/default/webapplications/feature-react-file-upload/vitest.config.ts +11 -0
  101. package/dist/force-app/main/default/webapplications/feature-react-file-upload/vitest.setup.ts +1 -0
  102. package/dist/force-app/main/default/webapplications/feature-react-file-upload/webapplication.json +7 -0
  103. package/dist/jest.config.js +6 -0
  104. package/dist/package.json +38 -0
  105. package/dist/scripts/apex/hello.apex +10 -0
  106. package/dist/scripts/soql/account.soql +6 -0
  107. package/dist/sfdx-project.json +12 -0
  108. package/package.json +53 -0
  109. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/api/fileUpload.ts +154 -0
  110. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/appLayout.tsx +9 -0
  111. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/assets/symbols.svg +1 -0
  112. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/assets/utility.svg +1 -0
  113. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUpload.tsx +83 -0
  114. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUploadDialog.tsx +79 -0
  115. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUploadDropZone.tsx +82 -0
  116. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUploadFileItem.tsx +99 -0
  117. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/components/FileUploadIcons.tsx +58 -0
  118. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/hooks/useFileUpload.ts +299 -0
  119. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/hooks/useFileUploadDialog.ts +70 -0
  120. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/index.ts +56 -0
  121. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/pages/Home.tsx +25 -0
  122. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/routes.tsx +17 -0
  123. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/types/fileUpload.ts +26 -0
  124. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/utils/fileUploadUtils.ts +44 -0
  125. package/src/force-app/main/default/webapplications/feature-react-file-upload/src/utils/labels.ts +21 -0
  126. package/src/force-app/main/default/webapplications/feature-react-file-upload/vite.config.ts +43 -0
package/dist/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # Salesforce DX Project: Next Steps
2
+
3
+ Now that you’ve created a Salesforce DX project, what’s next? Here are some documentation resources to get you started.
4
+
5
+ ## How Do You Plan to Deploy Your Changes?
6
+
7
+ Do you want to deploy a set of changes, or create a self-contained application? Choose a [development model](https://developer.salesforce.com/tools/vscode/en/user-guide/development-models).
8
+
9
+ ## Configure Your Salesforce DX Project
10
+
11
+ The `sfdx-project.json` file contains useful configuration information for your project. See [Salesforce DX Project Configuration](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm) in the _Salesforce DX Developer Guide_ for details about this file.
12
+
13
+ ## Read All About It
14
+
15
+ - [Salesforce Extensions Documentation](https://developer.salesforce.com/tools/vscode/)
16
+ - [Salesforce CLI Setup Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm)
17
+ - [Salesforce DX Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm)
18
+ - [Salesforce CLI Command Reference](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm)
@@ -0,0 +1,13 @@
1
+ {
2
+ "orgName": "My Saleforce Org",
3
+ "edition": "Developer",
4
+ "features": ["EnableSetPasswordInApi"],
5
+ "settings": {
6
+ "lightningExperienceSettings": {
7
+ "enableS1DesktopEnabled": true
8
+ },
9
+ "mobileSettings": {
10
+ "enableS1EncryptedStoragePref2": false
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,2 @@
1
+ schema: '../../../../../schema.graphql'
2
+ documents: 'src/**/*.{graphql,js,ts,jsx,tsx}'
@@ -0,0 +1,9 @@
1
+ node_modules
2
+ dist
3
+ build
4
+ .vite
5
+ coverage
6
+ *.min.js
7
+ *.min.css
8
+ *.map
9
+ package-lock.json
@@ -0,0 +1,11 @@
1
+ {
2
+ "semi": true,
3
+ "trailingComma": "es5",
4
+ "singleQuote": true,
5
+ "printWidth": 80,
6
+ "tabWidth": 2,
7
+ "useTabs": false,
8
+ "bracketSpacing": true,
9
+ "arrowParens": "avoid",
10
+ "endOfLine": "lf"
11
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfigFnObject;
2
+ export default _default;
@@ -0,0 +1,93 @@
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
+ export default defineConfig(function (_a) {
9
+ var mode = _a.mode;
10
+ return {
11
+ // Ensure root base for e2e/static serve; plugin may override when deployed under a path
12
+ base: '/',
13
+ plugins: [
14
+ tailwindcss(),
15
+ react(),
16
+ salesforce(),
17
+ codegen({
18
+ // Path to the codegen config file
19
+ configFilePathOverride: resolve(__dirname, 'codegen.yml'),
20
+ // Run codegen on dev server start
21
+ runOnStart: true,
22
+ // Don't run codegen on build for now
23
+ runOnBuild: false,
24
+ // Enable file watcher during development
25
+ enableWatcher: true,
26
+ // Fail build if codegen errors
27
+ throwOnBuild: true,
28
+ }),
29
+ ],
30
+ // Build configuration for MPA
31
+ build: {
32
+ outDir: resolve(__dirname, 'dist'),
33
+ assetsDir: 'assets',
34
+ sourcemap: false,
35
+ },
36
+ // Resolve aliases (shared between build and test)
37
+ resolve: {
38
+ dedupe: ['react', 'react-dom'],
39
+ alias: {
40
+ '@': path.resolve(__dirname, './src'),
41
+ '@api': path.resolve(__dirname, './src/api'),
42
+ '@components': path.resolve(__dirname, './src/components'),
43
+ '@utils': path.resolve(__dirname, './src/utils'),
44
+ '@styles': path.resolve(__dirname, './src/styles'),
45
+ '@assets': path.resolve(__dirname, './src/assets'),
46
+ },
47
+ },
48
+ // Vitest configuration
49
+ test: {
50
+ // Override root for tests (build uses src/pages as root)
51
+ root: resolve(__dirname),
52
+ // Use jsdom environment for React component testing
53
+ environment: 'jsdom',
54
+ // Setup files to run before each test
55
+ setupFiles: ['./src/test/setup.ts'],
56
+ // Global test patterns
57
+ include: [
58
+ 'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
59
+ 'src/**/__tests__/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
60
+ ],
61
+ // Coverage configuration
62
+ coverage: {
63
+ provider: 'v8',
64
+ reporter: ['text', 'html', 'clover', 'json'],
65
+ exclude: [
66
+ 'node_modules/',
67
+ 'src/test/',
68
+ 'src/**/*.d.ts',
69
+ 'src/main.tsx',
70
+ 'src/vite-env.d.ts',
71
+ 'src/components/**/index.ts',
72
+ '**/*.config.ts',
73
+ 'build/',
74
+ 'dist/',
75
+ 'coverage/',
76
+ 'eslint.config.js',
77
+ ],
78
+ thresholds: {
79
+ global: {
80
+ branches: 85,
81
+ functions: 85,
82
+ lines: 85,
83
+ statements: 85,
84
+ },
85
+ },
86
+ },
87
+ // Test timeout
88
+ testTimeout: 10000,
89
+ // Globals for easier testing
90
+ globals: true,
91
+ },
92
+ };
93
+ });
@@ -0,0 +1,94 @@
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
+ scalars:
13
+ # String-serialized scalars
14
+ JSON:
15
+ input: 'string'
16
+ output: 'string'
17
+ Date:
18
+ input: 'string'
19
+ output: 'string'
20
+ DateTime:
21
+ input: 'string'
22
+ output: 'string'
23
+ Time:
24
+ input: 'string'
25
+ output: 'string'
26
+ Email:
27
+ input: 'string'
28
+ output: 'string'
29
+ Url:
30
+ input: 'string'
31
+ output: 'string'
32
+ PhoneNumber:
33
+ input: 'string'
34
+ output: 'string'
35
+ Picklist:
36
+ input: 'string'
37
+ output: 'string'
38
+ MultiPicklist:
39
+ input: 'string'
40
+ output: 'string'
41
+ TextArea:
42
+ input: 'string'
43
+ output: 'string'
44
+ LongTextArea:
45
+ input: 'string'
46
+ output: 'string'
47
+ RichTextArea:
48
+ input: 'string'
49
+ output: 'string'
50
+ EncryptedString:
51
+ input: 'string'
52
+ output: 'string'
53
+ Base64:
54
+ input: 'string'
55
+ output: 'string'
56
+ IdOrRef:
57
+ input: 'string'
58
+ output: 'string'
59
+ # BigDecimal-serialized scalars (accepts number or string, returns number)
60
+ Currency:
61
+ input: 'number | string'
62
+ output: 'number'
63
+ BigDecimal:
64
+ input: 'number | string'
65
+ output: 'number'
66
+ Double:
67
+ input: 'number | string'
68
+ output: 'number'
69
+ Percent:
70
+ input: 'number | string'
71
+ output: 'number'
72
+ Longitude:
73
+ input: 'number | string'
74
+ output: 'number'
75
+ Latitude:
76
+ input: 'number | string'
77
+ output: 'number'
78
+ # Integer-like scalars
79
+ Long:
80
+ input: 'number'
81
+ output: 'number'
82
+ BigInteger:
83
+ input: 'number'
84
+ output: 'number'
85
+ Short:
86
+ input: 'number'
87
+ output: 'number'
88
+ Byte:
89
+ input: 'number'
90
+ output: 'number'
91
+ Char:
92
+ input: 'number'
93
+ output: 'number'
94
+ overwrite: true
@@ -0,0 +1,17 @@
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('not found route shows 404', async ({ page }) => {
13
+ await page.goto('/non-existent-route');
14
+ await expect(page.getByRole('heading', { name: '404' })).toBeVisible();
15
+ await expect(page.getByText('Page not found')).toBeVisible();
16
+ });
17
+ });
@@ -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,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <WebApplication xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <masterLabel>feature-react-file-upload</masterLabel>
4
+ <description>A Salesforce web application.</description>
5
+ <isActive>true</isActive>
6
+ <version>1</version>
7
+ </WebApplication>
@@ -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>