-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for .log and .json files
- Loading branch information
Showing
7 changed files
with
64 additions
and
51 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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
|
||
npx --no -- commitlint --edit ${1} && npm run lint |
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,24 +1,19 @@ | ||
const XLSX = require('xlsx'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
// Example data with sensitive information | ||
const data = [ | ||
{ Name: "John Doe", SSN: "123-45-6789", Email: "[email protected]" }, | ||
{ Name: "Jane Smith", SSN: "987-65-4321", Email: "[email protected]" } | ||
]; | ||
|
||
const worksheet = XLSX.utils.json_to_sheet(data); | ||
const workbook = XLSX.utils.book_new(); | ||
XLSX.utils.book_append_sheet(workbook, worksheet, "SensitiveData"); | ||
|
||
// Create the path to the test_data directory | ||
const testDataPath = path.join(__dirname, 'test_data'); // Ensure this points to the correct directory | ||
|
||
// Create the test_data directory if it doesn't exist | ||
if (!fs.existsSync(testDataPath)){ | ||
fs.mkdirSync(testDataPath, { recursive: true }); // Using recursive to ensure all directories are created | ||
} | ||
|
||
// Write the Excel file to the test_data directory | ||
XLSX.writeFile(workbook, path.join(testDataPath, 'sensitive_data2.xlsx')); | ||
XLSX.writeFile(workbook, path.join(testDataPath, 'sensitive_data2.xlsx')); |
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,4 @@ | ||
{ | ||
"username": "johndoe", | ||
"ssn": "123-45-6789" | ||
} |