-
-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 20240929102850 Deleted all files in the main branch in anticipation of merging develop into main cleanly * 20240929103238 Merge develop into main
- Loading branch information
1 parent
15c8753
commit 30c1d18
Showing
396 changed files
with
31,389 additions
and
32,653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,6 @@ reviews: | |
drafts: false | ||
base_branches: | ||
- develop | ||
- main | ||
chat: | ||
auto_reply: true | ||
auto_reply: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import fs from 'fs/promises'; // Import fs.promises for async operations | ||
import path from 'path'; | ||
|
||
// List of files to skip | ||
const filesToSkip = [ | ||
'index.tsx', | ||
'EventActionItems.tsx', | ||
'OrgPostCard.tsx', | ||
'UsersTableItem.tsx', | ||
'FundCampaignPledge.tsx' | ||
]; | ||
|
||
// Recursively find all .tsx files, excluding files listed in filesToSkip | ||
async function findTsxFiles(dir) { | ||
let results = []; | ||
try { | ||
const list = await fs.readdir(dir); | ||
for (const file of list) { | ||
const filePath = path.join(dir, file); | ||
const stat = await fs.stat(filePath); | ||
if (stat.isDirectory()) { | ||
results = results.concat(await findTsxFiles(filePath)); | ||
} else if ( | ||
filePath.endsWith('.tsx') && | ||
!filePath.endsWith('.test.tsx') && | ||
!filesToSkip.includes(path.relative(dir, filePath)) | ||
) { | ||
results.push(filePath); | ||
} | ||
} | ||
} catch (err) { | ||
console.error(`Error reading directory ${dir}: ${err.message}`); | ||
} | ||
return results; | ||
} | ||
|
||
// Check if a file contains at least one TSDoc comment | ||
async function containsTsDocComment(filePath) { | ||
try { | ||
const content = await fs.readFile(filePath, 'utf8'); | ||
return /\/\*\*[\s\S]*?\*\//.test(content); | ||
} catch (err) { | ||
console.error(`Error reading file ${filePath}: ${err.message}`); | ||
return false; | ||
} | ||
} | ||
|
||
// Main function to run the validation | ||
async function run() { | ||
const dir = process.argv[2] || './src'; // Allow directory path as a command-line argument | ||
const files = await findTsxFiles(dir); | ||
const filesWithoutTsDoc = []; | ||
|
||
for (const file of files) { | ||
if (!await containsTsDocComment(file)) { | ||
filesWithoutTsDoc.push(file); | ||
} | ||
} | ||
|
||
if (filesWithoutTsDoc.length > 0) { | ||
filesWithoutTsDoc.forEach(file => { | ||
console.error(`No TSDoc comment found in file: ${file}`); | ||
}); | ||
process.exit(1); | ||
} | ||
} | ||
|
||
run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v20.10.0 | ||
v22.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
presets: [ | ||
'@babel/preset-env', // Transforms modern JavaScript | ||
'@babel/preset-typescript', // Transforms TypeScript | ||
'@babel/preset-react', // Transforms JSX | ||
], | ||
plugins: ['babel-plugin-transform-import-meta'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import viteTsconfigPaths from 'vite-tsconfig-paths'; | ||
import svgrPlugin from 'vite-plugin-svgr'; | ||
import EnvironmentPlugin from 'vite-plugin-environment'; | ||
|
||
export default defineConfig({ | ||
// depending on your application, base can also be "/" | ||
build: { | ||
outDir: 'build', | ||
}, | ||
base: '', | ||
plugins: [ | ||
react(), | ||
viteTsconfigPaths(), | ||
EnvironmentPlugin('all'), | ||
svgrPlugin({ | ||
svgrOptions: { | ||
icon: true, | ||
// ...svgr options (https://react-svgr.com/docs/options/) | ||
}, | ||
}), | ||
], | ||
server: { | ||
// this ensures that the browser opens upon server start | ||
open: true, | ||
// this sets a default port to 3000 | ||
port: 4321, | ||
}, | ||
}); |
Oops, something went wrong.