Skip to content

Commit

Permalink
fix: update script, filter any non .json file
Browse files Browse the repository at this point in the history
Changes:

- update script to filter all files except for ".json" files.

- applied suggestion from: #452 (comment)
  • Loading branch information
AnimeshKumar923 committed Nov 26, 2023
1 parent 1efe30f commit df35645
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/validate-schemas-final.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function validation (excludedFiles){
const files = fs.readdirSync(directoryPath);

// Filter files
const filteredFiles = files.filter(file => !excludedFiles.includes(file));
const filteredFiles = files.filter(file => !excludedFiles.includes(file) && path.extname(file).toLowerCase() === '.json');


// Iterate through the filtered files
Expand Down Expand Up @@ -60,6 +60,6 @@ function validation (excludedFiles){
});
}

const excludedFiles=['README.md', '2.0.0-rc1-without-$id.json', '2.0.0-rc1.json'];
const excludedFiles=['2.0.0-rc1-without-$id.json', '2.0.0-rc1.json'];

validation(excludedFiles);

0 comments on commit df35645

Please sign in to comment.